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

86 questions
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
  • 3,451
  • 6
  • 36
  • 62
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
  • 413
  • 1
  • 8
  • 20
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
  • 45
  • 1
  • 7
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…
dziki
  • 1,360
  • 1
  • 15
  • 38
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
  • 1,905
  • 1
  • 18
  • 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
  • 10,521
  • 7
  • 48
  • 68
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
  • 6,524
  • 7
  • 38
  • 66
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
  • 1,974
  • 2
  • 18
  • 26
0
votes
1 answer

Tapestry 4.1 conversation scope. Possible?

Is it somehow possible to use conversational scope in Tapestry 4.1 and Hivemind? Right now, if user opens same page in two different Tabs, then they use same model which is Injected by Hivemind. So if he submits some data in first page, then in fact…
siim
  • 178
  • 1
  • 6
0
votes
1 answer

JSF with CDI conversation scope bean continue coveersation in a popup window

I'm using cdi conversation scope bean with jsf, inside my jsf page I open a popup window , and I want to use the same conversation id as the parent window. How can I do that? when I open the popup window and enter the bean, it is a new bean so the…
user2046810
  • 343
  • 1
  • 8
  • 21
0
votes
1 answer

Declarative conversation management on GlassFish 3, Java EE

I'm relying on @ConversationScoped EntityManagers in one of my applications. However, I now need to access said EntityManagers from outside a conversation (Timer EJB). I read a tutorial on how to write an Interceptor which opens a new conversation…
chzbrgla
  • 5,007
  • 6
  • 36
  • 55