can't show a Set in dataTable (JSF)



Hello,

i have a problem and need your help.

follow:
i had a object A with a set of objects B and that will be loaded completely
by hibernate. hibernate presents a collection of objects A.

class B {
int id;
String description;
//getter and setter
}

class A{
int id;
String description;
Set<B> listOfBs;
//getter and setter
}

my jsp page with JSF tags using <h:dataTable for illustrate the collection
comes from hibernate. at moment i can show all description from object A. i
can't access or show the description of object b on my screen. an problem
with lazy-loading by hibernate are solved and the objects will loading
completely. i'm an newbie at JSF and my main problem is finding the correct
statement for present 'description' of B's.

the following table should appeared:
---------------------------------
| a1.description | b1.description |
| a1.description | b2.description |
---------------------------------
| a2.description | b1.description |
---------------------------------

<h:dataTable ....>
<h:column>
<f:facet name="header">
<h:outputText value="#{msgs.a_description}" />
</f:facet>
<h:outputText value="#{record.description}" />
</h:column>
...
<h:column>
<f:facet name="header">
<h:outputText value="#{msgs.b_description}" />
</f:facet>
// statements for show descriptions
from object B . <----------------------
</h:column>
...

i haven't an idea and can't find a solution for my problem.

thank you very much for answers.

best regards
Michael



.



Relevant Pages

  • Re: Darstellung von Set-Elementen in JSF
    ... i had a object A with a set of objects B and that will be loaded completely by hibernate. ... //getter and setter ... my jsp page with JSF tags using <h:dataTable for illustrate the collection comes from hibernate. ... i'm an newbie at JSF and my main problem is finding the correct statement for present 'description' of B's. ...
    (comp.lang.java.programmer)
  • Can Not find bean in scope error when trying to display in jsp
    ... I'm new with Struts and Hibernate. ... BookListForm bookListForm = form; ... String author = null; ...
    (comp.lang.java.programmer)
  • Re: Can Not find bean in scope error when trying to display in jsp
    ... I'm new with Struts and Hibernate. ... BookListForm bookListForm = form; ... String author = null; ...
    (comp.lang.java.programmer)
  • Re: AssertionFailure null id in entry
    ... private String MYROW1; ... However, as stated before, when I have a duplicate unique key, it ... EntityMode entityMode) ... Now Hibernate needs to do 2 things - it needs to persist an object to the ...
    (comp.lang.java.programmer)
  • Auto-Generate Delphi Source using Hibernate Mapping Files and Hibernate Tools
    ... today i wrote a 'proof of concept' modification of Hibernate Tools which allows to automatically build Delphi source code for database tables - the table structure is defined in Hibernate Mapping Files and can also be extracted from existing databases. ... procedure SetTitle(const Value: string); ... TDateTime read FDate write SetDate; ...
    (borland.public.delphi.thirdpartytools.general)