programtical commandlink
Hello -
I need to acheive following in programatically:
<h:commandLink action="#{clientAlerts.init}">
<f:param name="clientKey" value="#client.clientRow.clientKey}"/> <f:param name="clientId" value="#{client.clientRow.clientID}"/>
<h:outputText value="set Client Alerts">
</h:outputText>
</h:commandLink>
Here is what I plan to do:
HtmlPanelGrid grid = new HtmlPanelGrid();
HtmlCommandLink link = new HtmlCommandLink ();
MethodExpression mex=context.getApplication().getExpressionFactory().createMethodExpression(context.getELContext(),"clientAlerts.init", null, params);
link.setActionExpression(mex);
tmpGrid.getChildren().add(link);
Then binding this grid in the JSP page. Is it right way?

