You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Rutger Jansen <ru...@rutger.net> on 2008/10/24 17:33:45 UTC

nested AjaxFormComponentUpdatingBehavior

Hi

I'm having trouble refreshing a formcomponent with Ajax when it is
nested in another Component which is updated by Ajax.

My situation is:
I have a large page with a form. The form contains a dataView and the
dataView contains lines (a List) of objects.
In each line I have a few DropDownChoice components. If component A
changes, the choices of component B will change.
This all works perfectly by adding a AjaxFormComponentUpdatingBehavior
on component A and calling setOutputMarkupId(true) on component B.

Now I also have an option to add a line to the list of objects and I
also added AjaxFormComponentUpdatingBehavior to this
'add_a_new_line_link' causing the whole dataView to refresh. To have
that working I also call setOutputMarkupId(true) on my dataView.

But once I've (also) set the OutputMarkupId(true) on the dataView, the
updating of component B after changing component A does not work
anymore, unless I refresh the whole dataView instead of just component
B as I did before.

So to me it seems it has to do something with the nested
setOutputMarkupId(true) on the dataView and on component B within that
dataview.

Any ideas?

Rutger

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


Re: nested AjaxFormComponentUpdatingBehavior

Posted by Igor Vaynberg <ig...@gmail.com>.
create a quickstart and attach it to a jira issue. its hard to tell
whats going on without any code.

-igor

On Sat, Oct 25, 2008 at 1:24 AM, Rutger Jansen <ru...@rutger.net> wrote:
> Oops, it's a Panel of course, and in the panel I have the DataView,
> and in the DataView I have lines with DropDownChoices.
>
> So when I setOutputMarkupId(true) on the Panel, the refreshing of just
> the DropDownChoice inside that Panel does not work anymore.
>
> On Fri, Oct 24, 2008 at 6:18 PM, Igor Vaynberg <ig...@gmail.com> wrote:
>> calling setoutputmarkupid(true) on the datavew is a noop because
>> dataview itself doesnt render.
>>
>> -igor
>>
>> On Fri, Oct 24, 2008 at 8:33 AM, Rutger Jansen <ru...@rutger.net> wrote:
>>> Hi
>>>
>>> I'm having trouble refreshing a formcomponent with Ajax when it is
>>> nested in another Component which is updated by Ajax.
>>>
>>> My situation is:
>>> I have a large page with a form. The form contains a dataView and the
>>> dataView contains lines (a List) of objects.
>>> In each line I have a few DropDownChoice components. If component A
>>> changes, the choices of component B will change.
>>> This all works perfectly by adding a AjaxFormComponentUpdatingBehavior
>>> on component A and calling setOutputMarkupId(true) on component B.
>>>
>>> Now I also have an option to add a line to the list of objects and I
>>> also added AjaxFormComponentUpdatingBehavior to this
>>> 'add_a_new_line_link' causing the whole dataView to refresh. To have
>>> that working I also call setOutputMarkupId(true) on my dataView.
>>>
>>> But once I've (also) set the OutputMarkupId(true) on the dataView, the
>>> updating of component B after changing component A does not work
>>> anymore, unless I refresh the whole dataView instead of just component
>>> B as I did before.
>>>
>>> So to me it seems it has to do something with the nested
>>> setOutputMarkupId(true) on the dataView and on component B within that
>>> dataview.
>>>
>>> Any ideas?
>>>
>>> Rutger
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>

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


Re: nested AjaxFormComponentUpdatingBehavior

Posted by Rutger Jansen <ru...@rutger.net>.
Oops, it's a Panel of course, and in the panel I have the DataView,
and in the DataView I have lines with DropDownChoices.

So when I setOutputMarkupId(true) on the Panel, the refreshing of just
the DropDownChoice inside that Panel does not work anymore.

On Fri, Oct 24, 2008 at 6:18 PM, Igor Vaynberg <ig...@gmail.com> wrote:
> calling setoutputmarkupid(true) on the datavew is a noop because
> dataview itself doesnt render.
>
> -igor
>
> On Fri, Oct 24, 2008 at 8:33 AM, Rutger Jansen <ru...@rutger.net> wrote:
>> Hi
>>
>> I'm having trouble refreshing a formcomponent with Ajax when it is
>> nested in another Component which is updated by Ajax.
>>
>> My situation is:
>> I have a large page with a form. The form contains a dataView and the
>> dataView contains lines (a List) of objects.
>> In each line I have a few DropDownChoice components. If component A
>> changes, the choices of component B will change.
>> This all works perfectly by adding a AjaxFormComponentUpdatingBehavior
>> on component A and calling setOutputMarkupId(true) on component B.
>>
>> Now I also have an option to add a line to the list of objects and I
>> also added AjaxFormComponentUpdatingBehavior to this
>> 'add_a_new_line_link' causing the whole dataView to refresh. To have
>> that working I also call setOutputMarkupId(true) on my dataView.
>>
>> But once I've (also) set the OutputMarkupId(true) on the dataView, the
>> updating of component B after changing component A does not work
>> anymore, unless I refresh the whole dataView instead of just component
>> B as I did before.
>>
>> So to me it seems it has to do something with the nested
>> setOutputMarkupId(true) on the dataView and on component B within that
>> dataview.
>>
>> Any ideas?
>>
>> Rutger
>>
>> ---------------------------------------------------------------------
>> 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


Re: nested AjaxFormComponentUpdatingBehavior

Posted by Igor Vaynberg <ig...@gmail.com>.
calling setoutputmarkupid(true) on the datavew is a noop because
dataview itself doesnt render.

-igor

On Fri, Oct 24, 2008 at 8:33 AM, Rutger Jansen <ru...@rutger.net> wrote:
> Hi
>
> I'm having trouble refreshing a formcomponent with Ajax when it is
> nested in another Component which is updated by Ajax.
>
> My situation is:
> I have a large page with a form. The form contains a dataView and the
> dataView contains lines (a List) of objects.
> In each line I have a few DropDownChoice components. If component A
> changes, the choices of component B will change.
> This all works perfectly by adding a AjaxFormComponentUpdatingBehavior
> on component A and calling setOutputMarkupId(true) on component B.
>
> Now I also have an option to add a line to the list of objects and I
> also added AjaxFormComponentUpdatingBehavior to this
> 'add_a_new_line_link' causing the whole dataView to refresh. To have
> that working I also call setOutputMarkupId(true) on my dataView.
>
> But once I've (also) set the OutputMarkupId(true) on the dataView, the
> updating of component B after changing component A does not work
> anymore, unless I refresh the whole dataView instead of just component
> B as I did before.
>
> So to me it seems it has to do something with the nested
> setOutputMarkupId(true) on the dataView and on component B within that
> dataview.
>
> Any ideas?
>
> Rutger
>
> ---------------------------------------------------------------------
> 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