File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes display confirmation box before deleting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "display confirmation box before deleting " Watch "display confirmation box before deleting " New topic

display confirmation box before deleting

Suresh Khant
Ranch Hand

Joined: Feb 27, 2010
Posts: 118
Hi All,

I have jsf page which lists the users , and i have delete button (which deletes the user corresponding to it) , it is working fine , but i want to make confirmation before deleting the user

is there any way to implement that using javascript or richfaces component ....etc

here is the part of the code

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15961

Yes there is. And although I am really beginning to hate JavaScript for any sort of serious work, this is one case where I recommend it.

On the commandButton:

This works with plain JSF with no read for any extended capabilities so there's no need to use a4j. In fact, this works for basic HTML even without JSF.

If you code an onclick handler on a submit button (or equivalent), the submit will be cancelled if the event handler returns false.

Customer surveys are for companies who didn't pay proper attention to begin with.
jQuery in Action, 2nd edition
subject: display confirmation box before deleting
Similar Threads
Header, Footer with dynamic data
Skinning issue in Richfaces 4 and JSF 2
Control the execution order in jsf
jsf + richfaces modal panel problem
Target component for id pan not found