Nice! It must be a good idea then :)

If you go beyond a simple sibling, the referred component can be anywhere on the page. I know of no reasonable simple way to refer such a component (except through code). Therefor I think it is reasonable to limit this feature to sibling components only. The route through code is always present.

Regards,
   Erik.


Jonas wrote:
There's already a feature request in jira for this:

https://issues.apache.org/jira/browse/WICKET-1469

I tried implementing it once, but I run into trouble with component
hierarchy. Only
allowing labels for sibling components would probably make the implementation
a lot easier, but I'm not sure if this a too big limitation to only
allow siblings.

Consider the situation when the input field and the label are in different table
cells, e.g.

<tr><td wicket:id=...><input  wicket:id=... .../></td><td
wicket:id=...><label  wicket:id=... .../></td></tr>

but you need to append some attributes to the td tags (e.g. for coloring).
If I understood correctly what you suggested, this usecase wouldn't be covered.

cheers,
Jonas


--
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


Reply via email to