<ServiceCategory id="2" name="web2_transaction" desc="web2_transaction" logo="theme/servicelogo/serviceCategory.gif"> <Service id="2.3" name="account_transfer" desc="account_transfer" logo="theme/servicelogo/navlogo.gif"> <Widget name="account_transfer"></Widget> </Service> </ServiceCategory>
<ServiceCategory id="2" name="web2_transaction" desc="web2_transaction" logo="theme/servicelogo/serviceCategory.gif"> <Service id="2.4" name="self-defined" desc="self-defined" logo="theme/servicelogo/navlogo.gif"/> </ServiceCategory>
API | Input | Output |
---|---|---|
BTTUtil.servicelist.addEventHandler | P1(service id), P2(event name), P3(handler), P4(scope) | When the event is triggered, the corresponding handler under the specified scope is invoked. |
BTTUtil.Servicelist.addListener( 'onclick', function(servId){ if(!BTTUtil.Servicelist.isCategoryNode(servId)) { BTTUtil.Workarea.addService(servId); } });
BTTUtil.Servicelist.addListener('2.3', 'onclick', function(){ if(!BTTUtil.Servicelist.isCategoryNode('2.3')) { var tabId = BTTUtil.Workarea.addTab(); var columnId =BTTUtil.Workarea.addColumn(tabId); BTTUtil.Workarea.addService(columnId,'2.3'); } });
var testScope = { test1:100 };
BTTUtil.Servicelist.addListener('2', 'expand', function(){ if(BTTUtil.Servicelist.isCategoryNode('2')) { alert("expand"); alert(this.test1); } }, testScope);