gadgets.views
Method
gadgets.views.bind
Binds a URL template with variables in the passed environment to produce a URL string.
Parameter
Name |
Type |
Description |
---|---|---|
urlTemplate |
String |
A URL template for a container view. |
environment |
Array |
A set of specified string type variables.(example:[OWNER | PATH | PARAMS | NAME]) |
Return value
Type |
Description |
---|---|
String |
A URL string |
gadgets.views.getCurrentView
Returns the current view.
Parameter
None
Return value
Type |
Description |
---|---|
gadgets.views.View |
Current view |
Sample
gadgets.views.getParams
Returns the parameters passed into this gadget for this view.
Parameter
None
Return value
Type |
Description |
---|---|
Map.<String, String> |
Parameter map |
gadgets.views.getSupportedViews
Returns a map of all supported views. Each gadgets.view.View name is used as a key.
Parameter
None
Return value
Type |
Description |
---|---|
Map |
All supported views, using their name attribute as a key. |
gadgets.views.requestNavigateTo
It is scheduled to be offered.
gadgets.views.View.bind
Binds the view's URL template with variables in the passed environment to produce a URL string.
Parameter
Name |
Type |
Description |
---|---|---|
environment |
Array |
A set of specified string type variables.(example: [OWNER | PATH | PARAMS | NAME]) |
Return value
Type |
Description |
---|---|
String |
A URL string |
gadgets.views.View.getName
Returns the name of this view.
Parameter
None
Return value
Type |
Description |
---|---|
String |
View name |
Sample
gadgets.views.View.getUrlTemplate
Not supported.
gadgets.views.View.isOnlyVisibleGadget
Returns true if the specified gadget is the only visible gadget in this view. On a canvas page or in maximize mode it is most likely true; on a profile page or in dashboard mode, it is most likely false.
Parameter
None
Return value
Type |
Description |
---|---|
boolean |
True if the specified gadget is the only visible gadget in this view; otherwise, false. |
Sample
gadgets.views.ViewType
gadgets.views.ViewType.HOME
It is scheduled to be offered.
gadgets.views.ViewType.PROFILE
It is scheduled to be offered.
gadgets.views.ViewType.CANVAS
The canvas view.
gadgets.views.ViewType.PREVIEW
Not supported.
Revision History
- 12/2010
- Initial Release.