Index: src/main/java/org/chenillekit/tapestry/core/components/Button.java
===================================================================
--- src/main/java/org/chenillekit/tapestry/core/components/Button.java	(revision 594)
+++ src/main/java/org/chenillekit/tapestry/core/components/Button.java	(working copy)
@@ -28,6 +28,7 @@
 import org.apache.tapestry5.annotations.Parameter;
 import org.apache.tapestry5.annotations.SupportsInformalParameters;
 import org.apache.tapestry5.corelib.components.PageLink;
+import org.apache.tapestry5.ioc.Messages;
 import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.services.PageRenderLinkSource;
 
@@ -81,6 +82,12 @@
      */
     @Parameter(value = "prop:componentResources.id", defaultPrefix = BindingConstants.LITERAL)
     private String clientId;
+    
+    /**
+     * To ask for a confirmation or not
+     */
+    @Parameter(value = "literal:false")
+    private boolean confirm;
 
     /**
      * The context for the link (optional parameter). This list of values will
@@ -100,6 +107,9 @@
     
     @Inject
     private PageRenderLinkSource pageRenderResources;
+    
+    @Inject
+    private Messages messages;
 
     private String assignedClientId;
 
@@ -132,8 +142,13 @@
             	link = resources.createEventLink(event, contextArray);
             }
             
-            renderSupport.addScript("new Ck.ButtonEvent('%s', '%s');",
-                                    getClientId(), link.toAbsoluteURI());
+            String message = "";
+            
+            if (this.confirm)
+            	message = messages.format("ck-button-confirm-message", clientId);
+            
+            renderSupport.addScript("new Ck.ButtonEvent('%s', '%s', '%s');",
+                                    getClientId(), link.toAbsoluteURI(), message);
         }
 
         // Close the button tag
Index: src/main/resources/org/chenillekit/tapestry/core/components/Button.properties
===================================================================
--- src/main/resources/org/chenillekit/tapestry/core/components/Button.properties	(revision 0)
+++ src/main/resources/org/chenillekit/tapestry/core/components/Button.properties	(revision 0)
@@ -0,0 +1,2 @@
+#
+ck-button-confirm-message=You clicked %s, do you confirm the action?
\ No newline at end of file

Property changes on: src/main/resources/org/chenillekit/tapestry/core/components/Button.properties
___________________________________________________________________
Added: svn:keywords
   + Id

Index: src/main/resources/org/chenillekit/tapestry/core/components/Button_it.properties
===================================================================
--- src/main/resources/org/chenillekit/tapestry/core/components/Button_it.properties	(revision 0)
+++ src/main/resources/org/chenillekit/tapestry/core/components/Button_it.properties	(revision 0)
@@ -0,0 +1,2 @@
+#
+ck-button-confirm-message=Hai cliccato %s, confermi l'azione?
\ No newline at end of file

Property changes on: src/main/resources/org/chenillekit/tapestry/core/components/Button_it.properties
___________________________________________________________________
Added: svn:keywords
   + Id

Index: src/main/resources/org/chenillekit/tapestry/core/components/CkOnEvents.js
===================================================================
--- src/main/resources/org/chenillekit/tapestry/core/components/CkOnEvents.js	(revision 594)
+++ src/main/resources/org/chenillekit/tapestry/core/components/CkOnEvents.js	(working copy)
@@ -60,25 +60,29 @@
     }
 }
 
-
-Ck.ButtonEvent = Class.create();
-Ck.ButtonEvent.prototype =
+Ck.ButtonEvent = Class.create(
 {
-    initialize: function(elementId, requestUrl)
-    {
-        if (!$(elementId))
-            throw(elementId + " doesn't exist!");
+  initialize: function(elementId, requestUrl, confirmMessage)
+  {
+      if (!$(elementId))
+          throw(elementId + " doesn't exist!");
 
-        this.element = $(elementId);
-        this.requestUrl = requestUrl;
+      this.element = $(elementId);
+      this.requestUrl = requestUrl;
+      
+      this.confirmMessage = confirmMessage;
 
-        Event.observe(this.element, "click",
-                this.fireEvent.bind(this, this.element),
-                false);
-    },
-    fireEvent: function(myEvent)
-    {
-        document.location = this.requestUrl;
-        return false;
-    }
-}
\ No newline at end of file
+      Event.observe(this.element, "click",
+              this.fireEvent.bind(this),
+              false);
+  },
+  fireEvent: function(event)
+  {
+  	if (this.confirmMessage.length < 2 || confirm(this.confirmMessage))
+  		document.location = this.requestUrl;
+  	else
+  		event.stop();
+  		
+      return false;
+  }
+});
