You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "Corbin, James" <jc...@iqnavigator.com> on 2010/04/30 00:42:25 UTC

AjaxFallbackDefaultDataTable Model Not Updating

A co-worker of mine created an AjaxFallbackDefaultDataTable with editable cells.  In this case they are dropdowns.  She is dynamically adding rows to the table.  If she modifies one of the component drop down (PropertyModel) values in one of the cells and then adds a new row, the changes she made to the previous row(s) are lost.

She noticed that the setter method on the property is not called, but the getter is being called.  I'm pretty sure that if she submits the form the model would get updated (normal form processing) and her changes would be persisted to the model, but how can she get the model to update without submitting the form?

I seem to remember previous forum topics related to this issue, but couldn't remember the suggested solutions.

Does the solution have to do with selecting a different ItemReuseStrategy?

 Thanks,
J.D.

RE: AjaxFallbackDefaultDataTable Model Not Updating

Posted by "Corbin, James" <jc...@iqnavigator.com>.
Is the solution to add AjaxFormComponentUpdatingBehavior/AjaxFormChoiceComponentUpdatingBehavior to each of the editable form components?

-----Original Message-----
From: Corbin, James [mailto:jcorbin@iqnavigator.com] 
Sent: Thursday, April 29, 2010 4:42 PM
To: users@wicket.apache.org
Subject: AjaxFallbackDefaultDataTable Model Not Updating

A co-worker of mine created an AjaxFallbackDefaultDataTable with editable cells.  In this case they are dropdowns.  She is dynamically adding rows to the table.  If she modifies one of the component drop down (PropertyModel) values in one of the cells and then adds a new row, the changes she made to the previous row(s) are lost.

She noticed that the setter method on the property is not called, but the getter is being called.  I'm pretty sure that if she submits the form the model would get updated (normal form processing) and her changes would be persisted to the model, but how can she get the model to update without submitting the form?

I seem to remember previous forum topics related to this issue, but couldn't remember the suggested solutions.

Does the solution have to do with selecting a different ItemReuseStrategy?

 Thanks,
J.D.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AjaxFallbackDefaultDataTable Model Not Updating

Posted by Igor Vaynberg <ig...@gmail.com>.
On Thu, Apr 29, 2010 at 3:42 PM, Corbin, James <jc...@iqnavigator.com> wrote:
> A co-worker of mine created an AjaxFallbackDefaultDataTable with editable cells.  In this case they are dropdowns.  She is dynamically adding rows to the table.  If she modifies one of the component drop down (PropertyModel) values in one of the cells and then adds a new row, the changes she made to the previous row(s) are lost.
>
> She noticed that the setter method on the property is not called, but the getter is being called.  I'm pretty sure that if she submits the form the model would get updated (normal form processing) and her changes would be persisted to the model, but how can she get the model to update without submitting the form?
>
> I seem to remember previous forum topics related to this issue, but couldn't remember the suggested solutions.
>
> Does the solution have to do with selecting a different ItemReuseStrategy?

yes, something that keeps the items around. also whatever button you
use to add new rows or do any kind of request to the server has to be
a submit button.

-igor

>
>  Thanks,
> J.D.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org