[jboss-user] [JBoss Seam] - evaluting s:hasPermission once only in a page
ptalekar
do-not-reply at jboss.com
Tue May 29 16:28:10 EDT 2007
i have a page with quite a few :
<ice:inputText id="enterpriseName"
value="#{enterpriseTreeManager.enterprise.name}" size="50"
required="true"
disabled="${!s:hasPermission('enterprise', 'edit', null}">
i am using the RuleBasedIdentity, so I also have a security.drl file with all the premissions. my problem is that the Identity.hasPermission() method get called for each s:hasPermission. is there a way to store the result of s:hasPermission in a page scoped variable and then use that instead of s:hasPermission?
i tried the following but it still calls Identity.hasPermission multiple times:
<c:set var="editPermission" scope="page" value="${s:hasPermission('enterprise', 'edit', null)}"/>
and then
<ice:inputText id="enterpriseName"
value="#{enterpriseTreeManager.enterprise.name}" size="50"
required="true"
disabled="${!editPermission}">
thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049525#4049525
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049525
More information about the jboss-user
mailing list