Using Ajax Dojo Toolkit
- The first difficulty was finding out what onClick event was being called when I clicked a checkbox. (Turns out to be some event listener addition)
- Code that got things working:
dojo.event.connect(portletsTable, "updateEditor", updateEditor );
dojo.event.connect(portletsTable, "saveEntrySubmit", saveEntrySubmit );
dojo.event.connect(portletsTable, "clearAndDisableEditor", clearAndDisableEditor );
portletsTable.getNewEntryPrototype = getNewEntryPrototype;
var data = [] ;
##foreach($p in $portletPermissions)
//data.push( { name: "$p.Permission.Name", actions: "$p.Permission.Actions", roles: "$p.Roles", Id: $velocityCount } );
##end
data.push( { name: "Xin603 1", actions: "192.168.0.1", roles: "EF:E2:D5:6A:4B:44", Id: 1 } );
data.push( { name: "Xin603 2", actions: "192.168.0.2", roles: "55:E1:D2:7A:4B:44", Id: 2 } );
data.push( { name: "Xin603 3", actions: "192.168.0.3", roles: "55:A1:2D:A2:41:34", Id: 3 } );
portletsTable.js_masterdata = data;
portletsTable.js_type = "portlet";
No comments:
Post a Comment