This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes JSF and the fly likes Display alert message for Delete Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » JSF
Bookmark "Display alert message for Delete" Watch "Display alert message for Delete" New topic
Author

Display alert message for Delete

Sam Saha
Ranch Hand

Joined: Jan 23, 2010
Posts: 104
I wanted to display two different java script alert messages from one Delete button.
When try to delete a person for Auto the message should be:
"Are you sure you would like to delete this Named Person for Auto?"
When try to delete a person for Hab the message should be:
"Are you sure you would like to delete this Named Person for Hab?"

Now it display the same message "Are you sure you would like to delete this Named Person for Auto?" for both Auto and Hab. But I wanted to split them for Auto and Hab.

I have a ternary condition like
value="#{pc_EndorseNamedPerson.habPolicy ? msg.habnamedPersonDel : msg.namedPersonDel}" which basically displays two different text in the Delete button for Auto and Hab. I wanted to use this same condition for java script alert message. But I am not really sure how to use this in java script function. I would appreciate if some body can help me how to use this ternary condition in java script method to display two different messages

JSP Code:



Java script function:

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62099
    
  67

Moved to the JSF forum. Please don't post JSF markup in the HTML forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display alert message for Delete