Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Portlet Modes Available in uPortal

The modes currently available to uPortal portlets are:

  • view
  • edit
  • help

Edit Mode

  • Use the edit PortletMode to display a form with the configuration screen you want users to see (in this case just a URL input)
  • A portlet can use the PortletPreference API to modify preferences during an ActionRequest so make the configuration form POST to an action URL and change the URL preference value.
  • Render an 'edit' link or button when in the view PortletMode that takes the user to the edit PortletMode.

Switching between portlet modes

With whatever link you want to change modes, you need a PortletURL. Simply create the URL normally (PortletURL myPortletURL = response.createRenderURL()), then call the method: myPortletURL.setPortletMode(PortletMode.EDIT) for edit mode, or use VIEW for view mode and HELP for help mode... If you're extending the GenericPortlet, you then just have to implement doView(), doHelp(), and doEdit() each method will get called accordingly. You can also set your window states if you want to by calling myPortletURL.setWindowState(WindowState.MAXIMIZED) etc...

With thanks to Keith Zantow of VT for answering this question on the uPortal list.

  • No labels