p:confirmDialog on primefaces 2.1RC1

UI Components for JSF
timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

28 Jun 2010, 12:01

Hi
I'm currently trying primefaces 2.1RC, and it works nice. But just to remind you so that primefaces team won't miss this case:

Code: Select all

<p:commandButton value="Test" action="somePage.jsf">
	<p:confirmDialog message="Give me some confirmation" />
</p:commandButton>
The dialog didn't shown, while on primefaces 2.0.2 this works fine

Thanks
Primefaces = GOOD
Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

28 Jun 2010, 14:12

Hi,

p:confirmDialog is a standalone component. Define it outside of p:commandButton.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

29 Jun 2010, 02:37

Well, the code works on primefaces 2.0.2. Shouldn't primefaces 2.1 (even if it's still RC) adopt same concept?
Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

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

29 Jun 2010, 08:49

ConfirmDialog is not backward compatible in 2.1

timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

29 Jun 2010, 10:27

well then, i guess i have to re-code those confirmDialogs... thanks
Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

29 Jun 2010, 12:07

I try to re-code my previous 2.0.2 code

Code: Select all

<p:commandButton value="#{resources.global_cancel}" tabIndex="999"
	immediate="true" action="#{sellAdnimalBean.cancelSellAdnimal}" ajax="false">
	<p:confirmDialog message="#{resources_member.member_sell_confirmCancelSellAdnimal}"
		fixedCenter="true" severity="warn"
 yesLabel="#{resources.global_yes}"
		noLabel="#{resources.global_no}" modal="true" close="false" />
</p:commandButton>
to this

Code: Select all

<p:commandButton value="#{resources.global_cancel}" tabIndex="999"
	immediate="true" onclick="confirmation.show()" /> 
	
<p:confirmDialog widgetVar="confirmation"								message="#{resources_member.member_sell_confirmCancelSellAdnimal}"
	fixedCenter="true" severity="alert" modal="true">
	<p:commandButton value="#{resources.global_yes}" ajax="false"
		oncomplete="confirmation.hide()" immediate="true"
		action="#{sellAdnimalBean.cancelSellAdnimal}" />
	<p:commandButton value="#{resources.global_no}"
		onclick="confirmation.hide()" />
</p:confirmDialog>
while the backing bean action:

Code: Select all

	public String cancelSellAdnimal() {
		......

		return "/pages/member/sell_index.jsf";
	}

but it doesn't work. On 1st code (2.0.2), when I click "Yes" button, it will call the code and redirect page to sell_index.jsf, while on 2.1RC1 code, it didn't do anything

Any idea? thank you
Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

mkuthan
Posts: 10
Joined: 25 Jun 2010, 10:54

07 Jul 2010, 16:04

Have you created an issue in project bug tracker? I would like to track and vote for this bug.
JSF RI 2.0.3
PF 2.2.M1
Glassfish 3.0.1

timotius_pamungkas
Posts: 117
Joined: 19 May 2010, 03:50

08 Jul 2010, 03:33

Tomcat 7.0.25
Mojarra 2.1.6
Primefaces 3.1, 3.2
Firefox 10 and IE 7/IE 8

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

08 Jul 2010, 09:12

This is not a bug as dialog is appended to document's body, if you turn on ajax to true, it should work.

We'll look into this limitation with non-ajax submissions.

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

15 Jul 2010, 13:37

To give an update, I've changed dialog not to be appended to the document body, so it is located where it is defined now. You don't need to define a form inside a dialog now, your page description will be same as the generated dom. So it is fixed now, this will be available along with the release or tomorrow's nightly build.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests