[OpenAjaxGadgets] Request a widget mode

Jon Ferraiolo jferrai at us.ibm.com
Fri Apr 10 07:31:33 PDT 2009



             Howard Weingram                                               
             <weingram at tibco.c                                             
             om>                                                        To 
             Sent by:                  "gadgets at openajax.org"              
             gadgets-bounces at o         <gadgets at openajax.org>              
             penajax.org                                                cc 
             04/09/2009 06:31          [OpenAjaxGadgets] Request a widget  
             PM                        mode                                

I would like to add a function that allows a widget to request transition
a different mode. The only indication of success would be a modeChanged
event delivered to the widget at some future time.

     * @param {String} newMode
     *      The name of the mode to which the widget is
     *      requesting transition
    OpenAjax.widget.Adapter.prototype.requestMode(newMode) {}

Use Case

For example, a Help mode screen may contain a button that sends the widget
back to View mode. This button is INSIDE the widget rather than outside in
the container. This could simply transition the widget, but then any
container buttons would be out of sync because the container does not know
about the change.

With the requestMode, the button would not actually switch modes; it would
call requestMode('view') and this would tell the container to switch the

Compatibility with Other Standards

This behavior would be comparable to that of javax.portlet, which specifies
that a portlet can "programmatically change [its] portlet mode when
processing an action request."

In other words, in the portlet world, there is a standard way for a portlet
to request that the portlet container execute a mode change.

The portlet spec allows the portlet container to ignore or override the
mode-change request. It is only a request.


Howard Weingram      650.846.1000
Principal Architect  TIBCO Software Inc.

TIBCO PageBus(TM) delivers ultra-lightweight
publish-subscribe messaging for mash-ups.
Learn more at http://www.pagebus.org

gadgets mailing list
gadgets at openajax.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openajax.org/pipermail/gadgets/attachments/20090410/440e9d35/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
Url : http://openajax.org/pipermail/gadgets/attachments/20090410/440e9d35/attachment.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic20630.gif
Type: image/gif
Size: 1255 bytes
Desc: not available
Url : http://openajax.org/pipermail/gadgets/attachments/20090410/440e9d35/attachment-0001.gif 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
Url : http://openajax.org/pipermail/gadgets/attachments/20090410/440e9d35/attachment-0002.gif 

More information about the gadgets mailing list