On Mon, Dec 20, 2010 at 11:47 PM, Jeremy Thomerson <
jer...@wickettraining.com> wrote:

> On Mon, Dec 20, 2010 at 4:41 PM, hok <ivanvasi...@gmail.com> wrote:
> >
> > Jeremy, thanks for the fast response. However my problem is not the same
> as
> > described in the other topic.
> > I'm using DropDownChoice, so I cannot use
> > AjaxFormChoiceComponentUpdatingBehavior (it throws an exception that it's
> > supposed to be used with
> RadioChoice/CheckboxChoice/RadioGroup/CheckGroup).
> > When I use the regular AjaxFormComponentUpdatingBehavior without dojo
> > FilteringSelect the behavior works normal and the value is transferred.
> The
> > problem occurs when I use FilteringSelect.
>
> Sorry, both Martin and I had our quick trigger fingers ready with the
> (almost auto-) reply.  :)
>
> Although I am not familiar with dojo, from your description of the
> problem I would suspect that Dojo is modifying the this.value of the
> select box.  Looking at the description that you linked to, this seems
> correct.  It mentions immediately that it works with an input box and
> a hidden text value.  I suspect that there is a hidden field that
> contains the value of your select box.  The description of the
> filtering select using a native select box confirms this: "the
> OPTION's child text node is used as the displayed value and the
> OPTION's value attribute is used as *the hidden submit value*".
>
> You'll need to write some custom JS (probably as an
> IAjaxCallDecorator) that sets the value of the select input to the
> value of the hidden field before Wicket does its thing, or else that
> does custom submission altogether.
>
> --
> Jeremy Thomerson
> http://wickettraining.com
> Need a CMS for Wicket?  Use Brix! http://brixcms.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
Here is a custom behavior that I wrote once for Dojo's form components
(dijit.form.**):
http://pastie.org/1394480

The usage is: dropDownChoice.add(new
DojoFormComponentUpdatingBehavior("dijit.form.FilteringSelect",
true));

The idea is that dijit.form.** components must have "onChange" attribute and
the new value comes in "arguments[0]"

Reply via email to