You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Jan Vermeulen <ja...@isencia.com> on 2007/05/07 14:36:12 UTC

Backporting from 2.0: renderComponent() fails if there is no markup

When using an AjaxRequestTarget to render a component, it calls
Component:renderComponent() to do the actual rendering.

In the former 2.0, that component could be a component that has no own
markup (because it was generated by a repeater).

In the current thrunk, using an AjaxRequestTarget to render such a component
fails, because Component.renderComponent() uses a MarkupFragmentFinder to
find the markup for the component,
and that MarkupFragmentFinder throws an exception because it did not find
any markup with the id of the component (which does not exist, since the
component has been generated dynamically).

Is this no longer possible in Wicket ? It was working fine in 2.0, and
allowed us to do ajax refresh of dynamic content of tables or menus.

Jan.
-- 
View this message in context: http://www.nabble.com/Backporting-from-2.0%3A-renderComponent%28%29-fails-if-there-is-no-markup-tf3703472.html#a10356568
Sent from the Wicket - Dev mailing list archive at Nabble.com.


Re: Backporting from 2.0: renderComponent() fails if there is no markup

Posted by Eelco Hillenius <ee...@gmail.com>.
It would be good to open up a JIRA issue for that if you plan to work
on that, Juergen.

Cheers,

Eelco

On 5/8/07, Juergen Donnerstag <ju...@gmail.com> wrote:
> It'll take some time. It was not an easy thing to do and the some
> details of the approach we took needs to be reworked. But we'll get
> there. Not sure it'll make it into 1.3 though.
>
> Juergen
>
> On 5/8/07, Jan Vermeulen <ja...@isencia.com> wrote:
> >
> > Are there any plans for backporting this ?
> >
> > Jan.
> > --
> > View this message in context: http://www.nabble.com/Backporting-from-2.0%3A-renderComponent%28%29-fails-if-there-is-no-markup-tf3703472.html#a10370932
> > Sent from the Wicket - Dev mailing list archive at Nabble.com.
> >
> >
>

Re: Backporting from 2.0: renderComponent() fails if there is no markup

Posted by Eelco Hillenius <ee...@gmail.com>.
> Thanks. I'll fix it on our side for the moment.
>
> I will keep reporting things I come across while backporting. Hope it's not
> only harrassing on the core developers. Somehow I try to contribute by
> pointing out possible bugs or missing things.

Please keep on harrassing. That's the way we keep improving! We all
have limited time, so we can't be quick with everything, and that's
why it is important things get tracked in JIRA. It may take between a
few days up to a few months, but the idea is that ultimately,
everything is at least looked at.

Cheers,

Eelco

Re: Backporting from 2.0: renderComponent() fails if there is no markup

Posted by Jan Vermeulen <ja...@isencia.com>.
Thanks. I'll fix it on our side for the moment.

I will keep reporting things I come across while backporting. Hope it's not
only harrassing on the core developers. Somehow I try to contribute by
pointing out possible bugs or missing things.

Jan.
-- 
View this message in context: http://www.nabble.com/Backporting-from-2.0%3A-renderComponent%28%29-fails-if-there-is-no-markup-tf3703472.html#a10380717
Sent from the Wicket - Dev mailing list archive at Nabble.com.


Re: Backporting from 2.0: renderComponent() fails if there is no markup

Posted by Juergen Donnerstag <ju...@gmail.com>.
It'll take some time. It was not an easy thing to do and the some
details of the approach we took needs to be reworked. But we'll get
there. Not sure it'll make it into 1.3 though.

Juergen

On 5/8/07, Jan Vermeulen <ja...@isencia.com> wrote:
>
> Are there any plans for backporting this ?
>
> Jan.
> --
> View this message in context: http://www.nabble.com/Backporting-from-2.0%3A-renderComponent%28%29-fails-if-there-is-no-markup-tf3703472.html#a10370932
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>

Re: Backporting from 2.0: renderComponent() fails if there is no markup

Posted by Jan Vermeulen <ja...@isencia.com>.
Are there any plans for backporting this ?

Jan.
-- 
View this message in context: http://www.nabble.com/Backporting-from-2.0%3A-renderComponent%28%29-fails-if-there-is-no-markup-tf3703472.html#a10370932
Sent from the Wicket - Dev mailing list archive at Nabble.com.


Re: Backporting from 2.0: renderComponent() fails if there is no markup

Posted by Juergen Donnerstag <ju...@gmail.com>.
In 2.0 the code has been completely reworked. Very simplistic: In 1.x
we iterate over the markup, search the component, and render the
component based on the current markup position. This approach works
well for Pages (none-ajax components) but has some shortcomings when
it come to per-component render (ajax). In 1.x we use
MarkupFragmentFinder to find the markup per component, but since
finding a component for given markup is not a simple process (see
Resolvers), it is even harder to define the invers function in
MarkupFragmentFinder. In 2.0 we changed it completely to a
MarkupFragmentFinder approach (kind of) which means there is no more
difference between a std Page render process and an ajax render
process. This (large) change has not yet been backported to 1.3.

Juergen




On 5/7/07, Johan Compagner <jc...@gmail.com> wrote:
> Normally if you want to repaint a repeater then you have to repaint a parent
> of the repeater
>
> But there is some changes in the markupfinding code so juergen do you know
> what is different?
>
> johan
>
>
> On 5/7/07, Jan Vermeulen <ja...@isencia.com> wrote:
> >
> >
> > When using an AjaxRequestTarget to render a component, it calls
> > Component:renderComponent() to do the actual rendering.
> >
> > In the former 2.0, that component could be a component that has no own
> > markup (because it was generated by a repeater).
> >
> > In the current thrunk, using an AjaxRequestTarget to render such a
> > component
> > fails, because Component.renderComponent() uses a MarkupFragmentFinder to
> > find the markup for the component,
> > and that MarkupFragmentFinder throws an exception because it did not find
> > any markup with the id of the component (which does not exist, since the
> > component has been generated dynamically).
> >
> > Is this no longer possible in Wicket ? It was working fine in 2.0, and
> > allowed us to do ajax refresh of dynamic content of tables or menus.
> >
> > Jan.
> > --
> > View this message in context:
> > http://www.nabble.com/Backporting-from-2.0%3A-renderComponent%28%29-fails-if-there-is-no-markup-tf3703472.html#a10356568
> > Sent from the Wicket - Dev mailing list archive at Nabble.com.
> >
> >
>

Re: Backporting from 2.0: renderComponent() fails if there is no markup

Posted by Jan Vermeulen <ja...@isencia.com>.

Johan Compagner wrote:
> 
> Normally if you want to repaint a repeater then you have to repaint a
> parent
> of the repeater
> 

You didn't have to in the former 2.0. And I don't see any good reason why
you would not be allowed to rerender a component that has no markup. We used
it (with the former 2.0) f.i. to rerender just one single cell in a table.
Having to rerender the parent of the repeater means rerender the whole
table.

Is there a reason why this possibility has been lost ?

Jan.
-- 
View this message in context: http://www.nabble.com/Backporting-from-2.0%3A-renderComponent%28%29-fails-if-there-is-no-markup-tf3703472.html#a10358165
Sent from the Wicket - Dev mailing list archive at Nabble.com.


Re: Backporting from 2.0: renderComponent() fails if there is no markup

Posted by Johan Compagner <jc...@gmail.com>.
Normally if you want to repaint a repeater then you have to repaint a parent
of the repeater

But there is some changes in the markupfinding code so juergen do you know
what is different?

johan


On 5/7/07, Jan Vermeulen <ja...@isencia.com> wrote:
>
>
> When using an AjaxRequestTarget to render a component, it calls
> Component:renderComponent() to do the actual rendering.
>
> In the former 2.0, that component could be a component that has no own
> markup (because it was generated by a repeater).
>
> In the current thrunk, using an AjaxRequestTarget to render such a
> component
> fails, because Component.renderComponent() uses a MarkupFragmentFinder to
> find the markup for the component,
> and that MarkupFragmentFinder throws an exception because it did not find
> any markup with the id of the component (which does not exist, since the
> component has been generated dynamically).
>
> Is this no longer possible in Wicket ? It was working fine in 2.0, and
> allowed us to do ajax refresh of dynamic content of tables or menus.
>
> Jan.
> --
> View this message in context:
> http://www.nabble.com/Backporting-from-2.0%3A-renderComponent%28%29-fails-if-there-is-no-markup-tf3703472.html#a10356568
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>