Hello Johann,
As Stephen said, you cannot pass a value directly. However, you can pretty
much achieve the same by using Trinidad or JSF 1.2 using
setActionListener/setPropertyActionListener.
Here's an example:
MyBean.java
private String myParamValue;
public String getMyParamValue()
{
return myParamValue;
}
public void setMyParamValue(String value)
{
myParamValue = value;
}
public String myAction()
{
// myParamValue is accessible here
}
With JSF 1.2 you can use:
page.jspx
<h:commandButton action="#{myBean.myAction}">
<f:setPropertyActionListener value="myParamValue" target="#{
myBean.actionParameter}"/>
</h:commandButton>
With Trinidad you can use:
<h:commandButton action="#{myBean.myAction}">
<tr:setActionListener from="myParamValue" top="#{myBean.actionParameter
}"/>
</h:commandButton>
Regards,
~ Simon
On 8/13/07, bajistaman <[EMAIL PROTECTED]> wrote:
>
>
> Is it possible to do something like this?
>
> <h:commandButton action="#{bean.method1('text', false)}"/>
>
> public String method1(int p1, boolean p2)
> {
> ...
>
> Thanks,
>
> Johann
> --
> View this message in context:
> http://www.nabble.com/Passing-parameters-to-an-action-method-tf4261705.html#a12127740
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>