You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Blšták Peter <pe...@softec.sk> on 2010/07/08 11:24:12 UTC

Access to the event handler method annotation during rendering of compoment

Hi

Is it possible to get access to the event handler method annotation during rendering of compoment, which triggers corresponding event ?
How is it possible (the best way) ?

Let say I have a custom link component SecuredLink placed in TestPage and event handler for SecuredLink event on the same page.
I would like to access @Secured annotation content during render of SecuredLink compoment (to be able to make the link conditionally inaccessible).


public class TestPage {

	@Component
	private SecuredLink securedLink;


	@Secured({Roles.ADMIN})
	void onActionFromSecuredLink() {
		...
	}
	
	...
}

I know how to make "SecuredInterceptor" for the event listener method, which prevents for unauthorized invocation of the listener. As I say I would like to use annotation also during render of corresponding "triggering" component.

Thanks

P.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org