I need to allow for easy table editing by adding an edit and delete
button to a table (using Contrib's Table.) Adding the buttons is
fairly easy, but what's the best way to allow for inline editing? I'd
need to change the row to a row of edit fields instead of text fields.
The next question is that I'd like to then have an "add" button that
would make a set of fields visible to add a new record. It would be
even more slick to allow the number of new fields to be changed, e.g.
clicking add multiple times creates multiple blank rows (not
necessarily inside the main table.)
Here is my current thinking:
I'd like a general purpose solution that allows for the editing of
any table, so the number and name of each column wouldn't be known in
the HTML. I do this in another class by creating my own getColumnValue
() that is called for a list of columns provided by the class. It's a
bit of a hack, since that function needs to call PropertyUtils.read
to get the column value, but it works. I could make the editable row
a series of @TextField components, I think. They'd just set
properties on an editable object, e.g. 'editObject.name"
To do the add feature, all I can think of is to submit the page and
generate the list of new rows via a @For loop. The properties could
be accessed via arrays, I guess, e.g. "addObject[2].name" assuming
that works.
Any thoughts?
Norman Franke
ASD Inc.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]