Enhance conversation handling
- Dominant language
- Java
- Stars
- 127
- Forks
- 59
- Avg merge
- 23h
- Merged PRs (30d)
- 7
Description
During a process flow, using @ConversationScoped beans, sometime it is useful to start a new (second, third, ...) conversation.
Using the standard postback navigation, JSF always injects the same conversation instance.
One approach to force a fresh conversation is to use instead of
Since the outcome of link is computed whilst rendering the page, navigation is static.
commandLink on the other hand allows to compute the navigation on click.
I propose these enhancements:
```
```
With this optional argument JSF does not inject the existing instance of a session but a fresh one.
```
```
This renders a link without target ... and an onclick handler.
The handler's duty is to perform a partial request, retrieve the result of bean.navigationFunction (return value is String) and then perform a get navigation, e.g. by window.location.href = navOutcome;
#### Affected Versions
[2.3]
Contributor guide
Research direction
Start by reviewing the JSF h:commandLink and h:link entry points, then trace how postback navigation and @ConversationScoped bean injection currently work. Compare the proposed createConversation and lazyCalculation behaviors with existing navigation semantics, and define tests for fresh conversation creation and deferred link navigation before implementation.
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
- 25/100