Jonas-21 wrote: > > I think if you add 'return false;' to your javascript, the button's > default click action (submitting > a form) isn't executed, so your DataTable doesn't get refreshed. > That's brilliant and works perfect. Thank you very much.
Here the working code: public class CheckGroupButtonSelectAll extends Button { public CheckGroupButtonSelectAll(String id) { super(id); setDefaultFormProcessing(false); } protected String getOnClickScript() { CheckGroup group = (CheckGroup) findParent(CheckGroup.class); return "var cb=this.form['" + group.getInputName() + "']; if (cb!=null) { if (!isNaN(cb.length)) { for(var i=0;i<cb.length;i++) { cb[i].checked=true; } } } return false;"; } } -- View this message in context: http://www.nabble.com/Select-CheckGroup-with-Button-instead-of-CheckGroupSelector-tp15039121p15042108.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]