You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ivoneta <ie...@gmail.com> on 2010/05/12 16:41:55 UTC
setOutputMarkupPlaceholderTag + value
Hello!
I need to manage the locale (choose from a combobox) in javascript. So I
will create a hidden field and then get in javascript.
I create a hidden text field:
TextField locale = new TextField("hiddenLocale",new
Model(getSession().getLocale().getLanguage()));
locale.setVisible(false);
locale.setOutputMarkupId(true);
add(locale);
in the html :
<input type="text" id="hiddenLocale" wicket:id="hiddenLocale"/>
The problem is when this texfield is render, the value (of the text field)
is not in the html input, so in javascript the value is undefined.
is there any way to render the value??
I don't know this is the best option to set a value in javascript, but is
the only way to found to do it!
pleaseeeeeee, help meee!!
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupPlaceholderTag-value-tp2196140p2196140.html
Sent from the Wicket - User 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: setOutputMarkupPlaceholderTag + value
Posted by Zilvinas Vilutis <ci...@gmail.com>.
Why don't you use <input type="hidden" /> ?
Žilvinas Vilutis
Mobile: (+370) 652 38353
E-mail: cikasfm@gmail.com
On Wed, May 12, 2010 at 7:41 AM, Ivoneta <ie...@gmail.com> wrote:
>
> Hello!
> I need to manage the locale (choose from a combobox) in javascript. So I
> will create a hidden field and then get in javascript.
> I create a hidden text field:
>
> TextField locale = new TextField("hiddenLocale",new
> Model(getSession().getLocale().getLanguage()));
> locale.setVisible(false);
> locale.setOutputMarkupId(true);
> add(locale);
>
> in the html :
> <input type="text" id="hiddenLocale" wicket:id="hiddenLocale"/>
>
> The problem is when this texfield is render, the value (of the text field)
> is not in the html input, so in javascript the value is undefined.
>
> is there any way to render the value??
>
> I don't know this is the best option to set a value in javascript, but is
> the only way to found to do it!
>
> pleaseeeeeee, help meee!!
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupPlaceholderTag-value-tp2196140p2196140.html
> Sent from the Wicket - User 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: setOutputMarkupPlaceholderTag + value
Posted by Ivoneta <ie...@gmail.com>.
Yes "hiddenField" is the solution...
Thanks Igor
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupPlaceholderTag-value-tp2196140p2219895.html
Sent from the Wicket - User 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: setOutputMarkupPlaceholderTag + value
Posted by Igor Vaynberg <ig...@gmail.com>.
see HiddenField component...
-igor
On Wed, May 12, 2010 at 7:41 AM, Ivoneta <ie...@gmail.com> wrote:
>
> Hello!
> I need to manage the locale (choose from a combobox) in javascript. So I
> will create a hidden field and then get in javascript.
> I create a hidden text field:
>
> TextField locale = new TextField("hiddenLocale",new
> Model(getSession().getLocale().getLanguage()));
> locale.setVisible(false);
> locale.setOutputMarkupId(true);
> add(locale);
>
> in the html :
> <input type="text" id="hiddenLocale" wicket:id="hiddenLocale"/>
>
> The problem is when this texfield is render, the value (of the text field)
> is not in the html input, so in javascript the value is undefined.
>
> is there any way to render the value??
>
> I don't know this is the best option to set a value in javascript, but is
> the only way to found to do it!
>
> pleaseeeeeee, help meee!!
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupPlaceholderTag-value-tp2196140p2196140.html
> Sent from the Wicket - User 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org