On 8-Apr-09, at 10:31 AM, Igor Vaynberg wrote:
we do not support getting the id from markup. this is because based on
where your code is it is not always possible - eg you may need it
before the markup for that component has been loaded or parsed, and we
may not always know what the markup will be to do a just in time
markup load. this is why we recommend setting the id from code if you
need a fixed one.
Alright, so what you are saying is when renderHead is processed for my
component it's not necessarily the case that the markup for component
has been loaded/parsed? This is definitely something I need to know
for sure... for now I guess I can see if it's possible to move my code
instead into the component's own onload().
Craig.
-igor
On Tue, Apr 7, 2009 at 5:34 PM, Craig Tataryn <crai...@tataryn.net>
wrote:
Within a component's renderHead method is it possible to get the
value of
the id attribute for the component tag?
For instance, I have:
<div wicket:id="multi" id="boo"></div>
And within renderHead if I use getMarkupId() I get "multi1" back,
if I use
getMarkupId(false) I get null.
The JavaDoc for renderHead indicates:
"either the id attribute set explicitly via a call to
setMarkupId(String),
id attribute defined in the markup, or an automatically generated
id - in
that order"
It doesn't seem to be behaving as described. Is this a bug? Or am I
misinterpreting things?
Thanks,
Craig.
--
Craig Tataryn
site: http://www.basementcoders.com/
podcast:http://feeds.feedburner.com/TheBasementCoders
irc: ThaDon on freenode #basementcoders, ##wicket
twitter: craiger
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org