本文整理汇总了Java中org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink类的典型用法代码示例。如果您正苦于以下问题:Java AjaxSubmitLink类的具体用法?Java AjaxSubmitLink怎么用?Java AjaxSubmitLink使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AjaxSubmitLink类属于org.apache.wicket.ajax.markup.html.form包,在下文中一共展示了AjaxSubmitLink类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addUrlForm
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入依赖的package包/类
private void addUrlForm() {
urlForm = new Form<SeedUrl>("urlForm", CompoundPropertyModel.of(Model
.of(new SeedUrl())));
urlForm.setOutputMarkupId(true);
urlForm.add(new TextField<String>("url"));
urlForm.add(new AjaxSubmitLink("addUrl", urlForm) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
addSeedUrl();
urlForm.setModelObject(new SeedUrl());
target.add(urlForm);
target.add(seedUrlsTable);
}
});
add(urlForm);
}
示例2: initLayout
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入依赖的package包/类
protected void initLayout(NonEmptyModel<Boolean> readOnlyModel) {
TextArea<String> description = new TextArea<>(ID_DESCRIPTION,
new PropertyModel<String>(getModel(), SearchFilterType.F_DESCRIPTION.getLocalPart()));
description.add(WebComponentUtil.enabledIfFalse(readOnlyModel));
add(description);
AceEditor clause = new AceEditor(ID_FILTER_CLAUSE, clauseStringModel);
clause.add(WebComponentUtil.enabledIfFalse(readOnlyModel));
add(clause);
AjaxSubmitLink update = new AjaxSubmitLink(ID_BUTTON_UPDATE) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
updateClausePerformed(target);
}
};
update.add(WebComponentUtil.visibleIfFalse(readOnlyModel));
add(update);
Label clauseTooltip = new Label(ID_T_CLAUSE);
clauseTooltip.add(new InfoTooltipBehavior());
add(clauseTooltip);
}
示例3: getSaveLink
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入依赖的package包/类
private AjaxSubmitLink getSaveLink() {
return new AjaxSubmitLink("save") {
@Override
public void onSubmit(AjaxRequestTarget target, Form form) {
Analysis analysis = AnalysisPanel.this.getModel().getObject();
analysisService.modifyAnalysis(analysis);
getSession().getFeedbackMessages().add(new FeedbackMessage(null, new StringResourceModel("Analysis.saved", null, new Object[] {analysis.getName()}).getString(), JGrowlAjaxBehavior.INFO_FADE));
setResponsePage(HomePage.class);
}
@Override
public boolean isVisible() {
if (dataProvider.isEmpty()) {
return false;
}
if (!SecurityUtil.hasPermission(securityService, PermissionUtil.getWrite(), getModelObject().getId())) {
return false;
}
return true;
}
};
}
示例4: onInitialize
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入依赖的package包/类
@Override
protected void onInitialize() {
super.onInitialize();
Form form1 = new Form("form1") {
@Override
protected void onSubmit() {
success("Success");
Session.get().invalidateNow();
}
};
form1.add(new FeedbackPanel("feedback", new ComponentFeedbackMessageFilter(form1)));
add(form1);
WebMarkupContainer c = new WebMarkupContainer("cont");
c.setOutputMarkupId(true);
Form form2 = new Form("form2");
form2.add(new FeedbackPanel("feedback", new ComponentFeedbackMessageFilter(form2)));
form2.add(new AjaxSubmitLink("submit") {
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
super.onSubmit(target, form);
form.success("Ajax success");
target.add(form2);
}
});
c.add(form2);
add(c);
}
示例5: 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;
}
示例6: newDeleteSelectedButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入依赖的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);
}
};
}
示例7: 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;
}
示例8: 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;
}
示例9: 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;
}
示例10: 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;
}
示例11: newDeleteSelectedButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入依赖的package包/类
/**
*
* @return
*/
private AjaxSubmitLink newDeleteSelectedButton(final CheckGroup<PlatformSettings> adapterGroup) {
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 (adapterGroup.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);
}
};
}
示例12: 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;
}
示例13: newDeleteSelectedButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入依赖的package包/类
/**
*
* @return
*/
private AjaxSubmitLink newDeleteSelectedButton(
final CheckGroup<AbstractHistoricValues> cubesGroup) {
return new AjaxSubmitLink("deleteSelected") {
private static final long serialVersionUID = 1526806233323350647L;
@Override
protected void onConfigure() {
super.onConfigure();
if (cubesGroup.getModelObject().isEmpty()) {
add(new CssClassNameAppender(Model.of("disabled")) {
private static final long serialVersionUID = -120425807017807645L;
// 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);
}
};
}
示例14: newDeleteSelectedButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入依赖的package包/类
/**
*
* @return
*/
private AjaxSubmitLink newDeleteSelectedButton(
final CheckGroup<AdapterSettings> adapterGroup) {
return new AjaxSubmitLink("deleteSelected") {
private static final long serialVersionUID = 1162060284069587067L;
@Override
protected void onConfigure() {
super.onConfigure();
// only enabled if at least one adapter is selected
if (adapterGroup.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);
}
};
}
示例15: newDeleteSelectedButton
import org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink; //导入依赖的package包/类
/**
*
* @return
*/
private AjaxSubmitLink newDeleteSelectedButton(
final CheckGroup<GitlabMetricMeasurement> gitlabGroup) {
return new AjaxSubmitLink("deleteSelected") {
@Override
protected void onConfigure() {
super.onConfigure();
// only enabled if at least one Product is selected
if (gitlabGroup.getModelObject().isEmpty()) {
add(new CssClassNameAppender(Model.of("disabled")) {
// 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);
}
};
}