You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2010/12/02 20:16:12 UTC

[jira] Commented: (MYFACES-2992) Metadata is not created for views created by a navigation

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

Leonardo Uribe commented on MYFACES-2992:
-----------------------------------------

I checked it and the problem is related to the way NavigationHandlerImpl create views. Right now we just call ViewHandler.createView.

The problem is components created on the metadata causes UIViewHandler.createUniqueId to be called and in the end the id of UIViewRoot gets a different number on postback.

The solution is call metadata.createMetadataView before viewHandler.createView, like it is done on restore view algorithm, to warrant the ids for the components in a page remain stable. Note this issue also solves a possible problem when <f:event> is used inside <f:metadata>, because when navigation handling is done, this tag is just ignored.

> Metadata is not created for views created by a navigation
> ---------------------------------------------------------
>
>                 Key: MYFACES-2992
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2992
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.2
>            Reporter: Gerhard Petracek
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.3-SNAPSHOT
>
>
> if you post back to a page the first time DefaultFaceletsStateManagementStrategy#restoreView
> line List<String> clientIdsAdded = getClientIdsAdded(view);
> returns 1 entry if you added a component dynamically.
> if you have further postbacks (same page), you get null
> currently that breaks e.g. the new clientside-windowhandler of codi!
> example for the prev. description:
> https://svn.apache.org/repos/asf/myfaces/extensions/cdi/trunk/examples/jsf-examples/windowhandler_jsf20/
> link: "List sample"
> -> http://localhost:8080/listsample/sampleList.xhtml
> -> select an entry and on the details page click 2x on the button reload.

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