You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Volodymyr Siedlecki (Jira)" <de...@myfaces.apache.org> on 2022/10/17 19:58:00 UTC

[jira] [Resolved] (MYFACES-4484) TCK: Spec1553IT: Fix jakarta.faces.composite namespace handling

     [ https://issues.apache.org/jira/browse/MYFACES-4484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Volodymyr Siedlecki resolved MYFACES-4484.
------------------------------------------
    Fix Version/s: 4.0.0-RC2
       Resolution: Fixed

> TCK: Spec1553IT: Fix jakarta.faces.composite namespace handling
> ---------------------------------------------------------------
>
>                 Key: MYFACES-4484
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4484
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 4.0.0-RC1
>            Reporter: Volodymyr Siedlecki
>            Assignee: Volodymyr Siedlecki
>            Priority: Major
>             Fix For: 4.0.0-RC2
>
>
> TCK Spec1553IT Test Fails here: [https://github.com/jakartaee/faces/blob/4.0.1/tck/faces40/namespaces/src/test/java/ee/jakarta/tck/faces/test/servlet50/namespaces/Spec1553IT.java#L101]
> xhtml Code:
> [https://github.com/jakartaee/faces/blob/4.0.1/tck/faces40/namespaces/src/main/webapp/spec1553IT.xhtml]
> xmlns:cc_jakarta="jakarta.faces.composite/components"
> ...
> <div id="cc_jakarta"><cc_jakarta:component value="value" /></div>
> The issue is within [CompositeResourceLibrary|https://github.com/apache/myfaces/blob/89c747e85615e3f33265e664c8361789f38ea7db/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java]. Each namespace, expect the current jakarta one, has a ending slash:
> {code:java}
> public final static String NAMESPACE_PREFIX = "jakarta.faces.composite";
> public final static String JCP_NAMESPACE_PREFIX = "http://xmlns.jcp.org/jsf/composite/";
> public final static String SUN_NAMESPACE_PREFIX = "http://java.sun.com/jsf/composite/";{code}
> This difference affects how the substring call occurs: [https://github.com/apache/myfaces/blob/89c747e85615e3f33265e664c8361789f38ea7db/impl/src/main/java/org/apache/myfaces/view/facelets/tag/composite/CompositeResourceLibrary.java#L215]
> With the old namespaces, "components" would be returned. But now since jakarta.faces.composite is removed, the libraryName is "/components". This leading slash creates problems when creating/looking up resource.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)