jakartaee / faces

Jakarta Faces
Other
102 stars 54 forks source link

Define the result when the same namespace is used in annotation defined and tag library defined components. #1410

Open eclipse-faces-bot opened 8 years ago

eclipse-faces-bot commented 8 years ago

I cannot see anywhere in the specification that defines what should happen when the same namespace is used to define components using both the javax.faces.component.FacesComponent annotation and also in a tag library *.taglib.xml file.

For example:

@FacesComponent(value="xforms.input", createTag=true, namespace="http://www.w3.org/2002/xforms", tagName="input") public class Input ...
<facelet-taglib version="2.2"
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee   http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd"> 
    <namespace>http://www.w3.org/2002/xforms</namespace> 
    <tag>
        <tag-name>model</tag-name>
        <handler-class>my.custom.xforms.ModelTagHandler</handler-class>
    </tag>

</facelet-taglib>

See this Stack Overflow question for the full example.

The observed behaviour in Mojarra 2.2.12 is that the tag library defined components are available but the annotation defined ones are not. Reading the comments on the SO issue, the MyFaces implementation appears to make both components avaiable.

I think the specification should clearly define what should happen in this case.

From there, I'd suggest that the MyFaces behaviour of making both components available is more intuitive. If there is a conflict then the taglib version should probably win.

Affected Versions

[2.2]

eclipse-faces-bot commented 5 years ago
eclipse-faces-bot commented 8 years ago

@glassfishrobot Commented Reported by baarney

eclipse-faces-bot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-1410