This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Iteration using a4j without a collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Iteration using a4j without a collection" Watch "Iteration using a4j without a collection" New topic
Author

Iteration using a4j without a collection

Pho Nghi
Greenhorn

Joined: Jul 28, 2011
Posts: 4
I am not sure if this can be done but I wanted some verification.
Is it possible to use a4j to iterate if you don't have a collection? For example, if you know the number of iterations but don't have a collection. I just want to print out a certain number of characters using a4j and not use the JSTL for each tag.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952
    
  19

If a4j even has an Iterator, I missed it.

You actually do have a collection, it's just a collection of characters. Just because it's a range and not a random sequence doesn't make it any less of a collection.

It's really not that much trouble to set up a datamodel for a collection of characters. There's probably at least 5 different and relatively easy ways to do it.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Consider Paul's rocket mass heater.
 
subject: Iteration using a4j without a collection
 
Similar Threads
Expandable/Collapsible Subtable with h: or t: Datatable
Collection Filtering
JSF Component - star rating
How would you design this java class
collection param problems