Textfield to keep the value after being refreshed

2011-07-20 Thread Anna Simbirtsev
Hi, I refresh the page using target.addComponent(fieldName); The value that was entered in the text field is cleared. How can I get it to keep the value? Thanks Anna

Re: Textfield to keep the value after being refreshed

2011-07-20 Thread Pedro Santos
Hi Anna, use an submit component like AjaxLink or AjaxButton to interact with server. Even if you skip the default form processing by set submitComponent.setDefaultFormProcessing(false) the input in the fieldName will be kept. On Wed, Jul 20, 2011 at 11:37 AM, Anna Simbirtsev

Re: Textfield to keep the value after being refreshed

2011-07-20 Thread Anna Simbirtsev
I can't, because target.addComponent is called in the AjaxFormComponentUpdatingBehavior on one of the field. But I already found a solution. I added AjaxFormComponentUpdatingBehavior to the text field, so that the value is kept on the server. Thanks On Wed, Jul 20, 2011 at 10:51 AM, Pedro Santos

Re: Textfield to keep the value after being refreshed

2011-07-20 Thread Andrea Del Bene
Hi, which AJAX component are you using? is likely that your field's form is not submitted, hence field's model is not updated Hi, I refresh the page using target.addComponent(fieldName); The value that was entered in the text field is cleared. How can I get it to keep the value? Thanks Anna

Re: Textfield to keep the value after being refreshed

2011-07-20 Thread hariharansrc
You can use the keyword static to make the textfield's value remain after refresh or if you use any persistent frameworks the object state will be available until you destroy it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Textfield-to-keep-the-value-after-being