Work with the PortletState object
The PortletState object determines the state of the portlet.
Client side aggregation of previous portal versions:Object [] getParameterMap()
Enabler API:var widgetStateNames = this.getParameterNames(); // see below var result = new Array(); for (var n = 0; n < widgetStateNames.length; n++) { var widgetStates = this.getParameterValues(widgetStateNames [n]); // see below result [n] = {name: widgetStateNames [n], values: widgetStates}; }
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:Object [] getParameterNames()
Enabler API:var navigationStateModel = com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); var widgetAccessor = com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(navigationStateModel); // get widget state names var result = widgetAccessor.getWidgetStateNames();
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:String getParameterValue(String name)
Enabler API:var navigationStateModel = com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); var widgetAccessor = com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(navigationStateModel); // get widget state var result = widgetAccessor.getWidgetState(name);
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:String [] getParameterValues(String name)
Enabler API:var navigationStateModel = com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); var widgetAccessor = com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(navigationStateModel); // get widget states var result = widgetAccessor.getWidgetStateValues(name);
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:PortletMode getPortletMode()
Enabler API:var navigationStateModel = com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); var widgetAccessor = com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(navigationStateModel); // get widget mode var result = widgetAccessor.getWidgetMode();
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:WindowState getWindowState()
Enabler API:var navigationStateModel = com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); var widgetAccessor = com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(navigationStateModel); // get window state var result = widgetAccessor.getWindowState();
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:void removeParameter(String name)
Enabler API:var navigationStateModel = com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); var widgetAccessor = com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(navigationStateModel); // remove parameter var result = widgetAccessor.removeWidgetState(name);
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:Object [] setParameterMap(Object [] map, boolean replace)
Enabler API:for (var n = 0; n < map.length; n++) { var widgetStateName = map [n].name; var widgetStates = map [n].values; this.setParameterValues(widgetStateName, widgetStates); // see below }
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:String setParamaterValue(String name, String value)
Enabler API:var navigationStateModel = com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); var widgetAccessor = com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(navigationStateModel); // set widget state widgetAccessor.setWidgetState(name, value);
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:String [] setParameterValues(String name, String [] values)
Enabler API:var navigationStateModel = com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); var widgetAccessor = com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(navigationStateModel); // set widget states widgetAccessor.setWidgetState(name, values);
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:PortletMode setPortletMode(PortletMode portletMode)
Enabler API:var navigationStateModel = com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); var widgetAccessor = com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(navigationStateModel); // set widget mode widgetAccessor.setWidgetMode(widgetMode); // commit navigationStateModel.commit().start();
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Client side aggregation of previous portal versions:WindowState setWindowState(WindowState windowState)
Enabler API:var navigationStateModel = com.ibm.mashups.enabler.model.state.NavigationStateModelFactory.getNavigationStateModel(); var widgetAccessor = com.ibm.mashups.enabler.model.state.AccessorFactory.getWidgetAccessor(navigationStateModel); // set window state widgetAccessor.setWindowState(windowState); // commit navigationStateModel.commit().start();
iWidget API:Use the call onNavStateChanged()call , as iWidgets maintain parameters by themselves.
Parent
Comparing the new and the old client-side programming model