Results 1 to 3 of 3

Thread: Change portlet mode in SWF 2.0

  1. #1
    Join Date
    May 2008
    Posts
    4

    Default Change portlet mode in SWF 2.0

    Hi all,

    How can you change your portlet mode in SWF 2.0, preferrably specified in the flow definition? In SWF 1.0, it was possible using the SetPortletModeAction, but I'm not sure if that can be used in SWF 2.

  2. #2
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    You can implement a FlowHandler that changes the portlet model when your flow ends, a common scenario. You can also do it in code by downcasting the external context to a PortletExternalContext for ActionRequests. We could consider making the latter a little easier to do by providing some convenience portletMode setters -- if you can provide more information about your use case, that would be helpful.
    Keith Donald
    Core Spring Development Team

  3. #3
    Join Date
    May 2008
    Posts
    4

    Default portlet mode

    Thanks for your quick reply, Keith. This solves my problem. I won't discourage you from making the setter-call easier, but I think the current call suffices.

    The use case was a form submission, after which the portlet mode should be changed. For other users with a similar problem, the ExternalContext-solution suggested by Keith is included below:

    Code:
    <evaluate expression="externalContext.nativeResponse.setPortletMode(@javax.portlet.PortletMode@VIEW)" />

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •