本文整理汇总了Java中org.apache.wicket.markup.html.form.CheckGroup类的典型用法代码示例。如果您正苦于以下问题:Java CheckGroup类的具体用法?Java CheckGroup怎么用?Java CheckGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CheckGroup类属于org.apache.wicket.markup.html.form包,在下文中一共展示了CheckGroup类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newAdapterSettingsCheckGroup
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
/**
*
* @return
*/
private CheckGroup<PlatformSettings> newAdapterSettingsCheckGroup() {
CheckGroup<PlatformSettings> checkGroup = new CheckGroup<>("adapterGroup",
new ArrayList<PlatformSettings>());
checkGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
updateDeleteSelectedButton(target);
}
});
return checkGroup;
}
示例2: newDataCheckGroup
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
/**
*
* @return
*/
private CheckGroup<QMTreeNode> newDataCheckGroup() {
CheckGroup<QMTreeNode> checkGroup = new CheckGroup<>(
"dataGroup", new ArrayList<QMTreeNode>());
checkGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {
private static final long serialVersionUID = 7348039334236716476L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
// updateSaveSelectedButton(target);
}
});
return checkGroup;
}
示例3: newAdapterSettingsCheckGroup
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
/**
*
* @return
*/
private CheckGroup<AdapterSettings> newAdapterSettingsCheckGroup() {
CheckGroup<AdapterSettings> checkGroup = new CheckGroup<>(
"adapterGroup", new ArrayList<AdapterSettings>());
checkGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
updateDeleteSelectedButton(target);
}
});
return checkGroup;
}
示例4: newTestLinkCheckGroup
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
/**
*
* @return
*/
private CheckGroup<TestLinkMetricMeasurement> newTestLinkCheckGroup() {
CheckGroup<TestLinkMetricMeasurement> checkGroup = new CheckGroup<>(
"testLinkGroup", new ArrayList<TestLinkMetricMeasurement>());
checkGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {
/**
*
*/
private static final long serialVersionUID = 8883909411680723312L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
updateDeleteSelectedButton(target);
}
});
return checkGroup;
}
示例5: CheckTablePanel
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
public CheckTablePanel(String id, List<IColumn<T, String>> columns, ISortableDataProvider<T, String> provider, int rows) {
super(id);
group = new CheckGroup<T>("group", marked);
this.dataTable = new BaseTable<T>("table", createTableColumns(columns), provider, rows) {
@Override
protected Item<T> newRowItem(String s, int i, IModel<T> entityIModel) {
Item<T> item = super.newRowItem(s, i, entityIModel);
return newRowTableItem(entityIModel, item);
}
};
Form<T> form = new Form<T>("form");
group.add(dataTable);
form.add(group);
add(form);
}
示例6: getComponentsToDecorateWithCSS
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
private static List<? extends Component> getComponentsToDecorateWithCSS(FormComponent<?> formComponent) {
if (formComponent.getParent().getMetaData(FORM_GROUP) != null) {
return ImmutableList.of(formComponent.getParent());
} else if (formComponent instanceof RadioGroup) {
return collect(formComponent, Radio.class);
} else if (formComponent instanceof CheckGroup) {
return collect(formComponent, Check.class);
} else {
return ImmutableList.of(formComponent);
}
}
示例7: newShareToSelectedButton
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
private AjaxSubmitLink newShareToSelectedButton(
final CheckGroup<User> userGroup) {
AjaxSubmitLink submitLink = new AjaxSubmitLink("shareToSelected") {
@Override
protected void onConfigure() {
super.onConfigure();
// only enabled if at least one user is selected
if (userGroup.getModelObject().isEmpty()) {
add(new CssClassNameAppender(Model.of("disabled")) {
/**
*
*/
private static final long serialVersionUID = -3259529293647254883L;
// remove css class when component is rendered again
@Override
public boolean isTemporary(Component component) {
return true;
}
});
setEnabled(false);
} else {
setEnabled(true);
}
}
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
shareConfirmationModal.appendShowDialogJavaScript(target);
}
};
submitLink.setOutputMarkupId(true);
return submitLink;
}
示例8: newCheckGroup
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
private CheckGroup newCheckGroup() {
CheckGroup<User> checkGroup = new CheckGroup<>("userGroup", new ArrayList<User>());
checkGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
target.add(shareToSelectedButton);
}
});
return checkGroup;
}
示例9: newProductCheckGroup
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
/**
*
* @return
*/
private CheckGroup<Product> newProductCheckGroup() {
CheckGroup<Product> checkGroup = new CheckGroup<>(
"productGroup", new ArrayList<Product>());
checkGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {
private static final long serialVersionUID = -6392535303739708646L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
updateDeleteSelectedButton(target);
}
});
return checkGroup;
}
示例10: newDeleteSelectedButton
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
/**
*
* @param productGroup
* @return
*/
private AjaxSubmitLink newDeleteSelectedButton(
final CheckGroup<Product> productGroup) {
return new AjaxSubmitLink("deleteSelected") {
private static final long serialVersionUID = 1162060284069587067L;
@Override
protected void onConfigure() {
super.onConfigure();
// only enabled if at least one Product is selected
if (productGroup.getModelObject().isEmpty()) {
add(new CssClassNameAppender(Model.of("disabled")) {
private static final long serialVersionUID = 5588027455196328830L;
// remove css class when component is rendered again
@Override
public boolean isTemporary(Component component) {
return true;
}
});
setEnabled(false);
} else {
setEnabled(true);
}
}
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
deleteConfirmationModal.appendShowDialogJavaScript(target);
}
};
}
示例11: newCheckGroup
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
private CheckGroup<T> newCheckGroup() {
CheckGroup<T> group = new CheckGroup<>("checkGroup", new ArrayList<T>());
group.add(new AjaxFormChoiceComponentUpdatingBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
target.add(deleteSelectedButton);
}
});
return group;
}
示例12: newDeleteSelectedButton
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
private IndicatingAjaxButton newDeleteSelectedButton(
final CheckGroup<T> checkGroup) {
IndicatingAjaxButton submitLink = new IndicatingAjaxButton("deleteSelected") {
@Override
protected void onConfigure() {
super.onConfigure();
if (checkGroup.getModelObject().isEmpty()) {
add(new CssClassNameAppender(Model.of("disabled")) {
@Override
public boolean isTemporary(Component component) {
return true;
}
});
setEnabled(false);
} else {
setEnabled(true);
}
}
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
deleteConfirmationModal.message(getDeletionModalMessage());
target.add(deleteConfirmationModal);
deleteConfirmationModal.appendShowDialogJavaScript(target);
}
};
submitLink.setOutputMarkupId(true);
return submitLink;
}
示例13: newDeleteSelectedButton
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
private AjaxSubmitLink newDeleteSelectedButton(
final CheckGroup<Team> teamGroup) {
AjaxSubmitLink submitLink = new AjaxSubmitLink("deleteSelected") {
@Override
protected void onConfigure() {
super.onConfigure();
// only enabled if at least one user is selected
if (teamGroup.getModelObject().isEmpty()) {
add(new CssClassNameAppender(Model.of("disabled")) {
private static final long serialVersionUID = 5588027455196328830L;
// remove css class when component is rendered again
@Override
public boolean isTemporary(Component component) {
return true;
}
});
setEnabled(false);
} else {
setEnabled(true);
}
}
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
deleteConfirmationModal.appendShowDialogJavaScript(target);
}
};
submitLink.setOutputMarkupId(true);
return submitLink;
}
示例14: addteamButton
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
private AjaxSubmitLink addteamButton(
final CheckGroup<Team> teamGroup) {
AjaxSubmitLink submitLink = new AjaxSubmitLink("addSelected") {
@Override
protected void onConfigure() {
super.onConfigure();
// only enabled if at least one user is selected
if (!teamGroup.getModelObject().isEmpty() && project.getId() != null) {
setEnabled(true);
} else {
add(new CssClassNameAppender(Model.of("disabled")) {
private static final long serialVersionUID = 5588027455196328830L;
// remove css class when component is rendered again
@Override
public boolean isTemporary(Component component) {
return true;
}
});
setEnabled(false);
}
}
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
addConfirmationModal.appendShowDialogJavaScript(target);
}
};
submitLink.setOutputMarkupId(true);
return submitLink;
}
示例15: newCheckGroup
import org.apache.wicket.markup.html.form.CheckGroup; //导入依赖的package包/类
private CheckGroup newCheckGroup() {
CheckGroup<Team> checkGroup = new CheckGroup<>("teamGroup", new ArrayList<Team>());
checkGroup.add(new AjaxFormChoiceComponentUpdatingBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
target.add(deleteSelectedButton);
target.add(addSelectedButton);
}
});
return checkGroup;
}