4 Replies Latest reply on Aug 13, 2007 4:11 PM by Arbi Sookazian

    Nested EL in .xhtml and s:hasRole hard-coding removal

    Arbi Sookazian Master

      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??