Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port MYFACES-4117 (No default name for @FacesComponent with createTag=true and no tagName) #30414

Open
volosied opened this issue Dec 13, 2024 · 0 comments · May be fixed by #30415
Open

Port MYFACES-4117 (No default name for @FacesComponent with createTag=true and no tagName) #30414

volosied opened this issue Dec 13, 2024 · 0 comments · May be fixed by #30415
Assignees
Labels
in:Web Components release bug This bug is present in a released version of Open Liberty team:Sirius

Comments

@volosied
Copy link
Member

volosied commented Dec 13, 2024

Describe the bug
No default tag name is provided when creating a custom component with @FacesComponent with createTag=true.

/index.xhtml at line 11 and column 28 <t:someComponent> Tag Library supports namespace: http://xmlns.jcp.org/jsf/component, but no tag was defined for name: someComponent

Stack trace will look similar to:

javax.faces.view.facelets.TagException: /index2.xhtml at line 11 and column 28 <t:dummyComponent> Tag Library supports namespace: http://xmlns.jcp.org/jsf/component, but no tag was defined for name: dummyComponent
	at org.apache.myfaces.view.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:300)
	at org.apache.myfaces.view.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:251)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
	at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)

Steps to Reproduce
As mentioned, create a component using @FacesComponent with createTag=true.

For example:

@FacesComponent(value = SomeComponent.COMPONENT_TYPE, createTag = true)
public class SomeComponent extends UIComponentBase {

Expected behavior
No exceptions should occur. Developer should be able to use a tag with the default name. The default name will be the component's class, but the first letter lowercase. SomeComponent use use the tag name: someComponent.

Diagnostic information:

  • OpenLiberty Version: All Versions
  • Affected feature(s) jsf-2.2
  • Java Version: N/A

Additional context
https://issues.apache.org/jira/browse/MYFACES-4117
Workaround is use specify a tag name: https://docs.oracle.com/javaee/7/api/javax/faces/component/FacesComponent.html#tagName--

@volosied volosied added in:Web Components release bug This bug is present in a released version of Open Liberty team:Sirius labels Dec 13, 2024
@volosied volosied self-assigned this Dec 13, 2024
@github-project-automation github-project-automation bot moved this to General Issues in Web Tier Team Dec 13, 2024
@volosied volosied linked a pull request Dec 14, 2024 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in:Web Components release bug This bug is present in a released version of Open Liberty team:Sirius
Projects
Status: General Issues
Development

Successfully merging a pull request may close this issue.

1 participant