You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org> on 2010/12/17 19:06:01 UTC

[jira] Commented: (MYFACES-3002) FaceletComponsitionContextImpl drops viewParams

    [ https://issues.apache.org/jira/browse/MYFACES-3002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12972563#action_12972563 ] 

Jakob Korherr commented on MYFACES-3002:
----------------------------------------

The code committed on MYFACES-2774 causes the f:metadata facet beeing removed from UIViewRoot on vdl.buildView(), because FaceletViewDeclarationLanguage.isBuildingViewMetadata(ctx.getFacesContext()) is false and thus f:metadata is not processed in DefaultFacelet.apply(). As a result of this, myFaceletContext.finalizeForDeletion(parent); removes the f:metadata facet and all metadata information (including view-parameters) is lost.

Unfortunately this has a lot of side effects. Apart from the problems Mark is having, very basic examples do not work any more since MYFACES-2774 (which is actually "funny", because no-one discovered it for months...).

For example if you have a f:viewParam which stores its value in a @RequestScoped managed bean (e.g. #{requestBean.input}} you will loose the value of the view-parameter immediatly when doing a post-back, because its value is 1) never stored in the state and 2) wouldn't even get picked up if it was in the state.

This means in MyFaces core 2.0.2 and 2.0.3 view-parameters rely on the fact that their value is still available from the model in the next request. If it is not available in the model in the next request (e.g. when using a @RequestScoped managed bean), it will be lost.

> FaceletComponsitionContextImpl drops viewParams
> -----------------------------------------------
>
>                 Key: MYFACES-3002
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3002
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.2, 2.0.3
>            Reporter: Mark Struberg
>            Assignee: Jakob Korherr
>
> This is related to MYFACES-2774
> FaceletComponsitionContextImpl#finalizeForDeletion drops the 'javax_faces_metadata' from the UIViewRoot s _facetMap. Thus all 'old' viewParams are not available for propagation to the next view anymore.
> This situation happens if an action returns something like
> > return "nextPage.xhtml??faces-redirect=true&includeViewParams=true";

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.