1 Reply Latest reply on Jan 5, 2007 2:53 PM by norman.richards

    EL enhancements

    monkeyden

      Is the "parameterized EL" enhancement only available for action handlers, or can it be used for accessors too? Suppose I have an entity which has the following field:

      STATUS NUMBER(1)

      ...and there are two possible values for status(0=OK, 1=BAD). I retrieve a list of these entities within my action and outject it using @DataModel. Within dataTable, resolve that status number to a String value.

      JSF

      <h:outputText value="#{loginAction.getStringValue(0)}"/>


      Action
      public String getStringValue(int code){
       if(code == 0 ){
       return "OK";
       }else{
       return "BAD";
       }
      }


      I supect that I'm not going to hear what I want to, but it was worth a try.