Hi. I'd like to discuss a couple of feature requets:
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.
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
public class MyBean { public String action(@Param("idParam")Integer id) { ... } }
Maybe both requirements can be solved with a simple nice trick:
<s:link action="#{bean.action(param.idItem)}"> <f:param name="idItem" value="#{item.id}"/> </s:link>