On Wed, 11 Jun 2008, Martin Makundi wrote:
> I have nested listviews which draw a complex tabular form having
> variable colspans and rowspans depending on the state of the form.

For some reason, I have often succeeded better with other 
repeaters than ListView (e.g. RefreshingView, DataView) in 
complex situations. 

> 1. If I have "setReuseItems" true, the HTML table is not rendered
> properly (somehow the old table structure remains which should be
> restructured).

If the old Items are left there, the old structure remains, 
so this seems to make sense.

> 2. If I have "setReuseItems" false, the form components loose their
> state (unsubmitted entries) whenever I press the button.

Yeah I think that this is what it always does; new Items
don't have any idea of the input fed to the old Items
(except if they share the same model, and the data was
updated all the way to the model).

> So. In my understanding, I need to both a) redraw the html table (at
> least update the colspan and rowspan attributes) and still b) preserve
> the form component state :) Is there an "out-of-the-box" solution for
> this?

If you repaint the component via ajax, with HTML that comes
from the server, you must have sent the data to the server
with a suitable ajax behavior so that it can be in the ajax
reponse. 

I think that in a normal submit the same applies -- you have
to store all the data (in models for example) to the server
so that you can display it again when the page is refreshed.
When conversion or validation errors occur, Wicket returns
the original raw input to form components, but also in that
case the data made the trip to the server and back.

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to