var rows = table.list(); NOT workiing

Hi

I am trying to get the row id

Script block -

var button = CAF.model(“#{caf:cid(‘addRowButton’)}”);
var table = CAF.model(‘#{activePageBean.clientIds[‘asyncTable2’]}’);
var rows = table.list()

var _onclick = button.element.onclick;

button.element.onclick = function() {
alert(“jk”);
};

---------when i add the line ------- var rows = table.list() , alert wont come

Please help .

Regards
Jasmeen Kaur

_onclick();   

};

wrong forum: place it on MWS, CAF & Task Engine

also, an error will stop your script when it occurs.

you probably got an error because the table is not yet defined when you call table.list()?

check the forum for the use of the onLoad and place the Script block on the bottom of your form.

Happy coding (and remember, Firebug is your friend).
Best Regards