You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org> on 2009/12/08 14:04:18 UTC

[jira] Commented: (TRINIDAD-1656) Maven-faces-plugin faces-config.xml generation does not allow ViewRoot replacement

    [ https://issues.apache.org/jira/browse/TRINIDAD-1656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12787444#action_12787444 ] 

Matthias Weßendorf commented on TRINIDAD-1656:
----------------------------------------------

You are patching the transform12.xsl.... do you think we should patch our 2.0 work as well ? 
code lives here:
http://svn.apache.org/repos/asf/myfaces/trinidad-maven/branches/2.0.0-branch/maven-faces-plugin/src/main/resources/org/apache/myfaces/trinidadbuild/plugin/faces/resources/

> Maven-faces-plugin faces-config.xml generation does not allow ViewRoot replacement
> ----------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-1656
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1656
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Plugins
>    Affects Versions: 1.2.10-plugins 
>            Reporter: Andy Schwartz
>            Priority: Minor
>         Attachments: TRINIDAD-1656.patch
>
>
> I am using the maven-faces-plugin (GenerateFacesConfigMojo) to generate my faces-config.xml.
> Unfortunately, I need to make use of my own UIViewRoot implementation.  As such, in my base faces-config.xml file, I explicitly specify a component mapping for the javax.faces.ViewRoot component type, eg:
>    <component>
>       <component-type>javax.faces.ViewRoot</component-type>
>       <component-class>org.example.component.SomeViewRoot</component-class>
>    </component>
> While the maven-faces-plugin passes other component mappings defined my my base faces-config.xml file through to the generated file, my javax.faces.ViewRoot mapping is ignored due to the following restriction in transform12.xsl:
>        <xsl:apply-templates select="javaee:component[not(contains(javaee:component-extension/mfp:component-class-modifier/text(), 'abstract')) and
>                                                     starts-with(javaee:component-type, $typePrefix)]" />
> The issue is that only component mappings for component-types that match the $typePrefix are accepted.  Normally this is fine, but in this case I need to allow a mapping outside of my $typePrefix through.
> A one-off fix for this problem that would meet my needs would be to also allow javax.faces.ViewRoot component mappings to pass through as well, eg:
>        <xsl:apply-templates select="javaee:component[not(contains(javaee:component-extension/mfp:component-class-modifier/text(), 'abstract')) and
>           (starts-with(javaee:component-type, $typePrefix) or 
>             (contains(javaee:component-type, 'javax.faces.ViewRoot')))]" />
> This is a bit hokey, since it special cases a single component type, but seems like the least impact/risky change that meet my needs.
> Can we implement this solution or something equivalent?

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