dcalap
dcalap

Reputation: 1072

Conversation Scope not working with redirect

I'm working with JSF and PrettyFaces and I need to do the next thing. I have 4 buttons generated in an ui:repeat. Every commandButton sets an object in a Conversation Bean and then I have to navigate to another page and get the object that was set in the button clicked. It seems pretty simple but the problem is I need a PrettyFaces friendly URL in the browser.

Tests done:

It navigates correctly to the friendly URL but the conversation is not working because before I redirect I'm setting the object recived in the commandbutton action and when navigates this object in the conversation bean is null.

Any idea how to solve that?

Thanks in advance.

Upvotes: 1

Views: 1145

Answers (1)

LightGuard
LightGuard

Reputation: 5378

Looks like you're not adding the cid parameter to your redirects. That has to be passed via POST or query string in order for the conversation to continue. The value for that you can retrieve from an injected Conversation object.

Upvotes: 3

Related Questions