This is a problem. The reason is that markup inheritance the way it is
currently implement is not completely transparent. We do NOT load the
markup, check if <wicket:extend> exists and if yes weave the base
markup with the original markup, effectively creating a single joined
markup stream. The reason why we didn't implement it like this was
because it required duplicating already existing functionality (code),
which most likely could not be just called (invoked). The drawback of
course, as we now discovered, it does not work with Panel and Border.

The current approach autoAdds a MarkupInheritanceContainer if
wicket:extend is found and the container handles loading the base
class markup as well as switching back and forth between the inherited
and extended markup (deep inheritance is also supported). The
advantage as mentioned above, we re-use already existing code and
automatic re-loading of out-dated markup file (base and extended) does
work. We actually have only very little extra code. I assume that
especially the latter one, re-loading outdated markup, will be a
problem for the transparent markup stream approach.

What do you think. Shall we stay with the current approach (I do not
see how we could support Panels and Borders) or shall we try to
implement the transparent markup approach.  We could create a new
branch in order not do "destroy" the existing code. So that in case we
are not able to implement it, we stay with the current approach. But
it most likely will take a few days to implements. From a users point
of it should make any difference, as we do change the user api.

Juergen

On 7/31/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> Yeah, you're right. It is a bug, as I think it should work. Markup
> inheritance is still pretty new...
> 
> I opened:
> http://sourceforge.net/tracker/index.php?func=detail&aid=1248778&group_id=119783&atid=684975
> 
> Eelco
> 
> 
> Erik van Oosten wrote:
> 
> > I hate to answer my own questions, but after an hour of coding, I
> > found out it's not possible:
> >
> > wicket.markup.MarkupException: Markup for a panel component has to
> > contain part '<wicket:panel>'
> > [markup = file:/....../classes/zout/site/menu/SimpleMenuItem.html,
> > index = 3, current = '</wicket:extend>' (line 5, column 2)]
> >    at
> > wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:277)
> >    at
> > wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:646)
> >    at wicket.markup.html.panel.Panel.onRender(Panel.java:93)
> >
> > If it makes sense at all, I would be neat if this is eventually
> > possible. Meanwhile I'll try to rewrite my components.
> >
> > Regards,
> >    Erik.
> >
> >
> >
> > -------------------------------------------------------
> > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> > from IBM. Find simple to follow Roadmaps, straightforward articles,
> > informative Webcasts and more! Get everything you need to get up to
> > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> 
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to