@Override protected void onBeforeRender() { super.onBeforeRender(); CheckGroup<?> group = getGroup(); // make sure the form we need outputs its markup id. group.getForm().setOutputMarkupId(true); }
@Override protected void onBeforeRender() { super.onBeforeRender(); CheckGroup<?> group = getGroup(); // make sure the form we need outputs its markup id. group.getForm().setOutputMarkupId(true); }
/** * Find all checkboxes in the containing form with the same input name as the {@link CheckGroup} * . */ @Override protected CharSequence getFindCheckboxesFunction() { CheckGroup<?> group = getGroup(); if (group == null) { throw new WicketRuntimeException( "CheckGroupSelector component [" + getPath() + "] cannot find its parent CheckGroup. All CheckGroupSelector components must be a child of or below in the hierarchy of a CheckGroup component."); } // we search the complete form because the CheckGroup might not output its markup tag or be // located on a <wicket:container> return String.format("Wicket.CheckboxSelector.findCheckboxesFunction('%s','%s')", group.getForm().getMarkupId(), group.getInputName()); } }
/** * Find all checkboxes in the containing form with the same input name as the {@link CheckGroup} * . */ @Override protected CharSequence getFindCheckboxesFunction() { CheckGroup<?> group = getGroup(); if (group == null) { throw new WicketRuntimeException( "CheckGroupSelector component [" + getPath() + "] cannot find its parent CheckGroup. All CheckGroupSelector components must be a child of or below in the hierarchy of a CheckGroup component."); } // we search the complete form because the CheckGroup might not output its markup tag or be // located on a <wicket:container> return String.format("Wicket.CheckboxSelector.findCheckboxesFunction('%s','%s')", group.getForm().getMarkupId(), group.getInputName()); } }