0 Replies Latest reply on May 8, 2008 12:19 PM by Timothy Whitehead

    Value expressions from java code

    Timothy Whitehead Newbie

      I am trying to create a dynamic table using org.richfaces.component.html.HtmlDataTable but I cant seem to get the EL expressions to work.


      I have tried:


      ....
      ExpressionFactory ef=FacesContext.getCurrentInstance().getApplication().getExpressionFactory();     
      UIOutput text = new UIOutput();
      ValueExpression ve = ef.createValueExpression("#{workOrder.id}", String.class);          
      text.setValueExpression("value", ve);     
      text.setRendererType("javax.faces.Text");
      column.getChildren().add(text);
      ....



      and something similar but using:



      public ExpressionFactory getExpressionFactory() {
        // JBoss EL
        return SeamExpressionFactory.INSTANCE;
      }



      to get the ExpressionFactory.


      However both methods do not evaluate the expression but simply produce the expression as plain text.



      I have some old WebSphere code that used to work that uses ValueBinding but that has been deprecated.


      What am I doing wrong?