Limitations with sandboxed widgets 
|
This topic describes known limitations when developing and working with sandboxed widgets. |
This topic describes known limitations when developing and working with sandboxed widgets.
- Only widgets that comply with the iWidget Specification Version 1.0 can be sandboxed.
- Sandboxed widgets do not support the enabler SPI. They only support the following APIs:
- com.ibm.mashups.iwidget.iContext (except processiWidgets(domNode))
- com.ibm.mashups.enabler.xml.XPath
- com.ibm.mashups.enabler.logging
- com.ibm.mashups.data.Util
- Widgets should strictly force the separation of DOM artifacts upon different modes since each customized mode, for example edit mode, is rendered within a separate iFrame. See the following details:
- Each mode has a dedicated DOM area. Widgets should be able to access this DOM area only if the widget is in that mode. Widgets should use the iContext API such as iContext.getElementById() so that the search area is limited to the DOM area of current mode only.
- When exiting from edit mode, be sure to switch the mode first before updating the view mode DOM area.
- Developers should be aware of the following limitation when using the dijit.Dialog API. Any open dialog that has a fixed size that exceeds the view port size will not be completely visible. Therefore, developers should not set a fixed size on the dialog. By not setting a fixed size, the dialog will take up as much space as needed by its content. In effect, it behaves similar to a standard div tag. If you need scroll bars on the dialog, read the chapter called Sizing the Dialog in DOJO campus web site.
- When using the onSizeChanged event, the widget needs to handle the case for both modes. The onSizeChanged event is fired to the widget in following two cases.
- The widget's default mode is resized in page edit mode
- The widget's edit dialog is resized when the widget is in edit mode
- See the following example:
switch (this.iContext.getiDescriptor().getItemValue("mode")) {
case this.iContext.constants.mode.VIEW:
// view mode stuff here
break;
case this.iContext.constants.mode.EDIT:
// edit mode stuff here
break;
}
- Sandboxed widgets currently do not display on the page when using Internet Explorer 6. Users receive an error message. As a workaround, suggest that clients use a different browser.
Parent topic: Creating sandboxed widgets
|
|
|
|
| Version 1 |
May 19, 2011 |
6:31:19 PM |
by IBM  |
|
|