Getting user confirmation commented on by Eelco Hillenius (Jan 09, 2007).

Comment:

make it a custom component like this:

 public class ConfirmLink extends Link {   public ConfirmLink(String id, String msg) {     super(id);
     add(new SimpleAttributeModifier("onclick", "return confirm('" + msg + "');"));
   } }  new ConfirmLink("removeLink", "are you sure?") {  public void onClick() {    ..  }}; 


Reply via email to