This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

display confirmation box before deleting  RSS feed

 
Suresh Khant
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!