myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias We├čendorf (JIRA) <...@myfaces.apache.org>
Subject [jira] Commented: (TRINIDAD-1656) Maven-faces-plugin faces-config.xml generation does not allow ViewRoot replacement
Date Tue, 08 Dec 2009 13:04:18 GMT

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

Matthias We├čendorf commented on TRINIDAD-1656:
----------------------------------------------

IMO this is fine; other folks *decorate* the UIViewRoot as well, so why not making the plugins
(somehow) aware of it...

> 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.


Mime
View raw message