We use a very simple confirm dialog for some of our buttons. I'm not
sure if this is what you are looking for (javascript provides very
limited default popup choices...), but it's at least a start:
<h:commandLink
onclick="if (!confirm('Are You Sure You Want To Delete?'))
return false;"
action="#{myAction.delete}">
...
</h:commandLink>
If you do use my example, make sure you leave in the "double-negative"
javascript logic. Don't return true, as you will skip the JSF lifecycle.
Regards,
Jeff Bischoff
Kenneth L Kurz & Assoc, Inc.
Joel Wilson wrote:
I'm not sure if what you are trying to do is possible. But a simpler way
to accomplish the same thing would be to use a Javascript prompt to ask
the question, and if they hit Yes/Ok then let the action go through.
If the information is available to your page (or List when using a
dataTable), you could have the question seem intelligent from the user's
perspective. Example 'Are you sure you want to remove "Don Pablos" from
the list restaurants of in the "Airport Area"'.
On Jun 5, 2006, at 2:05 PM, Lking wrote:
I'm needing a help of you guys.
How can I retrieve the last action executed? I'm just through a
business logical and sometimes it might open another screen displaying
a confirm message. At this point, I'd like when the user hits "Yes" to
execute the last action it was trying to.
Joel Wilson
Web Application Developer/Architect
D E V O T I O N <http://www.devotionmedia.com>
---------------------
Skype: Jesfrk7
Skype: 321.285.7470
Cell: 321.332.4654
Office: 407.677.8514
Fax: 407.677.8610
---------------------
1964 Howell Branch Road
Suite 102
Winter Park, Florida 32792
---------------------
Changing the world, one byte at a time . . .