[jboss-user] [JBoss Seam] - Nested EL in .xhtml and s:hasRole hard-coding removal

asookazian do-not-reply at jboss.com
Tue Aug 7 17:02:45 EDT 2007


I created a class to store all the user roles as static constant Strings.

I'd like to reference these constant Strings in my .xhtml files instead of hard-coding the role as follows:

<h:inputText id="email" 
                           size="50"
                      maxlength="50"
                          value="#{customersHome.instance.email}"
                          disabled="#{!s:hasRole('admin')}">
       <a:support event="onblur" reRender="emailDecoration"/>
</h:inputText>

Is it possible to do this (use a constants class and reference the values in the .xhtml via EL?)  How can I get rid of the hard-coding??

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071730#4071730

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071730



More information about the jboss-user mailing list