jakartaee / jakartaee/faces

Specify target facet name when inserting into composite component

Open
#631 21 comments 0 reactions 0 assignees View on GitHub
Component: Uncategorized Priority: Major Type: Improvement
Dominant language
Java
Stars
127
Forks
59
Avg merge
23h
Merged PRs (30d)
7

Description

As discussed on jsr-314-open...

As currently specified, composite:insertFacet's "name" attribute serves two purposes:

1\. It identifies the name of the facet on the containing composite component to insert.
2\. It identifies the name of the facet on the target component into which the facet is being inserted.

As a result, the name of the facet exposed by the composite component must match the name of the
facet on the implementation component into which the facet is being inserted. So, for example, if I
have a composite component as follows:
```



```
Everything is happy, since both the composite component and the h:panelGrid expose a "caption" facet.

However, if I want to define a composite component with two h:panelGrid components and two
captions:
```








```
I am out of luck, since I now have a mismatch between the composite component facet name and the
h:panelGrid facet name.

I think that we could/should solve this in one of two ways:

1\. Add an attribute to composite:insertFacet that allows a target facet name to be specified:
```

```
2\. Specify that the target facet name can be picked up from a wrapping tag:
```



```

#### Environment
Operating System: All
Platform: Macintosh
#### Affected Versions
[2.0]

Contributor guide

Open the contributing guide

Research direction

Start with the composite:insertFacet specification and the jsr-314-open discussion referenced in the issue. Compare the two proposed ways to distinguish the exposed facet name from the target facet name, then confirm the intended behavior for multiple panelGrid captions. Done means the chosen behavior is agreed and implemented or specified consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.