You can implement your own MethodBinding if you want to directly call java code.
updateUICommand.setActionListener(new
IndirectMethodBinding(new IndirectMethodBindingHolder()
{
public void invoke(Object[] args)
{
rowAndColumnRelationshipsPage.update((ActionEvent)args[0]);
}
}));
You can find the classes IndirectMethodBinding and
IndirectMethodBindingHolder in this old MyFaces JIRA issue attachment:
https://issues.apache.org/jira/secure/attachment/12311217/RowAndColumnRelationshipComponent.zip
On 10/21/07, pdt_p <[EMAIL PROTECTED]> wrote:
>
> Hi...
>
> I have a button (CoreCommandButton), this button I create it
> programatically. How do i set the action for that button?
>
> Basically, I try to create a button progamatically that will match with
> creating a button in this jsp code like:
> <tr:commandButton text="MyButton" action="ThisButtonAction" />
>
> There is a method in CoreCommandButton called setAction and it accepting
> MethodBinding as parameter.
> but in order to create a method binding through Application, I have to
> create specify the EL expression. But in my case I don't have any managebean
> to handle the action but I know the return value for the action.
>
> Any idea how I to do that?
>
> thank you
>
> Pdt
>
> --
> View this message in context:
> http://www.nabble.com/how-to-set-CoreCommandButton-action-programmatically--tf4668410.html#a13335936
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>