本文整理了Java中org.apache.wicket.markup.html.form.Button.setEnabled()
方法的一些代码示例,展示了Button.setEnabled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setEnabled()
方法的具体详情如下:
包路径:org.apache.wicket.markup.html.form.Button
类名称:Button
方法名:setEnabled
暂无
代码示例来源:origin: org.jabylon/rest.ui
private Component buildAddNewLink(IModel<Project> model) {
Project project = model.getObject();
if (project.cdoState() == CDOState.NEW || project.cdoState() == CDOState.TRANSIENT) {
// it's a new project, we can't add anything yet
Button link = new Button("addNew");
link.setEnabled(false);
return link;
}
PageParameters parameters = WicketUtil.buildPageParametersFor(project);
parameters.add(SettingsPanel.QUERY_PARAM_CREATE, PropertiesPackage.Literals.PROJECT_VERSION.getName());
return new BookmarkablePageLink<Void>("addNew", SettingsPage.class, parameters);
}
代码示例来源:origin: org.jabylon/rest.ui
private Component buildAddNewLink(IModel<UserManagement> model) {
PageParameters params = new PageParameters();
UserManagement project = model.getObject();
if (project.cdoState() == CDOState.NEW || project.cdoState() == CDOState.TRANSIENT) {
// it's a new project, we can't add anything yet
Button link = new Button("addNew");
link.setEnabled(false);
return link;
}
params.set(0, "security");
params.add(SettingsPanel.QUERY_PARAM_CREATE, UsersPackage.Literals.USER.getName());
params.add(SettingsPanel.QUERY_PARAM_NAMESPACE, UsersPackage.eNS_URI);
return new BookmarkablePageLink<Void>("addNew", SettingsPage.class, params);
}
代码示例来源:origin: org.jabylon/rest.ui
private Component buildAddNewLink(IModel<UserManagement> model) {
PageParameters params = new PageParameters();
UserManagement project = model.getObject();
if (project.cdoState() == CDOState.NEW || project.cdoState() == CDOState.TRANSIENT) {
// it's a new project, we can't add anything yet
Button link = new Button("addNew");
link.setEnabled(false);
return link;
}
params.set(0, "security");
params.add(SettingsPanel.QUERY_PARAM_CREATE, UsersPackage.Literals.ROLE.getName());
params.add(SettingsPanel.QUERY_PARAM_NAMESPACE, UsersPackage.eNS_URI);
return new BookmarkablePageLink<Void>("addNew", SettingsPage.class, params);
}
代码示例来源:origin: org.jabylon/rest.ui
private Component buildAddNewLink(IModel<UserManagement> model) {
PageParameters params = new PageParameters();
UserManagement project = model.getObject();
if (project.cdoState() == CDOState.NEW || project.cdoState() == CDOState.TRANSIENT) {
// it's a new project, we can't add anything yet
Button link = new Button("addNew");
link.setEnabled(false);
return link;
}
params.set(0, "security");
params.add(SettingsPanel.QUERY_PARAM_CREATE, UsersPackage.Literals.ROLE.getName());
params.add(SettingsPanel.QUERY_PARAM_NAMESPACE, UsersPackage.eNS_URI);
return new BookmarkablePageLink<Void>("addNew", SettingsPage.class, params);
}
代码示例来源:origin: org.onehippo.jcr.console/hippo-jcr-console-api
protected Button decorate(Button button) {
button.setEnabled(enabled);
button.setVisible(visible);
if (getKeyType() != null) {
button.add(new InputBehavior(new KeyType[]{getKeyType()}, EventType.click));
}
return button;
}
代码示例来源:origin: org.onehippo.cms7/hippo-cms-api
protected Button decorate(Button button) {
button.setEnabled(enabled);
button.setVisible(visible);
if (getKeyType() != null) {
button.add(new InputBehavior(new KeyType[]{getKeyType()}, EventType.click) {
@Override
protected Boolean getDisable_in_input() {
return !getKeyType().equals(KeyType.Escape);
}
@Override
public void onRemove(final Component component) {
super.onRemove(component);
AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
if (target != null) {
target.appendJavaScript("if (window['shortcut']) { shortcut.remove('" + getKeyType().getKeyCode() + "'); }");
}
}
});
}
return button;
}
代码示例来源:origin: org.onehippo.jcr.console/hippo-jcr-console-api
public void setEnabled(boolean isset) {
enabled = isset;
if (button != null) {
button.setEnabled(isset);
if (ajax) {
AjaxRequestTarget target = AjaxRequestTarget.get();
if (target != null) {
if (!isset) {
renderAttribute(target, "disabled", "disabled");
} else {
target.appendJavascript("Wicket.$('" + button.getMarkupId() + "').removeAttribute('disabled')");
for (IBehavior behavior : button.getBehaviors()) {
ComponentTag tag = new ComponentTag("button", XmlTag.OPEN_CLOSE);
behavior.onComponentTag(button, tag);
for (Map.Entry<String, Object> entry : tag.getAttributes().entrySet()) {
renderAttribute(target, entry.getKey(), entry.getValue());
}
}
}
}
}
}
}
代码示例来源:origin: org.jabylon/updatecenter
button.add(new AttributeModifier("value", resource.getBundleId()));
button.add(new AttributeModifier("class", "btn btn-small"));
button.setEnabled(CHANGEABLE_STATE.contains(bundleState));
代码示例来源:origin: org.onehippo.cms7/hippo-cms-api
public void setEnabled(boolean isset) {
enabled = isset;
if (button != null && WebApplicationHelper.isPartOfPage(button)) {
button.setEnabled(isset);
if (ajax) {
AjaxRequestTarget target = RequestCycle.get().find(AjaxRequestTarget.class);
if (target != null) {
if (!isset) {
renderAttribute(target, "disabled", "disabled");
} else {
target.appendJavaScript("Wicket.$('" + button.getMarkupId() + "').removeAttribute('disabled')");
for (Behavior behavior : button.getBehaviors()) {
ComponentTag tag = new ComponentTag("button", XmlTag.TagType.OPEN_CLOSE);
behavior.onComponentTag(button, tag);
behavior.renderHead(button, target.getHeaderResponse());
for (Map.Entry<String, Object> entry : tag.getAttributes().entrySet()) {
renderAttribute(target, entry.getKey(), entry.getValue());
}
}
}
}
}
}
}
代码示例来源:origin: micromata/projectforge
button.setEnabled(false);
代码示例来源:origin: org.onehippo.cms7/hippo-addon-publication-workflow-frontend
open.setModel(new StringResourceModel("open", this, null));
if (editorMgr == null) {
open.setEnabled(false);
内容来源于网络,如有侵权,请联系作者删除!