javascript - Rowunselect without ctrl+click -
is there possibility unselect row without hold control key,only clickin on it? mean, if click on selected row, should unselect, without having hold control key.
i have tested primefaces 3.4.2: xhtml page:
<script type="text/javascript"> function test(xhr, status, args){ if(args.unselecttest % 2 == 1){ stest.unselectallrows(); } } </script> <p:datatable widgetvar="stest" selectionmode="single" selection="#{tabview.car}" <p:ajax event="rowselect" oncomplete="test(xhr, status, args);" />
bean:
private int count = 0; public car getcar() { return car; } public void setcar(car car) { if (car.equals(this.car)) { count++; requestcontext reqctx = requestcontext.getcurrentinstance(); reqctx.addcallbackparam("unselecttest", count); } else { count = 0; } this.car = car; }
Comments
Post a Comment