How could I encapsulate the authentication logic, the URL and the label of a Menu item when I make use of e.g. a Dojo MenuItem widget?
What I currently have is this:
<auth:isRole role="admin">
<div dojoType="widget.Menu.MenuItem">
<a href="<html:rewrite page="... complicated url ..."/>">
<bean:message key="label.goes.here"/>
</a>
</div>
</auth:isRole>
And what I would like to achieve would be something like:
<util:menuitem role="admin" link="...complicated url..." label="label.goes.here" />
Is this possible to implement with a custom tag? Would there be other options to use Ajax or JS helpers?