p:commandButton doesn't redirect now (only in SNAPSHOT ?)

UI Components for JSF
Post Reply
jmcollin92
Posts: 145
Joined: 05 Nov 2009, 22:32

29 Dec 2009, 14:37

Hi there,

My p:commandButton doesn't redirect to new page when controller returns "redirect:newpage". It was working well with 1.0.0-RC but don't work anymore when I switch to 1.0.0-SNAPSHOT version of Primefaces. I've tried to use primefaces-1.0.0.-RC and it works well with it.

When debugging with firebug, I've seen that HTTP 302 (redirect) is well send to navigator. So I guess the problem is client side.

Thank's...
----
Primefaces 2.0.1-SNAPSHOT
JBoss 6.0.0-M2
Mojorra 2.0.2
---

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

29 Dec 2009, 16:59

Hi, can you post the p:commandButton source.

jmcollin92
Posts: 145
Joined: 05 Nov 2009, 22:32

31 Dec 2009, 12:52

cagatay.civici wrote:Hi, can you post the p:commandButton source.
Sure, here it is :

Code: Select all

<p:commandButton id="pageDAccueilModifierAlerteAction" value="#{messages['modifier.alerte']}" action="#{controleurAccueil.pageDAccueilModifierAlerte}" async="false">
         </p:commandButton>
----
Primefaces 2.0.1-SNAPSHOT
JBoss 6.0.0-M2
Mojorra 2.0.2
---

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

04 Jan 2010, 15:18

We have done some changes lately, they're undocumented since it's not released yet. Async means ajax requests without queue. So to make non-ajax requests with button, set ajax to false.

Code: Select all

<p:commandButton id="pageDAccueilModifierAlerteAction" value="#{messages['modifier.alerte']}" action="#{controleurAccueil.pageDAccueilModifierAlerte}" ajax="false" />

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 25 guests