The widget is used to load one web page thorough the URL. You can set up services by configuring the attributes of the widget, which is the main objective of the predefined widget. You can set the attributes, such as URL and height, of HTML Web Widget.
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, and indicates the JavaScript file that contains the main class for the widget, and also describes the content which is displayed on the web page.
The HTMLWgt.js defines the JavaScript class that implements some callback functions that are invoked when some specific actions are triggered. These callback functions include 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>
The url attribute is set to http://www.ibm.com, and the height attribute uses 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 wideget instance.