You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alec Swan <al...@gmail.com> on 2011/06/20 07:28:12 UTC

Force modal page to reload on Ajax event

Hello,

I have a modal window which displays a page (using
ModalWindow.PageCreator()) with a DropDownChoice with
AjaxFormComponentUpdatingBehavior("onchange") behavior. I need the
page in the modal window to reload when the user makes a selection in
the DropDownChoice. I tried calling modelChanged() in
AjaxFormComponentUpdatingBehavior#onUpdate(), but that didn't force
the page in the modal window to reload.

How can I accomplish this?

Thanks,

Alec

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Force modal page to reload on Ajax event

Posted by Martin Grigorov <mg...@apache.org>.
read the javadoc of this method.
try it and come back here with further questions

using Ajax to reload the whole page is non-sense

On Mon, Jun 20, 2011 at 10:25 AM, Alec Swan <al...@gmail.com> wrote:
> But how do I refresh the page in the modal window by overriding
> DropDownChoice.wantOnSelectionChangedNotifications()? Where do I get
> the handle to AjaxRequestTarget?
>
> On Mon, Jun 20, 2011 at 12:25 AM, Martin Grigorov <mg...@apache.org> wrote:
>> Don't use AjaxFormComponentUpdatingBehavior but use
>> DropDownChoice.wantOnSelectionChangedNotifications() instead.
>>
>> On Mon, Jun 20, 2011 at 8:28 AM, Alec Swan <al...@gmail.com> wrote:
>>> Hello,
>>>
>>> I have a modal window which displays a page (using
>>> ModalWindow.PageCreator()) with a DropDownChoice with
>>> AjaxFormComponentUpdatingBehavior("onchange") behavior. I need the
>>> page in the modal window to reload when the user makes a selection in
>>> the DropDownChoice. I tried calling modelChanged() in
>>> AjaxFormComponentUpdatingBehavior#onUpdate(), but that didn't force
>>> the page in the modal window to reload.
>>>
>>> How can I accomplish this?
>>>
>>> Thanks,
>>>
>>> Alec
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.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
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Force modal page to reload on Ajax event

Posted by Alec Swan <al...@gmail.com>.
But how do I refresh the page in the modal window by overriding
DropDownChoice.wantOnSelectionChangedNotifications()? Where do I get
the handle to AjaxRequestTarget?

On Mon, Jun 20, 2011 at 12:25 AM, Martin Grigorov <mg...@apache.org> wrote:
> Don't use AjaxFormComponentUpdatingBehavior but use
> DropDownChoice.wantOnSelectionChangedNotifications() instead.
>
> On Mon, Jun 20, 2011 at 8:28 AM, Alec Swan <al...@gmail.com> wrote:
>> Hello,
>>
>> I have a modal window which displays a page (using
>> ModalWindow.PageCreator()) with a DropDownChoice with
>> AjaxFormComponentUpdatingBehavior("onchange") behavior. I need the
>> page in the modal window to reload when the user makes a selection in
>> the DropDownChoice. I tried calling modelChanged() in
>> AjaxFormComponentUpdatingBehavior#onUpdate(), but that didn't force
>> the page in the modal window to reload.
>>
>> How can I accomplish this?
>>
>> Thanks,
>>
>> Alec
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.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


Re: Force modal page to reload on Ajax event

Posted by Martin Grigorov <mg...@apache.org>.
Don't use AjaxFormComponentUpdatingBehavior but use
DropDownChoice.wantOnSelectionChangedNotifications() instead.

On Mon, Jun 20, 2011 at 8:28 AM, Alec Swan <al...@gmail.com> wrote:
> Hello,
>
> I have a modal window which displays a page (using
> ModalWindow.PageCreator()) with a DropDownChoice with
> AjaxFormComponentUpdatingBehavior("onchange") behavior. I need the
> page in the modal window to reload when the user makes a selection in
> the DropDownChoice. I tried calling modelChanged() in
> AjaxFormComponentUpdatingBehavior#onUpdate(), but that didn't force
> the page in the modal window to reload.
>
> How can I accomplish this?
>
> Thanks,
>
> Alec
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org