jakartaee / jakartaee/faces

Setting/overriding components default value

Open
#1,602 17 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
127
Forks
59
Avg merge
23h
Merged PRs (30d)
7

Description

Based on https://github.com/primefaces/primefaces/issues/8325

There are different ways to set or override default values:
- https://primefaces.github.io/primefaces/11_0_0/#/core/globalattributes
- facelet tag/composite
- create your own custom tag

But they're slightly too verbose in my opinion. What about using a file (faces-config.xml?) allowing to define default values for component attributes?

For example, PF has `OutputPanel` component and by default `OutputPanel#deferred` is false and I want it to be true instead

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the referenced issue #8325 and the global attributes documentation, then compare the existing facelet tag, composite, and custom-tag approaches. Investigate whether faces-config.xml is the appropriate configuration point for component defaults, using OutputPanel#deferred as the example. Done should include an agreed configuration design and documented behavior for overriding the default.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.