Java Mailing List Archive

http://www.gg3721.com/

Home » users.tapestry »

Render phase return type equivalent to void

Joost Schouten (mailing lists)

2010-06-07

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

I have build a RestrictedVisibility Mixin which shows or hides an entire
component by returning true or false in the @SetupRender method [1].
This works well but I just realized there is one drawback. When I return
true, setup render skips to the next step (@(protected)
like it to continue down the line so @SetupRender of the component it is
mixed in is also executed.

I have partially solved this by annotating the mixing with @MixinAfter,
but now I execute the setup render methods of components that are never
shown which not ideal.

Is there another return type or another way to achieve this? Or are
there better ways to achieve my visibility restriction.

Thanks,
Joost

[1] (simplified)
@SetupRender
private Object setup() {
    if(showComponent) {
          return true;
    }
    return false;
}

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.