You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by datazuul <ra...@pixotec.de> on 2010/09/03 20:06:55 UTC
Select/SelectOption onchange possible
I switched from DropDownChoice to Select/SelectOption (because of more
flexible handling of option-tags (css-styling...)).
Now I want the same behaviour of "wantOnSelectionChangesNotification" and
"onSelectionChanged", but do not find a way to attach this to the "Select"
component...
I tried
select.setOutputMarkupId(true);
select.add(new AjaxFormChoiceComponentUpdatingBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
// TODO Auto-generated method stub
LOGGER.info("Locale changed to: {}", getLocale());
}
});
but this does not have any effect.
I want an (javascript /onchange) auto update when an option of the select
box has been selected.
How?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Select-SelectOption-onchange-possible-tp2526059p2526059.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: Select/SelectOption onchange possible
Posted by Igor Vaynberg <ig...@gmail.com>.
use ajaxformcomponentupdatingbehavior
-igor
On Fri, Sep 3, 2010 at 11:06 AM, datazuul <ra...@pixotec.de> wrote:
>
> I switched from DropDownChoice to Select/SelectOption (because of more
> flexible handling of option-tags (css-styling...)).
>
> Now I want the same behaviour of "wantOnSelectionChangesNotification" and
> "onSelectionChanged", but do not find a way to attach this to the "Select"
> component...
>
> I tried
>
> select.setOutputMarkupId(true);
> select.add(new AjaxFormChoiceComponentUpdatingBehavior() {
> @Override
> protected void onUpdate(AjaxRequestTarget target) {
> // TODO Auto-generated method stub
> LOGGER.info("Locale changed to: {}", getLocale());
> }
> });
>
> but this does not have any effect.
>
> I want an (javascript /onchange) auto update when an option of the select
> box has been selected.
>
> How?
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Select-SelectOption-onchange-possible-tp2526059p2526059.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