[
https://issues.apache.org/struts/browse/WW-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46999#action_46999
]
Zarko Lozanoski commented on WW-2429:
-------------------------------------
Currently Jsr286Dispatcher and PortletResult, on a portlet event phase behave
the same as on a action phase. Depending on the event, an Struts Action is
executed and a PortletResult is returned. Then, in the render phase action
DirectRenderFromEventAction executed that displays the result from the previous
event action. This is not according to JSR-286 because more events can be
executed on a portlet and all of them can contribute on how the portlet state
will change. Latter, according to this portlet state, the render portlet phase
is called. So, the correct behavior would be to configure Jsr286Dispatcher and
PortletResult like this:
On the event phase Activate an action according to en event. The action does
not return String - void execute(). Meaning it does not return string for which
chain or view can be displayed next. The method only responds to the event and
inside the method body code can be added to modify the portlet state for
example to save the state into db, portlet preferences or portlet session.
Then, on the render phase, execute the default action - same like in
Jsr168Dispatcher - and it is up to this action to decide what result should be
returned - maybe ignore the portlet state (db, preferences, session) set by the
event action or maybe not. This way more events actions can be activated on a
portlet and all of them will influence what should be displayed next, and not
just the last one.
> Prepare portlet classes for JSR286 support
> ------------------------------------------
>
> Key: WW-2429
> URL: https://issues.apache.org/struts/browse/WW-2429
> Project: Struts 2
> Issue Type: Improvement
> Components: Plugin - Portlet
> Reporter: Nils-Helge Garli
> Priority: Minor
> Fix For: Future
>
>
> JSR286 introduces a new "event" phase. This has an unfortunate name collision
> with some constants in the portlet plugin used for the "action" phase. Also
> have to find out how to structure the classes to enable re-use and reduce
> duplication.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.