prepareForRender is only called on the Page or Component that is the target
itself for rendering (so the begin target)
prepareForRender is not meant to be overridden and called from the outside
world as far as i can see
The hook is onBeforeRender (that is called through a call that originates
from a Page.prepareForRender())
johan
On Sat, Apr 12, 2008 at 7:29 PM, Stefan Simik <[EMAIL PROTECTED]>
wrote:
>
> One additional question,
>
> is it valid to change to component hierarchy in these methods ?
>
> I tried it, but it didnt work:
>
>
>
> SHORT EXAMPLE:
> -------------------------------------------------------------------------
>
> AjaxFallbackLink updateLink = new AjaxFallbackLink("updateLink") {
>
> @Override
> public void prepareForRender() {
> super.prepareForRender();
>
> // if some condition true -> render additional attribute
> if (isUpdateProcessRunning()) {
> add(new
> StyleAttributeAppender("text-decoration: none;"));
> }
> }
> };
>
>
> .... and result was, that no STYLE attribute was rendered.
>
> But when I write:
> updateLink.add(new StyleAttributeAppender("text-decoration: none;"));
> then, the STYLE attribute is rendered.
>
>
> I cannot find out, what I am doing wrong here..
>
> Thanks a lot.
> --
> View this message in context:
> http://www.nabble.com/onBeforeRender-vs.-prepareForRender-tp16653398p16653658.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>