Questions tagged [conversation-scope]

The conversation scope is a bit like the traditional session scope in that it holds state associated with a user of the system, and spans multiple requests to the server. However, unlike the session scope, the conversation scope:

  • is demarcated explicitly by the application, and

  • holds state associated with a particular web browser tab in a JSF application (browsers tend to share domain cookies, and hence the session cookie, between tabs, so this is not the case for the session scope).

A conversation represents a task—a unit of work from the point of view of the user. The conversation context holds state associated with what the user is currently working on. If the user is doing multiple things at the same time, there are multiple conversations.

The conversation context is active during any JSF request. Most conversations are destroyed at the end of the request. If a conversation should hold state across multiple requests, it must be explicitly promoted to a long-running conversation.

For more about it : https://docs.jboss.org/weld/reference/1.0.1-Final/en-US/html/scopescontexts.html

89 questions
0
votes
1 answer

JSF/CDI: End Conversation after page renders?

I have a situation where I have a multi-step wizard rendered using JSF 2.2, and deployed on Wildfly 10/JBoss EAP. Our wizard exists within a CDI Conversation to maintain state across all of the pages. Once the last step of the wizard completes, a…
Shadowman
  • 11,150
  • 19
  • 100
  • 198
0
votes
0 answers
0
votes
1 answer

Hierarchical Application Context and Standard-Scopes and Custom-Scopes

my question is a little bit complicated :) I will try to explain my setup ... I have web-application, one web-spring-context with some singleton-, session-scoped beans, sometimes aop-proxies etc. normal stuff :) inside the app I create some…
0
votes
1 answer

@ConversationScoped Beans - conversaion ID not unique?

I am using a CDI bean with conversation scope. I start a new conversation in a action method of my bean like this: if (conversation.isTransient()) { conversation.begin(); logger.fine("start new conversation, id=" +…
Ralph
  • 4,500
  • 9
  • 48
  • 87
0
votes
0 answers

@ConversationScoped bean reconstructed during page-to-page navigation

I just found a strange behavior when I change from one page to another. I'm using CDI, Jsf 2.2 API 2.2.8, Omnifaces 2.2, Primefaces 5.2, wildfly 8.2. Most of the controllers and pages work as expected, but some of them, when I access the page, call…
Victor Bello
  • 493
  • 1
  • 8
  • 23
0
votes
1 answer

ConversationScope value not updated after conversation started

I have a jsf page that has 2 parts: a table displaying a list of records and a dialog to add a new record. I added some validation features but I can't get them to work properly. I need it to: 1) Validation error not appear the first time dialog…
0
votes
0 answers

#{javax.enterprise.context.conversation.id} is always empty

I'm using this expression on my template.xhtml But when I execute the code the output is always Conversation []. Why is no rendering the returning value for this…
0
votes
0 answers

CDI ConversationScope: End and begin with one request?

I am building a Java EE 7 webapp, running on a Glassfish 4.1 webserver, using JSF (Mojarra 2.2.6) and Primefaces 5.13. Right now I am having a problem with conversationScoped beans (CDI). What I want to do is: Choosing a customer using a primefaces…
user3218708
  • 55
  • 1
  • 1
  • 8
0
votes
1 answer

Why conversation Scope doesn't store the variable value and throws index out of bound

So, I have a form which basically makes a team
0
votes
1 answer

@ConversationScoped is spoiling the filtering and sorting options in form, @ViewScoped works fine

I'm working on a small course passing project, and I have a problem. The manager.xhtml is a JSF page, it is used to view the data from database, sort them, filter them, delete entries and edit those entries. When I'm using @ViewScoped in…
hc0re
  • 1,806
  • 2
  • 26
  • 61
0
votes
1 answer

JSF - t:saveState x @ConversationScope

About saving the state of JSF application on a temporary basis, without using session: An alternative is using t:saveState of Apache Tomahawk library; another more recent alternative is using CDI @ConversationScope. t:saveState x…
RicardoS
  • 2,088
  • 1
  • 21
  • 22
0
votes
1 answer

MyFaces CoDI - Conversations/WindowContext

Is there any possibility to switch between conversations or their contexts in MyFaces CoDI. My concrete use case for this is that I want to implement a kind history of CustomerBeans including a CustomerEntity. If one of the entry is selected the…
0
votes
1 answer

How to use ConversationScope with vaadin?

When using Vaadin 7.x with the CDI Addon, is it possible to use the Conversation scope (begin() and end() conversation within an UI or View? If so, where would I have to place the code to avoid side affects? Clarification: I am on JBoss EAP6.1 (7.2)…
Jan Galinski
  • 11,768
  • 8
  • 54
  • 77
0
votes
1 answer

CDI Conversation without ending

In my JSF project I have a multi page wizard. I am using a @ConversationScoped CDI bean for that wizard. The conversation works well. When user comes to the first page of the wizard, new conversation begins. When user clicks a submit button in any…
prageeth
  • 7,159
  • 7
  • 44
  • 72
0
votes
1 answer

How do I get a ConversationScoped CDI bean from inside a Filter?

Getting a @SessionScoped CDI bean from inside a Filter is relatively easy. But trying to inject a @ConversationScoped bean throws the following error: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type…
rluba
  • 2,014
  • 2
  • 19
  • 26