<?xml version="1.0" encoding="UTF-8" ?>
<iw:iwidget id="HelloIWidget" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
supportedModes="view edit" mode="view" lang="en" name="Hello iWidget" >
<div>Hello From WebSpherenotes.com</div>
<div>Hello From WebSpherenotes.com - Edit Mode</div>
This XML file defines Hello iWidget, you can develop it using either RAD 8 or you can use notepad.
Widget xml file will have at least one iw:content element, this element defines what content should be displayed to the user. In my case i have two iw:content elements one with mode="view", and other with mode="edit". The markup inside the CDATA section of iw:content mode="view" will be displayed to the user during normal operation of the widget and the markup inside the iw:content mode="edit" would be displayed to the user when he switches mode to edit for configuring widget settings.
Once your widget definition is ready you can execute it any iwidget runtime. There are multiple IBM products that provide iWidget runtime environment such as Project Zero, IBM WebSphere Mashup Center, WebSphere Portal,... WebSphere Portal 7.0 allows you to wrap a widget in a Portlet and add it on portal page along with other portelts or you can add it on dedicated mash up page.
This is how the view mode of the widget looks like when wrapped inside a portlet
If you click on Edit Shared Settings link it will take you to the edit mode of the widget and display content under iw:content mode="edit", this is how it looks like