/** * Factory method for create a new {@link CheckGroup}. This method is invoked in the constructor * from the derived classes and can be overridden so users can provide their own version of a * new {@link CheckGroup}. * * @param id * the id * @param model * the model * @return the new {@link CheckGroup} */ protected CheckGroup<T> newCheckGroup(final String id, final IModel<? extends Collection<T>> model) { final CheckGroup<T> checkGroup = ComponentFactory.newCheckGroup(id, model); checkGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() { /** The serialVersionUID. */ private static final long serialVersionUID = 1L; /** * {@inheritDoc} */ @Override protected void onUpdate(final AjaxRequestTarget target) { CheckGroupSelectorPanel.this.onUpdate(target); } }); return checkGroup; }
/** * Factory method for create a new {@link CheckGroup}. This method is invoked in the constructor * from the derived classes and can be overridden so users can provide their own version of a * new {@link CheckGroup}. * * @param id * the id * @param model * the model * @return the new {@link CheckGroup} */ protected CheckGroup<T> newCheckGroup(final String id, final IModel<? extends Collection<T>> model) { final CheckGroup<T> checkGroup = ComponentFactory.newCheckGroup(id, model); checkGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() { /** The serialVersionUID. */ private static final long serialVersionUID = 1L; /** * {@inheritDoc} */ @Override protected void onUpdate(final AjaxRequestTarget target) { CheckGroupSelectorPanel.this.onUpdate(target); } }); return checkGroup; }
/** * Instantiates a new {@link CheckGroupSelectorPanel}. * * @param id * the component id * @param model * the model */ public CheckGroupSelectorPanel(final String id, final IModel<CheckboxModelBean<T>> model) { super(id, model); add(form = newForm("form")); form.add( checkGroup = newCheckGroup("checkGroup", new PropertyModel<>(model, "selectedItems"))); checkGroup .add(checkGroupSelector = newCheckGroupSelector("checkGroupSelector", checkGroup)); checkGroup .add(checkGroupSelectorLabel = newCheckGroupSelectorLabel("checkGroupSelectorLabel", checkGroupSelector.getMarkupId(), Model.of("check/uncheck all"))); checkGroup.add(choices = newChoices("choices", model)); }
/** * Instantiates a new {@link CheckGroupSelectorPanel}. * * @param id * the component id * @param model * the model */ public CheckGroupSelectorPanel(final String id, final IModel<CheckboxModelBean<T>> model) { super(id, model); add(form = newForm("form")); form.add(checkGroup = newCheckGroup("checkGroup", new PropertyModel<>(model, "selectedItems"))); checkGroup .add(checkGroupSelector = newCheckGroupSelector("checkGroupSelector", checkGroup)); checkGroup.add(checkGroupSelectorLabel = newCheckGroupSelectorLabel( "checkGroupSelectorLabel", checkGroupSelector.getMarkupId(), Model.of("check/uncheck all"))); checkGroup.add(choices = newChoices("choices", model)); }
checkGroup.add(view);
checkGroup.add(view);
daysChecks.add(checksList);