Widget definition file

Widget definition file is to define the page element of the widget.

Here is an example of widget definition file, Component.xml:

<iw:iwidget name="htmlWidget" xmlns:iw="http://www.ibm.com/xmlns/prod/iWidget" iScope="htmlWidget"  
  supportedModes="view" mode="view">
    <iw:resource uri="htmlWidget.js" />
    <iw:resource uri="utils.js"/>
    <iw:resource uri="htmlWidget.css"/>
    <iw:itemSet id="attributes" private="true">
        <iw:item id="url"  value=""/>
    </iw:itemSet>
    <iw:itemSet id="life" private="true">
        <iw:item id="user"  value='{"name": "Jesse" "phone": "110"}'/> 
        <iw:item id="fruit"  value='["apple", "orange", "pear"]'/>
        <iw:item id="movies" value='["Batman", "Leon", "The Godfather"]'/>
    </iw:itemSet>
    
    <iw:content mode="view">
    <![CDATA[
      <iframe class="rootFrame" style="width:100%;min-width:60px; min-	height:200px;border:0px;"></iframe>
		]]>
    	</iw:content>
	
    <iw:content mode="view1">
    <![CDATA[
      <div id='userName'></div>
      <input type="text"  name="amount" id="amount" size="10" maxLength="10">
    ]]>
		<div>
      <input type="button" style="height=30px" value="OK" onclick='iContext.iScope().onClickButton1()'/>
    </div>
    </iw:content>

Parameters specification for each tag are as follows: