You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by wicketworker <si...@gmail.com> on 2009/02/03 20:05:41 UTC
Re: Does Wicket have RadioGroup ajax update behavior built in like
it does wantOnSelectionChangedNotifications?
Yes, I think if you are working with RadioGroup instead of RadioChoice, then
you can add AjaxFormSubmitBehavior to Radio implementation.
Martin Makundi wrote:
>
> Tnx.
>
> 2009/2/3 Igor Vaynberg <ig...@gmail.com>:
>> see ajaxformchoicecomponentupdatingbehavior
>>
>> -igor
>>
>> On Tue, Feb 3, 2009 at 6:04 AM, Martin Makundi
>> <ma...@koodaripalvelut.com> wrote:
>>> Hi!
>>>
>>> Does Wicket have RadioGroup ajax update behavior built in like it does
>>> wantOnSelectionChangedNotifications?
>>>
>>> It seems like a small piece of code that would better have core support:
>>>
>>> /**
>>> * @param radioGroup
>>> * @param listener
>>> * @param radio
>>> */
>>> private void addAjaxEvent(final RadioGroup<Filter> radioGroup, final
>>> AjaxRequestListenerInterface listener,
>>> final Radio<Filter> radio) {
>>> radio.add(new AjaxEventBehavior(JavaScriptConstants.ONCHANGE) {
>>> @Override
>>> protected void onEvent(AjaxRequestTarget target) {
>>> radioGroup.processInput();
>>> listener.addComponents(target);
>>> }
>>>
>>> /**
>>> * @see org.apache.wicket.ajax.AjaxEventBehavior#getEventHandler()
>>> */
>>> @Override
>>> protected final CharSequence getEventHandler()
>>> {
>>> return generateCallbackScript(new
>>> AppendingStringBuffer("wicketAjaxPost('").append(
>>> getCallbackUrl()).append("', wicketSerialize(Wicket.$('" +
>>> radio.getMarkupId() + "'))"));
>>> }
>>> });
>>> }
>>>
>>> *
>>> http://javathoughts.capesugarbird.com/2007/06/ajax-enabled-radio-group-for-wicket-12x.html
>>>
>>> **
>>> Martin
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Does-Wicket-have-RadioGroup-ajax-update-behavior-built-in-like-it--does-wantOnSelectionChangedNotifications--tp21810539p21816661.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: Does Wicket have RadioGroup ajax update behavior built in like it
does wantOnSelectionChangedNotifications?
Posted by Martin Makundi <ma...@koodaripalvelut.com>.
Didn't want form submit behavior, just component update.
**
Martin
2009/2/3 wicketworker <si...@gmail.com>:
>
>
> Yes, I think if you are working with RadioGroup instead of RadioChoice, then
> you can add AjaxFormSubmitBehavior to Radio implementation.
>
>
>
> Martin Makundi wrote:
>>
>> Tnx.
>>
>> 2009/2/3 Igor Vaynberg <ig...@gmail.com>:
>>> see ajaxformchoicecomponentupdatingbehavior
>>>
>>> -igor
>>>
>>> On Tue, Feb 3, 2009 at 6:04 AM, Martin Makundi
>>> <ma...@koodaripalvelut.com> wrote:
>>>> Hi!
>>>>
>>>> Does Wicket have RadioGroup ajax update behavior built in like it does
>>>> wantOnSelectionChangedNotifications?
>>>>
>>>> It seems like a small piece of code that would better have core support:
>>>>
>>>> /**
>>>> * @param radioGroup
>>>> * @param listener
>>>> * @param radio
>>>> */
>>>> private void addAjaxEvent(final RadioGroup<Filter> radioGroup, final
>>>> AjaxRequestListenerInterface listener,
>>>> final Radio<Filter> radio) {
>>>> radio.add(new AjaxEventBehavior(JavaScriptConstants.ONCHANGE) {
>>>> @Override
>>>> protected void onEvent(AjaxRequestTarget target) {
>>>> radioGroup.processInput();
>>>> listener.addComponents(target);
>>>> }
>>>>
>>>> /**
>>>> * @see org.apache.wicket.ajax.AjaxEventBehavior#getEventHandler()
>>>> */
>>>> @Override
>>>> protected final CharSequence getEventHandler()
>>>> {
>>>> return generateCallbackScript(new
>>>> AppendingStringBuffer("wicketAjaxPost('").append(
>>>> getCallbackUrl()).append("', wicketSerialize(Wicket.$('" +
>>>> radio.getMarkupId() + "'))"));
>>>> }
>>>> });
>>>> }
>>>>
>>>> *
>>>> http://javathoughts.capesugarbird.com/2007/06/ajax-enabled-radio-group-for-wicket-12x.html
>>>>
>>>> **
>>>> Martin
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Does-Wicket-have-RadioGroup-ajax-update-behavior-built-in-like-it--does-wantOnSelectionChangedNotifications--tp21810539p21816661.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