Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

AddActionListener programatically  RSS feed

Varun K. Gupta
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in jsf I can write something like this:

<af:commandLink text="Save"
<af:setActionListener from="#{}" to="#{}"/>
<af:setActionListener from="#{}" to="#{}"/>

I need to generate this kind of code programmitically. it generate multiple save links.

Now I can write programmitically like:

RichCommandLink saveLink = new RichCommandLink();
MethodExpression mbForSave =
new Class[] { ActionEvent.class });
saveLink.addActionListener(new MethodExpressionActionListener(mbForSave));

but how to set from and to parameters programmitically?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!