• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSF random iteration on List.

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a dynaic list say for person detail


the first element into List will be the name of the person and remaining will be their respective details like

Name Saurabh Pol
Age 21
height 155
weight 53
........ ...
........ .....
continue


I have to show the name in separate <div></div> tag and other information in separate <div></div> tag. like bellow.

<div class="Header">
<span>Name:</span>
<span>Saurabh Pol</span>
</div>

LOOP
<span class="ListItems">Remaining attributes</span>
END LOOP

please help me to solve this in JSF.

Thanks and Regards,
Saurabh Pol


 
Bartender
Posts: 825
5
Python Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let's move this to the correct forum, I'm sure you'll have more chances of getting the right answer.
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Saurabh!

JSF has a media-independent View Definition Language. So using raw HTML in a JSF View Template is not something I recommend.

I definitely don't recommend coding logic constructs such as loops on a View definition. For tabular displays, JSF has special tags that treat collections of objects as the 2-dimensional objects that they really are, not as programming constructs.

You need to sit down with a good introductory JSF book.
 
reply
    Bookmark Topic Watch Topic
  • New Topic