This week's book giveaway is in the Open Source forum.
We're giving away four copies of RabbitMQ in Depth and have Gavin Roy 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 RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Iteration using a4j without a collection" Watch "Iteration using a4j without a collection" New topic

Iteration using a4j without a collection

Pho Nghi

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: 16722

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.
I agree. Here's the link:
subject: Iteration using a4j without a collection