本文整理汇总了Java中org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink.setOutputMarkupId方法的典型用法代码示例。如果您正苦于以下问题:Java AjaxSubmitLink.setOutputMarkupId方法的具体用法?Java AjaxSubmitLink.setOutputMarkupId怎么用?Java AjaxSubmitLink.setOutputMarkupId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink
的用法示例。
在下文中一共展示了AjaxSubmitLink.setOutputMarkupId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newShareToSelectedButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入方法依赖的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;
}
示例2: newDeleteSelectedButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入方法依赖的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;
}
示例3: addteamButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入方法依赖的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;
}
示例4: newDeleteSelectedButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入方法依赖的package包/类
private AjaxSubmitLink newDeleteSelectedButton(
final CheckGroup<TeamMembership> teamGroup) {
AjaxSubmitLink submitLink = new AjaxSubmitLink("deleteSelected") {
@Override
protected void onConfigure() {
super.onConfigure();
if (teamGroup.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) {
target.add(deleteConfirmationModal);
deleteConfirmationModal.appendShowDialogJavaScript(target);
}
};
submitLink.setOutputMarkupId(true);
return submitLink;
}
示例5: newDeleteSelectedButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入方法依赖的package包/类
private AjaxSubmitLink newDeleteSelectedButton(
final CheckGroup<User> userGroup) {
AjaxSubmitLink submitLink = new AjaxSubmitLink("deleteSelected") {
@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 = 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;
}
示例6: newDeleteSelectedButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入方法依赖的package包/类
private AjaxSubmitLink newDeleteSelectedButton(
final CheckGroup<Company> companyGroup) {
AjaxSubmitLink submitLink = new AjaxSubmitLink("deleteSelected") {
@Override
protected void onConfigure() {
super.onConfigure();
// only enabled if at least one user is selected
if (companyGroup.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;
}