jakartaee / jakartaee/faces

required attribute on cc:attribute and taglib.xml is not validated

Open
#1,904 4 comments 0 reactions 0 assignees View on GitHub
EE12 mojarra-implemented Spec
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.