• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

generate inputTexts dynamically for a CRUD application

Pablo Mino
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic