Hi,
Firstly, I must admit that this has never happened before in all of the several portlets done in the past.
We have an Async Table rendered on a Page with sorting enabled on the columns. When a sort link on any of the columns is clicked, the Table “refreshes” and goes blank. There is a Javascript error on line # 11908 in general.js with the error described as below when this happens.
Uncaught TypeError: Cannot call method ‘getFirst’ of null
registerAddRemoveListener:function(tableId,id,standardMsg,emptyMsg,atEndMsg,beyondEndMsg,unknownTotalMsg){
setTimeout(function(){
if(CAF.DataTotal.listeners[id])
return;
var fn=CAF.DataTotal.listeners[id]=function(){
var table=$(tableId);
var m=CAF.model(tableId);
var first=m.getFirst();
var last=first+m.size();
var total=m.getRowCount();
var msg=standardMsg;
Above is an extract of javascript code above and below the line that fails. Looks like “m” is not able to get a handle on the table and consequently, its getFirst() method fails.
The table was rendered directly from the output of a webservice without using a content provider. I thought this may be the cause and so I created a Selectable, Sortable, Updateable and other “ables” Content Provider and bound it to the Table. The problem still persists.
The only other difference between other portlets with tables and this one is that there are 5 tables in this and only one of them is “rendered” based on a condition.
Can someone advise on what’s going wrong here?
Thanks,
Best regards,
Raj
#MWS-CAF-Task-Engine#webMethods-BPMS#webMethods