1 Reply Latest reply on Jan 31, 2009 2:52 PM by alberto Gori

    Two feature requests (EL and HTTP parameters)

    alberto Gori Novice

      Hi. I'd like to discuss a couple of feature requets:


      First request



      I have this action:


      <s:link action="#{bean.action(item.id)}"/>
      



      and I want the item.id part to be immediately resolved and not in a deferred fashion. I already possible to get this wit current jboss-el?
      Maybe I am wrong, but I'd find this feature really usefull. What would happen if #{item.id}
      is on a conversation and my link is


      <s:link action="#{bean.action(item.id)}" propagation="none"/>
      



      ?
      If item is in a conversation context, it would be evaluated to null. Instead I need a
      way to fix its value on the page, immediately. Ability to evaluate it immediately in a
      action expression would help a lot.



      Second request


      I know this issue can actually be solved using HTTP GET parameters (though I would prefer the first form in a web application):


      <s:link action="#{bean.action(null)}" propagation="none">
        <f:param name="paramId" value="#{item.id}"/>
      </s:link>
      



      then keeping the method shown before I need a way to make it work on both way:


      public class MyBean {
        @RequestParameter Integer paramId; 
        public String action(Integer id) {
          if (null == id) {id = paramId;}
          ...
        }
      }
      



      That's ugly. What about a

      @HttpParam

      annotation instead of RequestParameter?


      public class MyBean {
        public String action(@Param("idParam")Integer id) {
          ...
        }
      }