Hello,
I'm playing with parameters to pass to functions called from actions of
h:commandButton and h:commandLink, and I find different behaviours:
namely it does not work with commandButtons.
Both commands are inside a table, these are my two test cases:
First one with commandLink:
<h:column>
<h:commandLink action="#{myBean.myMethod}">
<h:outputText value="Select"/>
<f:param name="myParam" value="#{row.myValue}"/>
</h:commandLink>
</h:column>
And Second one with commandButton
<h:column>
<h:commandButton action="#{myBean.myMethod}" value="Select">
<f:param name="myParam" value="#{row.myValue}"/>
</h:commandButton>
</h:column>
The method called on the bean is the same, and this is the code:
Map rpm = FacesContext.getCurrentInstance().getExternalContext
().getRequestParameterMap();
logger.debug("-- BEGIN --");
for (Object key : rpm.keySet())
logger.debug("key "+key+" : "+rpm.get(key));
logger.debug("-- END --");
With commandLink I have a correct behavior:
20050605 22:52:40 logParameterMap - -- BEGIN --
[ ... not useful parameters ...]
20050605 22:52:40 logParameterMap - key myParam : 2
20050605 22:52:40 logParameterMap - key autoScroll : 0,0
20050605 22:52:40 logParameterMap - -- END --
While using the commandButton myParm is empty! :
20050605 22:52:40 logParameterMap - -- BEGIN --
[ ... not useful parameters ...]
20050605 22:52:40 logParameterMap - key myParam :
20050605 22:52:40 logParameterMap - key autoScroll : 0,0
20050605 22:52:40 logParameterMap - -- END --
I tried both with release 1.0.9 and night build, the problem is the
same.
I suppose that's a bug in myfaces, can someone please confirm I'm not
doing something dumb so I open an issue on Jira?
Thanks,
Alex