1 Reply Latest reply on Jul 14, 2009 11:06 PM by Matthieu Heimer

    EL and method arguments

    Matthieu Heimer Newbie

      Will Unified EL support method expressions with parameters? I saw it on the wish list http://blog.hibernate.org/Bloggers/EE6WishlistPartIIIUnifiedEL , any news?

      I know JSR-299 isn't just for JSF and EJBs but that was the primary place I was interested in using it. The problem is that I don't design my method signatures of my EJBs the same way I design the methods in my backing beans so how can I use EJBs in place of JSF managed beans? Basically what I want is (see the action on the commandButton):

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      <html xmlns="http://www.w3.org/1999/xhtml"
             <title>A simple example</title>
                 <h:panelGrid columns="2" title="Test Form">
                     <h:outputLabel id="field1Label" for="field1" value="label1: " />
                     <h:inputText id="field1" value="#{requestScope.field1Value}"/>
                     <h:outputLabel id="field2Label" for="field2" value="label2: " />
                     <h:inputText id="field2" value="#{requestScope.field2Value}"/>
                     <h:commandButton value="Press Me" action="#{myBean.myMethod(requestScope.field1Value, requestScope.field2Value)}"/>

      I'm going to have to stay with-in the Java EE 6 specs so I can't use replacement EL implementations. Does JSR-299 do me any good in this scenario or am I still going to be using backing beans to delegate to EJBs? Most of my session beans are stateless so I need method arguments. Currently I'm using the latest promoted Glassfish v3 and I get a javax.el.MethodNotFoundException.