Not sure if this will work, but you could look into using an el function to return the string. So, something like:
Of course, now you're "hard coding" a method name in a string, which is probably as difficult to refactor as the string itself. Personally, I think you're better off using a straight string.
Well that's what I'm worried about (in case of refactoring, you'd have to make the reference change to 'admin' or whatever the role is in many xhtml files).
so is there no way around this? There's no solution for this in Seam 2.0?
ahem, Gavin, calling Gavin...
No. It's not possible to access static values in EL (it probably should be). If you add a feature request to Seam JIRA, we might be able to get it into JBoss EL.
The work around to this problem is the following:
in the .xhtml file, use the following code for the restriction:
<!-- in place of s:hasRole restriction -->
where authorizor is a SLSB and the method is isDisplay() that returns boolean. This works fine and removes the hard-coding that was used in the s:hasRole method param passed.