MethodBinding from commandLink not being called

Hello,

I am building a dynamic datatable and everything is being rendered fine. However, now I want to implement row selection on the table and am doing so by rendering a commandLink on each row that the user can click to select the row. I would like to bind this to an action method in my bean and have so far been unable to invoke the action method when I click on the link. Here is my code:

UICommand comm =new UICommand();

MethodBinding mbButton = app.createMethodBinding("#{myBB.buildModel}",null);

comm.setAction(mbButton);

code]

And my backing bean is defined in faces-config as myBB. In that backing bean, I have:

[code]public String buildModel(){

logger.info("BuildModel invoked");

return"stay";

}

But buildModel is not being called at all when I click the link on the page. What am I missing?

[1142 byte] By [Bart69a] at [2007-10-3 9:15:53]
# 1
Figured it out.You need to set an ID for each comm, also. Adding a call to comm.setId(<unique ID>) fixed the problem.
Bart69a at 2007-7-15 4:28:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...