Hi,
I just added a patch to http://issues.apache.org/jira/browse/WICKET-1469
(support for wicket:for attribute).
The implementation is based on that of the wicket:message attribute and
works fine.
However, I can't reliably convince the referred component to render its
markup id. The problem is that the referred component might already have
been rendered. I can't find a hook that is called /before/ the render
phase starts for a behavior that is attached to a ComponentTag.
ComponentTag#onBeforeRender is actually called /during/ rendering from
Component#render (line 2426 in branch 1.4.x) and not before. This makes
sense as the markup stream is only known until the rendering of a
component is started. Anyway, I wouldn't know how to override this
method as the instance is created elsewhere.
So my questions are:
Is there an appropriate hook?
Can one be added easily?
Is there another way to manipulate the component hierarchy from the
markup stream?
If no such hook is/will be available I propose to just drop this feature
altogether.
Regards,
Erik.
--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/