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 generate inputTexts dynamically for a CRUD application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "generate inputTexts dynamically for a CRUD application" Watch "generate inputTexts dynamically for a CRUD application" New topic
Author

generate inputTexts dynamically for a CRUD application

Pablo Mino
Greenhorn

Joined: Aug 11, 2009
Posts: 26
hello,

I apologize for my incorrect use of English in advance , I coulnd't find a post related to this, maybe is for the same reason

I had to create a CRUD that could work with any table on the database, after a lot of thinking it was easy, and i created a CachedRowSetDataProviderthat grab the name from a text, then the CachedRowSetDataProvider feeds a DataModel, got the values by iterating the fieldkeys and rowkeys and then ice:columns did the rest

I can erase the same way, just grabbing the selectedRow and removing that row from the DataProvider

Now my problem is on insert and update, as the columns are not the same number all the time, I need inputTexts that match that number but i dont know if theres something like a for loop to generate components with different ids or something like that and then relate those to a value on the Bean

After that I think I can store the values on an List which I could match with each FieldKey and hopefully do an update/save

How can I achieve this?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: generate inputTexts dynamically for a CRUD application
 
Similar Threads
open source webapp for basic data capture application
How do I implement time?
DAO -> CRUD + Business Logic ?
XML and aspect-oriented programming
get fields and types for tables