required attribute on cc:attribute and taglib.xml is not validated
- Dominant language
- Java
- Stars
- 127
- Forks
- 59
- Avg merge
- 23h
- Merged PRs (30d)
- 7
Description
Example composite interface:
```xml
```
Example custom tag in `*.taglib.xml`:
```xml
foo
true
```
The `required` flag does not cause any error when left unspecified in a composite or custom tag, even not in development stage. At least in Mojarra. Haven't yet checked MyFaces on this. Not terribly clear what exactly the spec says on this. It appears to be designed for tooling only (IDEs such as Eclipse). Work around for now: use a custom `` which invokes `getRequiredAttribute("foo");` in the constructor.
We should probably clarify Faces spec to explicitly validate them and throw something like a `TagAttributeException`, at least in `Development` stage.
WDYT?
cc: @tandraschko
Contributor guide
Research direction
Start by checking the Faces specification for the required attribute behavior and then inspect how Mojarra handles required="true" for composite interfaces and *.taglib.xml custom tags. Compare the behavior with MyFaces if available. Done would require an agreed validation rule and corresponding behavior, but the issue does not identify files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100