simple p:confirmDialog closes without clicking any button !

UI Components for JSF
Post Reply
sebastianovide
Posts: 90
Joined: 19 Dec 2010, 17:08

16 Feb 2011, 18:48

Hi All,

just creating a simple p:confirmDialog as from the user guide but for some reason it closes for it self as soon as it opens... without clicking any button..

any ideas ?

thanks

glister
Posts: 64
Joined: 19 Jan 2010, 11:39

17 Feb 2011, 09:33

Hi sebastianovide,

i had the same phenomenon. I added a ajax="true" attribut and it was fine :)

Maybe this could help without seeing any source.

Regards
PrimeFaces version:
using Primefaces 5.2.11 on a Glassfish v4.1 Server

Additional Libraries:
using PrimeFaces Extensions 3.2
using OmniFaces 2.1

Additional Books:
PrimeFaces Cookbook

sebastianovide
Posts: 90
Joined: 19 Dec 2010, 17:08

17 Feb 2011, 12:07

ok. it looks like I'm not using the component correctly...

Code: Select all

<h:commandLink action="#{coverholderController.doDeleteCoverholder(coverholder.id)}" onclick="deleteConfirmation.show()" >Delete</h:commandLink>
clicking the link, it goes straight into that action ignoring the DialogBox (I was expecting some behaviour similar to a onClick using some simple javascript DialogBox... )

Basically I have a table and I'm adding a delete link to each row. Of course I'd like to have a confirmation before deleting it so I'm trying to use the Confirm Dialog component. In the examples (user guide and showcase) the action is hardcoded in the dialog, that means that I should create one confirmation dialog for each action... that is not ideal...

any other way to parametrize the ConfirmDialog ?


voyagerx
Posts: 70
Joined: 10 Feb 2011, 03:52

17 Feb 2011, 20:25

I had the same issue, I used oncomplete instead of onclick and it worked for me. Never figured out why the other didn't work.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 63 guests