The widget is used to load one web page thorough the URL. Users can set up services by configuring the attributes of the widget, which is the main objective of the predefined widget. The attributes, such as URL and height, of HTML Web Widget, can be set by the users.
This widget can be found in the BTTWeb2InternetBankWeb of BTT Web2.0 On-Demond Workplace sample, which consists of HTMLWgt.xml and HTMLWgt.js.
The HTMLWgt.xml file defines the attributes of the widget, indicates the JavaScirpt file that contains the main class for the widget, and describes the content which is displayed on the web page.
The HTMLWgt.js defined the JavaScriptâ„¢ class that implements some callback functions, invoked when some specific actions are triggered. These callback functions contains onLoad, onSave, onEdit, onMax, onRestore and onRefresh.
<entry id='simpleHTMLWgt' definition='../widget/basic/HTMLWgt.xml'></entry>
<Service id="0.1" name="html_service" desc="html_service" logo="theme/servicelogo/navlogo.gif"> <Widget name="simpleHTMLWgt"> <attribute name="url" value="http://www.ibm.com" /> </Widget> </Service>
Here we set the url attribute to http://www.ibm.com, and the height will use the default value defined in the HTMLWgt.xml file. So when the service is loaded, the web page of www.ibm.com is displayed in the frame of the service instance.