Mode

BTT Web 2.0 Widget provides a set of modes for the web developer, and you can add those modes for widget instance window, such as view, collapse, max, close, edit and refresh.

Table 1. Mode description
Parameter Description
view The widget instance window is initiated and displayed.
edit The widget instance window will have an edit icon and its attributes can be edited.
max The widget instance window will have a maximization icon and can be maximized.
collapse The widget instance window will have a collapse icon and can be collapsed.
refresh The widget instance window will have a refresh icon and can be refreshed.
close The widget instance window will have a close icon and can be closed.

For example, you can add modes in the widget definition file in this way

simpleHTMLWgt.xml
<iw:iwidget 
name="simpleHTMLWgt"
xmlns:iw="http://www.ibm.com/xmlns/prod/iWidget"  
iScope="simpleHTMLWgt" 
   supportedModes="view collapse max close edit refresh" mode="view">
   ... 
</iw:iwidget>

The corresponding widget instance window is as follows:

modes of the widget

Besides the default provided modes, BTT Web 2.0 widget also provides the following methods for you to override, and you can rewrite these methods in your web application: