<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Letting end-user confirm destructive actions</title>
	<link>http://blog.araneaframework.org/2008/02/21/letting-end-user-confirm-destructive-actions/</link>
	<description>News, comments and rants by the Aranea framework team.</description>
	<pubDate>Tue, 19 Aug 2008 22:25:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: Taimo Peelo</title>
		<link>http://blog.araneaframework.org/2008/02/21/letting-end-user-confirm-destructive-actions/#comment-6557</link>
		<author>Taimo Peelo</author>
		<pubDate>Thu, 28 Feb 2008 13:08:44 +0000</pubDate>
		<guid>http://blog.araneaframework.org/2008/02/21/letting-end-user-confirm-destructive-actions/#comment-6557</guid>
		<description>One will define the closure that gets executed when end-user confirms the action, the message user is presented with and call ConfirmationContext.confirm():

&lt;code&gt;class DropDataBaseClosure implements Closure, Serializable {
&#160;&#160;public void execute(Object obj) {
&#160;&#160;&#160;&#160;// drop database;
&#160;&#160;}
}&lt;/code&gt;

And one would register it:

&lt;code&gt;ConfirmationContext ctx = 
&#160;&#160;getEnvironment().requireEntry(ConfirmationContext.class);
ctx.confirm(new DropDataBaseClosure(), "Sure you want to drop database?");&lt;/code&gt;

You could also look at &lt;em&gt;CancelConfirmingTransitionHandler.doTransition()&lt;/em&gt; for an example.</description>
		<content:encoded><![CDATA[<p>One will define the closure that gets executed when end-user confirms the action, the message user is presented with and call ConfirmationContext.confirm():</p>
<p><code>class DropDataBaseClosure implements Closure, Serializable {<br />
&nbsp;&nbsp;public void execute(Object obj) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;// drop database;<br />
&nbsp;&nbsp;}<br />
}</code></p>
<p>And one would register it:</p>
<p><code>ConfirmationContext ctx =<br />
&nbsp;&nbsp;getEnvironment().requireEntry(ConfirmationContext.class);<br />
ctx.confirm(new DropDataBaseClosure(), "Sure you want to drop database?");</code></p>
<p>You could also look at <em>CancelConfirmingTransitionHandler.doTransition()</em> for an example.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anton</title>
		<link>http://blog.araneaframework.org/2008/02/21/letting-end-user-confirm-destructive-actions/#comment-6556</link>
		<author>Anton</author>
		<pubDate>Thu, 28 Feb 2008 12:40:16 +0000</pubDate>
		<guid>http://blog.araneaframework.org/2008/02/21/letting-end-user-confirm-destructive-actions/#comment-6556</guid>
		<description>Could you show an example on ConfirmationContext usage?</description>
		<content:encoded><![CDATA[<p>Could you show an example on ConfirmationContext usage?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
