You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org> on 2011/05/13 18:58:47 UTC

[jira] [Created] (MYFACES-3143) f:viewParam in templates

f:viewParam in templates
------------------------

                 Key: MYFACES-3143
                 URL: https://issues.apache.org/jira/browse/MYFACES-3143
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-314
    Affects Versions: 2.0.5
            Reporter: Gerhard Petracek


if f:metadata and f:viewParam are in a template instead of a template-client, it gets parsed incorrectly. so there is no TagUnit instance for it and no UIPanel for f:metadata.
-> ViewMetadata#createMetadataView doesn't work correctly (in ViewMetadata#getViewParameters the call root.getFacet (UIViewRoot.METADATA_FACET_NAME) returns a UIViewParameter directly instead of a Metadata node with UIViewParameter as a child).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MYFACES-3143) f:viewParam in templates

Posted by "Gerhard Petracek (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033201#comment-13033201 ] 

Gerhard Petracek commented on MYFACES-3143:
-------------------------------------------

it was a child of f:view. just move the usual ui:define content to the template.
use-cases: templateX should ensure that all pages always use the same view-param.
... that isn't a frequent use-case. however, besides valid use-cases there should be at least a warning or msg. in dev. mode or exception instead of just doing nothing.

> f:viewParam in templates
> ------------------------
>
>                 Key: MYFACES-3143
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3143
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.5
>            Reporter: Gerhard Petracek
>
> if f:metadata and f:viewParam are in a template instead of a template-client, it gets parsed incorrectly. so there is no TagUnit instance for it and no UIPanel for f:metadata.
> -> ViewMetadata#createMetadataView doesn't work correctly (in ViewMetadata#getViewParameters the call root.getFacet (UIViewRoot.METADATA_FACET_NAME) returns a UIViewParameter directly instead of a Metadata node with UIViewParameter as a child).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MYFACES-3143) f:viewParam in templates

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13033156#comment-13033156 ] 

Leonardo Uribe commented on MYFACES-3143:
-----------------------------------------

Could you provide an example so I can check it. According to the spec javadoc (Facelets Tag Documentation) of f:metadata, it says:

"... Declare the metadata facet for this view. This must be a child of the <f:view>. This tag must reside within the top level XHTML file for the given viewId, or in a template client, but not in a template ...."

"... The page author is not required to use templating, but if they do, it must be done as shown above, (or with <ui:include> in a similar manner). ...."

Based on the information provided, My conclusion is this is not a bug on MyFaces, but maybe a test case could help to understand what's going on.

> f:viewParam in templates
> ------------------------
>
>                 Key: MYFACES-3143
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3143
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.0.5
>            Reporter: Gerhard Petracek
>
> if f:metadata and f:viewParam are in a template instead of a template-client, it gets parsed incorrectly. so there is no TagUnit instance for it and no UIPanel for f:metadata.
> -> ViewMetadata#createMetadataView doesn't work correctly (in ViewMetadata#getViewParameters the call root.getFacet (UIViewRoot.METADATA_FACET_NAME) returns a UIViewParameter directly instead of a Metadata node with UIViewParameter as a child).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira