You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Anna Simbirtsev <as...@gmail.com> on 2011/07/20 16:37:26 UTC
Textfield to keep the value after being refreshed
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
Posted by hariharansrc <ha...@gmail.com>.
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-refreshed-tp3681007p3681290.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Textfield to keep the value after being refreshed
Posted by Andrea Del Bene <an...@libero.it>.
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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Textfield to keep the value after being refreshed
Posted by Anna Simbirtsev <as...@gmail.com>.
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 <pe...@gmail.com> wrote:
> 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 <as...@gmail.com>
> wrote:
> > 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
> >
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Anna Simbirtsev
(416) 729-7331
Re: Textfield to keep the value after being refreshed
Posted by Pedro Santos <pe...@gmail.com>.
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 <as...@gmail.com> wrote:
> 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
>
--
Pedro Henrique Oliveira dos Santos
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org