aspose file tools
The moose likes JSF and the fly likes Generating unique IDs inside dataTable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Generating unique IDs inside dataTable" Watch "Generating unique IDs inside dataTable" New topic
Author

Generating unique IDs inside dataTable

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3359

Hi.
Inside my dataTable I have inputText components.
How to assign a unique ID for each inputText (so I can assign message component for each one of them)?
Thanks.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14491
    
    7

It happens automatically. The dataTable uses your ID as a model, but the full ID is decorated to make it unique.

In th case of JSF message components, things (again) are handled automatically. If you're generating your own message, it needs to be a property for the row of the model that your dataTable is displaying.


Customer surveys are for companies who didn't pay proper attention to begin with.
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3359

But this way I'm forced to:

While I'm looking for:

In the later case, nothing is displayed.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Generating unique IDs inside dataTable
 
Similar Threads
Custom tag use in <h:dataTable>
variable number of inputText elements
Iteration in JSF, how ?
selectmanycheckbox with selectitem
Multiple selectOneMenu with same value