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

Revisit "Facelet Taglibrary <tag><component> must contain exactly one of <component-type>, <resource-id>, or <handler-class> #1362

Closed
eclipse-faces-bot opened this issue Feb 11, 2015 · 6 comments

Comments

@eclipse-faces-bot
Copy link

Part of the work for #599: compcomp via namespace+compname") includes this change:

The commit log message that made this change includes this text:

M jsf-api/doc/web-facelettaglibrary_2_2.xsd

Make it so a must have exactly one of ,
, or

Here is the rationale behind the above change: if you are going to specify a handler-class, it does not matter what the component-type is because the handler-class effectively can do whatever it wants to create the component. The component-type is only necessary if you want JSF to create the component for you.

Affected Versions

[2.2]

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by @edburns

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Issue-Links:
is related to
JAVASERVERFACES-3762

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
The reporter for JAVASERVERFACES-3762 wants this decision to be revisited in light of this comment:

Yes, I understand that you can do that, but here's why I feel this should be reverted:

  1. Requiring the component's handler-class to create the component-type couples them tightly together, removing the ability to re-use a handler-class for other components. I feel this fights against the original design, which encouraged the re-use of the 3 component parts: handler-class, component-type, and renderer-type.
  2. The most typical use case of specifying a handler-class for a custom component is to add MetaRuleset rules by overriding createMetaRuleset(). In this case, delegating the creation of the component to JSF is the desired functionality. Requiring every custom handler-class to also create the component requires developers to add unnecessary code.
  3. The current implementation in com.sun.faces.config.processor.FaceletTaglibConfigProcessor.java simply doesn't match the xsd. Currently, any of the following combinations can be defined in the taglib for a component:
    • handler-class (with optional component-type and/or renderer-type)
    • component-type (with optional renderer-type)
    • resource-id

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Marked as fixed on Monday, February 16th 2015, 10:24:30 am

@eclipse-faces-bot
Copy link
Author

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

@eclipse-faces-bot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant