• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Loop over Value Objects?

 
Ronald Johnson
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to create an output that is similar to a search result, e.g. the search results from google:

for each entry found in the list the output would be something like:

Title
description
date added, additional information

but with even more information, and sometimes an image shown or additional information shown depending on some data in the value object.

Is this possible in JSF? How?

I would appreciate any pointers in the right direction, since I cannot find anything on this topic...

cheers,

RJ
 
John Bartlett
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Why not use a dataTable?

John
 
Ronald Johnson
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as far as i can see, i cannot control the output like that.
e.g. an entry would be

(1) JavaServer Faces Technology
(2) The Java Enterprise Community on java.net The Java Enterprise Community is a gathering place for developers ...
(3) java.sun.com/javaee/javaserverfaces/ - 30k - Cached - Similar pages - Note this

where (1) is a larger headerline, (2) is a description with smaller font size
(3) is a row that cointans different information, that will have different styles.

Is that possible to create with a datatable?

RJ
 
John Bartlett
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

you can have different styles for different columns, all you have to use is a tomahawk column (t:column) as they have a styleClass property.

You can also nest dataTables

So couldnt you have something like,

e.g.


this way you could nest dataTables and produce the nice output...?

---- Method 2 -----

You could use a dataTable to show rows of search results and a nested panelGrid to display the contents of that searchResult. That would probably be a slightly better idea. You would not need a Information object then, you could jsut store all the data on the searhcResult Object?

This would result in something like this,



I have never tried a nested panel grid but i believe it would work, and would be extremely easy to produce.

John
[ January 30, 2007: Message edited by: John Bartlett ]
 
Ronald Johnson
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cheers for the reply, the nested elements seems to be a way to get what I want. It will be interesting to see how it goes when i receive the first batch of html docs from the designer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic