File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Generating unique IDs inside dataTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
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: 3479

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: 16058
    
  21

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

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://aspose.com/file-tools
 
subject: Generating unique IDs inside dataTable