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 5 Next »

Switching between Portlet modes

Question:

Can anybody point out how to convert between portlet modes, for example, clicking help logo and then back to view mode.

Answer:
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