This approach used to work for me under 1.1, but no longer in 1.2.
I have a BookmarkablePageLink that I want to disable when its target is
a subclass of a given page.
I used to do something like this:
protected void onRender( final MarkupStream markupStream )
{
setEnabled( ! m_parentClass.isAssignableFrom(
getPage().getClass() ) );
super.onRender( markupStream );
}
But this now throws an exception:
wicket.WicketRuntimeException: Cannot modify component hierarchy during
render phase
at wicket.Page.checkHierarchyChange(Page.java:1001)
at wicket.Page.componentStateChanging(Page.java:934)
at wicket.Component.addStateChange(Component.java:2118)
at wicket.Component.setEnabled(Component.java:1732)
...
How should I go about creating the same effect? Where should I set the link's
enabled value based on the above criterion?
Thanks!
Dave
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user