Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > can't show a Set in dataTable (JSF)

Reply
Thread Tools

can't show a Set in dataTable (JSF)

 
 
Michael Plate
Guest
Posts: n/a
 
      04-30-2007
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">
<hutputText value="#{msgs.a_description}" />
</f:facet>
<hutputText value="#{record.description}" />
</h:column>
...
<h:column>
<f:facet name="header">
<hutputText 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort a datatable and create a new datatable Fredrik Rodin ASP .Net 3 09-28-2007 07:28 AM
How can I add a row from a typed datatable to another instance of that typed datatable? Ersin Gençtürk ASP .Net 1 10-06-2004 01:11 PM
Create a Datatable from a SQL datatable column shema? jg ASP .Net 1 08-17-2004 09:43 PM
Casting DataTable to class inherit from DataTable =?Utf-8?B?Qmx1ZWZsb3dlcg==?= ASP .Net 0 04-02-2004 05:41 AM
Adding DataTable Rows To another DataTable J. Babe ASP .Net 1 08-15-2003 05:04 PM



Advertisments