Re: Preserving user input on ajax changes

2011-06-20 Thread Nelson Segura
I forgot to reply to this. Your observations are absolutely correct. I realized that I was using the ListView incorrectly, and recreating it on each refresh. No wonder I was losing my values. Now it works like a charm. Thanks. -Nelson On Mon, Jun 6, 2011 at 1:29 PM, Pedro Santos wrote: > Hi Ne

Re: Preserving user input on ajax changes

2011-06-06 Thread Pedro Santos
Hi Nelson, ListView recreate its items every render, so it looses their raw input. You can set reuse items flag - ListView.setReuseItems and prevent this problem. Also notify the list view about changes in the list to make it recreate its items by invoking ListView#removeAll Also you may want to r

Re: Preserving user input on ajax changes

2011-06-06 Thread Nelson Segura
I think that my problem is that I am not reusing the models/ recreating models on refresh. Is that a possible cause? I have ListView that display the data, and the list itself is dynamic, depending on what the users selects (that is the reason I need to refresh the whole form) I noticed input outs

Re: Preserving user input on ajax changes

2011-06-02 Thread Igor Vaynberg
default processing = false means do not validate, etc. but, inputs are preserved. make sure your ajaxsubmitlink is inside the correct form. you can specify one in its constructor. -igor On Thu, Jun 2, 2011 at 4:22 PM, Nelson Segura wrote: > On the AjaxSubmitLink, correct? > When I do that, the i

Re: Preserving user input on ajax changes

2011-06-02 Thread Pedro Santos
Hi Nelson, the raw input has preference and it remains in the form component until be converted and set in the form component model. For your use case you can use a simple AjaxLink targeting just the dynamic fields panel, not the whole form. On Thu, Jun 2, 2011 at 8:22 PM, Nelson Segura wrote: >

Re: Preserving user input on ajax changes

2011-06-02 Thread Nelson Segura
On the AjaxSubmitLink, correct? When I do that, the input of the other fields is lost (which has not been previously submitted). How does wicket exactly decides whether to show the model value or the user raw input? My Ajax links is refreshing the whole panel. -Nelson On Thu, Jun 2, 2011 at 4:14

Re: Preserving user input on ajax changes

2011-06-02 Thread Igor Vaynberg
you want setDefaultFormProcessing(false) -igor On Thu, Jun 2, 2011 at 3:41 PM, Nelson Segura wrote: > I have a form to which I need to add dynamic fields using ajax, whenever the > user clicks on the "add new input" link. > I need to preserve the current user input, without actually updating the

Preserving user input on ajax changes

2011-06-02 Thread Nelson Segura
I have a form to which I need to add dynamic fields using ajax, whenever the user clicks on the "add new input" link. I need to preserve the current user input, without actually updating the backing models (or at least preserve input that is not completely valid, or do not show errors if the user a