[ 
https://issues.apache.org/jira/browse/PLUTO-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Neil Griffin updated PLUTO-700:
-------------------------------
    Description: 
Section 20.2.3 of the Portlet 3.0 Specification titled "Render State Scope" 
states:
{quote}The render state scope is a passivating scope that associates managed 
beans with the render state.{quote}

While it is true that beans annotated with {{@RenderStateScoped}} need to be 
"passivating" (meaning they need to be able to save/restore their state), such 
beans are required to implement javax.portlet.annotations.PortletSerializable 
rather than java.io.Serializable.

The Portlet 3.0 API {{@RenderStateScoped}} annotation declares the following 
qualifiers:
{code:java|title=RenderStateScoped.java}
@Retention(RUNTIME) 
@Target({TYPE})
@NormalScope()
@Inherited
public @interface RenderStateScoped {
    String paramName() default "";
}
{code}

Note that the annotation defines {{@NormalScope()}} and not 
{{@NormalScope(passivating = true)}}.

Because of this, it is necessary to clarify the sentence in the spec. For 
example:

{quote}The render state scope is a non-passivating scope that associates 
managed beans with the render state. Although beans annotated with 
@RenderStateScoped are non-passivating from a CDI perspective, all such beans 
must be able to save and restore their state.{quote}

In addition, the spec also states in the same section:
{quote}In accordance with the rules for updating render state, the portlet 
container must serialize the @RenderStateScoped managed bean state using the 
PortletSerializable interface serialize method during the action phase after 
each portlet action request or event request execution that uses the managed 
bean. The portlet container must store the serialized bean state as a render 
parameter in the render state using the associated render parameter name.{quote}

Recommend that "during the action phase" be removed since the following phrase 
"after each portlet action request or event request execution" is more clear 
and concise.

  was:
Section 20.2.3 of the Portlet 3.0 Specification titled "Render State Scope" 
states:
{quote}The render state scope is a passivating scope that associates managed 
beans with the render state.{quote}

While it is true that beans annotated with {{@RenderStateScoped}} need to be 
"passivating" (meaning they need to be able to save/restore their state), such 
beans are required to implement javax.portlet.annotations.PortletSerializable 
rather than java.io.Serializable.

The Portlet 3.0 API {{@RenderStateScoped}} annotation declares the following 
qualifiers:
{code:java|title=RenderStateScoped.java}
@Retention(RUNTIME) 
@Target({TYPE})
@NormalScope()
@Inherited
public @interface RenderStateScoped {
    String paramName() default "";
}
{code}

Note that the annotation defines {{@NormalScope()}} and not 
{{@NormalScope(passivating = true)}}.

Because of this, it is necessary to clarify the sentence in the spec. For 
example:

{quote}The render state scope is a non-passivating scope that associates 
managed beans with the render state. Although beans annotated with 
@RenderStateScoped are non-passivating from a CDI perspective, all such beans 
must be able to save and restore their state.{quote}



> Spec: Clarify Section 20.2.3 titled "Render State Scope"
> --------------------------------------------------------
>
>                 Key: PLUTO-700
>                 URL: https://issues.apache.org/jira/browse/PLUTO-700
>             Project: Pluto
>          Issue Type: Bug
>          Components: spec
>    Affects Versions: 3.0.0
>            Reporter: Neil Griffin
>            Assignee: Scott Nicklous
>            Priority: Major
>
> Section 20.2.3 of the Portlet 3.0 Specification titled "Render State Scope" 
> states:
> {quote}The render state scope is a passivating scope that associates managed 
> beans with the render state.{quote}
> While it is true that beans annotated with {{@RenderStateScoped}} need to be 
> "passivating" (meaning they need to be able to save/restore their state), 
> such beans are required to implement 
> javax.portlet.annotations.PortletSerializable rather than 
> java.io.Serializable.
> The Portlet 3.0 API {{@RenderStateScoped}} annotation declares the following 
> qualifiers:
> {code:java|title=RenderStateScoped.java}
> @Retention(RUNTIME) 
> @Target({TYPE})
> @NormalScope()
> @Inherited
> public @interface RenderStateScoped {
>     String paramName() default "";
> }
> {code}
> Note that the annotation defines {{@NormalScope()}} and not 
> {{@NormalScope(passivating = true)}}.
> Because of this, it is necessary to clarify the sentence in the spec. For 
> example:
> {quote}The render state scope is a non-passivating scope that associates 
> managed beans with the render state. Although beans annotated with 
> @RenderStateScoped are non-passivating from a CDI perspective, all such beans 
> must be able to save and restore their state.{quote}
> In addition, the spec also states in the same section:
> {quote}In accordance with the rules for updating render state, the portlet 
> container must serialize the @RenderStateScoped managed bean state using the 
> PortletSerializable interface serialize method during the action phase after 
> each portlet action request or event request execution that uses the managed 
> bean. The portlet container must store the serialized bean state as a render 
> parameter in the render state using the associated render parameter 
> name.{quote}
> Recommend that "during the action phase" be removed since the following 
> phrase "after each portlet action request or event request execution" is more 
> clear and concise.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to