[Hippo-cms7-user] How to handle compound-types in a bean

Asmann, Roland Roland.Asmann at adesso.at
Fri Apr 29 16:57:20 CEST 2011


I have the following types:

[svportal:question] > nt:base
  - svportal:question (string)
  + svportal:answer (hippostd:html)

[svportal:faq] > svportal:basedocument
  + svportal:faq (svportal:question) multiple


And have defined the following beans:

@Node(jcrType = "svportal:question")
public class Question extends BaseDocument {

     public String getAnswer() {
         return getProperty("svportal:answer");
     }

     public String getQuestion() {
         return getProperty("svportal:question");
     }
}

@Node(jcrType = "svportal:faq")
public class FAQ extends HippoDocument {

     public List<Question> getFaqs() {
         return getLinkedBeans("svportal:faq", Question.class);
     }
}


For some reason, calling 'getFaqs()' on the latter bean never returns 
anything... Did I do something wrong here?

Thanks.

-- 
Roland Asmann
Senior Software Engineer

adesso Austria GmbH
Floridotower 26. Stock              T +43 1 2198790-27
Floridsdorfer Hauptstr. 1           F +43 1 2198790-927
A-1210 Wien                         M +43 664 88657566
                                    E roland.asmann at adesso.at
                                    W www.adesso.at

-------------------------------------------------------------
             >>> business. people. technology. <<<
-------------------------------------------------------------



More information about the Hippo-cms7-user mailing list