Hi, I need to display a confirmation message to the user before submitting a 
form. It's pretty standard to use the code below when the message is known at 
the time of button or link construction. But what about when the message must 
be synthesized at the time of the button click? I've tried using a model, but 
that didn't help. I would appreciate any help.

Thanks,
Julian


@Override
protected IAjaxCallDecorator getAjaxCallDecorator()
{
return new AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator())
{
@Override
public CharSequence preDecorateScript(CharSequence script)
{
 return "if(!confirm('" + message
      + "')) return false;" + script; 
}
};
}


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to