jsf - How can I selectall visible rows in an icefaces ace:datatable? -


it doesn't ace:datatable component has selectall/deselectall functionality...unless shift+click on table directly.

i don't want perform ajax submit , modify rowstatemap because:

a) i'd rather not submits until form submission b) rowstatemap.setallselected() selects rows in table regardless of visibility.

any ideas?

perhaps can help. datatable.js file icefaces has method:

ice.ace.datatable.prototype.domultirowselectionevent = function (lastindex, current) 

i tried running directly:

<h:commandbutton value="select all"      onclick="ice.ace.datatable.prototype.domultirowselectionevent(0,     ice.ace.jq('.ui-datatable-data').children().last()); return false;"/>                                 

but didn't seem work.

so created function "doselectallrows" copy of "domultirowselectionevent" has following changes:

ice.ace.datatable.prototype.doselectallrows = function () {      var self = this,         tbody = ice.ace.jq(this.jqid).find('.ui-datatable-data'),         elemrange = tbody.children(),         deselectedid, firstrowselected;      // sync state //     self.readselections(); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -