hi All,
On load of a portlet, I want to register an event for an async command link which will be rendered in all the rows of a table.
This table has pagination (10 records in a each page). Below code is registering events only for the first 10 records which are displayed in first page on load of this portlet.
Is there a way to register the events for the rows of all the pages on load of the portlet? If not, how can I register events when user clicks on prev | next options present for pagination?
Event.observe(window, 'load', function() {
var documentsDisplayAsyncTable = CAF.model("#{activePageBean.clientIds['documentsDisplayAsyncTable']}");
for(var index=0;index < documentsDisplayAsyncTable.size();index++){
var rowObject = documentsDisplayAsyncTable.get(index);
var componentObject = rowObject.getControlId('documentTypeAsyncCmdLink');
CAF.model(componentObject).addActionCompleteListener(
function (commandID) {
// execute js code after action completed
}
);
}
});
Kind regards,
Raja sekhar Kintali