本文整理了Java中org.apache.wicket.markup.html.form.CheckBox.setOutputMarkupId()
方法的一些代码示例,展示了CheckBox.setOutputMarkupId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CheckBox.setOutputMarkupId()
方法的具体详情如下:
包路径:org.apache.wicket.markup.html.form.CheckBox
类名称:CheckBox
方法名:setOutputMarkupId
暂无
代码示例来源:origin: micromata/projectforge
/**
* @see org.projectforge.web.wicket.flowlayout.ComponentWrapperPanel#getComponentOutputId()
*/
@Override
public String getComponentOutputId()
{
checkBox.setOutputMarkupId(true);
return checkBox.getMarkupId();
}
代码示例来源:origin: micromata/projectforge
/**
* @see org.projectforge.web.wicket.flowlayout.ComponentWrapperPanel#getComponentOutputId()
*/
@Override
public String getComponentOutputId()
{
checkBox.setOutputMarkupId(true);
return checkBox.getMarkupId();
}
代码示例来源:origin: de.alpharogroup/jaulp.wicket.components
/**
* Factory method for create a new {@link CheckBox}.
*
* @param id
* the id
* @param model
* the model
* @return the new {@link CheckBox}
*/
public static CheckBox newCheckBox(final String id, final IModel<Boolean> model)
{
final CheckBox checkBox = new CheckBox(id, model);
checkBox.setOutputMarkupId(true);
return checkBox;
}
代码示例来源:origin: de.alpharogroup/jaulp-wicket-components
/**
* Factory method for create a new {@link CheckBox}.
*
* @param id
* the id
* @param model
* the model
* @return the new {@link CheckBox}
*/
public static CheckBox newCheckBox(final String id, final IModel<Boolean> model)
{
final CheckBox checkBox = new CheckBox(id, model);
checkBox.setOutputMarkupId(true);
return checkBox;
}
代码示例来源:origin: stackoverflow.com
checkBox.setOutputMarkupId(true);
代码示例来源:origin: micromata/projectforge
/**
* @param id
* @param model
* @param labelString If null then a classic checkbox is used.
* @param wantOnSelectionChangedNotifications if true then wantOnSelectionChangedNotifications method returns true.
* @see CheckBox#wantOnSelectionChangedNotifications()
*/
public CheckBoxButton(final String id, final IModel<Boolean> model, final String labelString,
final boolean wantOnSelectionChangedNotifications)
{
super(id);
this.wantOnSelectionChangedNotifications = wantOnSelectionChangedNotifications;
checkBox = new CheckBox(WICKET_ID, model) {
@Override
public void onSelectionChanged(final Boolean newSelection)
{
CheckBoxButton.this.onSelectionChanged(newSelection);
}
@Override
protected boolean wantOnSelectionChangedNotifications()
{
return CheckBoxButton.this.wantOnSelectionChangedNotifications();
}
};
checkBox.setOutputMarkupId(true);
init(labelString);
labelContainer.add(checkBox);
}
代码示例来源:origin: org.geoserver.web/web-core
CheckBox selectAllCheckbox() {
CheckBox sa = new CheckBox("selectAll", new PropertyModel(this, "selectAllValue"));
sa.setOutputMarkupId(true);
sa.add(new AjaxFormComponentUpdatingBehavior("onclick") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
// select all the checkboxes
setSelection(selectAllValue);
// update table and the checkbox itself
target.addComponent(getComponent());
target.addComponent(listContainer);
// allow subclasses to play on this change as well
onSelectionUpdate(target);
}
});
return sa;
}
代码示例来源:origin: org.geoserver.web/gs-web-core
CheckBox selectAllCheckbox() {
CheckBox sa = new CheckBox("selectAll", new PropertyModel<Boolean>(this, "selectAllValue"));
sa.setOutputMarkupId(true);
sa.add(
new AjaxFormComponentUpdatingBehavior("click") {
private static final long serialVersionUID = 1154921156065269691L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
// select all the checkboxes
setSelection(selectAllValue);
// update table and the checkbox itself
target.add(getComponent());
target.add(listContainer);
// allow subclasses to play on this change as well
onSelectionUpdate(target);
}
});
return sa;
}
代码示例来源:origin: org.geoserver.web/web-core
protected CheckBox selectOneCheckbox(Item item) {
CheckBox cb = new CheckBox("selectItem", new SelectionModel(item.getIndex()));
cb.setOutputMarkupId(true);
cb.add(new AjaxFormComponentUpdatingBehavior("onclick") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
if(Boolean.FALSE.equals(getComponent().getDefaultModelObject())) {
selectAllValue = false;
target.addComponent(selectAll);
}
onSelectionUpdate(target);
}
});
return cb;
}
代码示例来源:origin: micromata/projectforge
/**
* @param id
* @param model
* @param labelString If null then a classic checkbox is used.
* @param wantOnSelectionChangedNotifications if true then wantOnSelectionChangedNotifications method returns true.
* @see CheckBox#wantOnSelectionChangedNotifications()
*/
public CheckBoxPanel(final String id, final IModel<Boolean> model, final String labelString,
final boolean wantOnSelectionChangedNotifications)
{
super(id);
this.parentContainer = new WebMarkupContainer("parent");
add(this.parentContainer);
this.wantOnSelectionChangedNotifications = wantOnSelectionChangedNotifications;
checkBox = new CheckBox(WICKET_ID, model) {
@Override
public void onSelectionChanged(final Boolean newSelection)
{
CheckBoxPanel.this.onSelectionChanged(newSelection);
}
@Override
protected boolean wantOnSelectionChangedNotifications()
{
return CheckBoxPanel.this.wantOnSelectionChangedNotifications();
}
};
checkBox.setOutputMarkupId(true);
this.parentContainer.add(checkBox);
init(labelString);
}
代码示例来源:origin: OrienteerBAP/Orienteer
public AbstractFilterPanel(String id, IModel<T> model, String filterId,
IModel<OProperty> propertyModel,
IVisualizer visualizer,
IFilterCriteriaManager manager, IModel<Boolean> join) {
super(id, model);
this.filterId = filterId;
this.propertyModel = propertyModel;
this.visualizer = visualizer;
this.joinModel = join;
this.manager = manager;
setOutputMarkupPlaceholderTag(true);
add(new Label("title", getTitle()));
CheckBox checkBox = new CheckBox("join", join);
checkBox.add(new AjaxFormSubmitBehavior("change") {});
checkBox.setOutputMarkupId(true);
add(checkBox);
add(new Label("joinTitle", new ResourceModel("widget.document.filter.join"))
.setOutputMarkupPlaceholderTag(true));
}
代码示例来源:origin: de.tudarmstadt.ukp.inception.app/inception-ui-kb
public BooleanLiteralValueEditor(String aId, IModel<KBStatement> aModel)
{
super(aId, CompoundPropertyModel.of(aModel));
value = new CheckBox("value");
value.setOutputMarkupId(true);
value.add(new LambdaAjaxFormComponentUpdatingBehavior("change", t -> t.add(getParent())));
add(value);
}
代码示例来源:origin: inception-project/inception
public BooleanLiteralValueEditor(String aId, IModel<KBStatement> aModel)
{
super(aId, CompoundPropertyModel.of(aModel));
value = new CheckBox("value");
value.setOutputMarkupId(true);
value.add(new LambdaAjaxFormComponentUpdatingBehavior("change", t -> t.add(getParent())));
add(value);
}
代码示例来源:origin: org.geoserver.web/gs-web-core
protected CheckBox selectOneCheckbox(Item<T> item) {
CheckBox cb = new CheckBox("selectItem", new SelectionModel(item.getIndex()));
cb.setOutputMarkupId(true);
cb.setVisible(selectable);
cb.add(
new AjaxFormComponentUpdatingBehavior("click") {
private static final long serialVersionUID = -2419184741329470638L;
@Override
protected void onUpdate(AjaxRequestTarget target) {
if (Boolean.FALSE.equals(getComponent().getDefaultModelObject())) {
selectAllValue = false;
target.add(selectAll);
}
onSelectionUpdate(target);
}
});
return cb;
}
代码示例来源:origin: org.geoserver.web/web-security
public UserGroupServicePanel(String id, IModel<T> model) {
super(id, model);
add(new PasswordEncoderChoice("passwordEncoderName").add(new OnChangeAjaxBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
if (recodeCheckBox.isVisible()) {
recodeCheckBox.setEnabled(true);
target.addComponent(recodeCheckBox);
}
}
}));
boolean canCreateStore=false;
SecurityUserGroupServiceConfig config = model.getObject();
try {
GeoServerUserGroupService s =
(GeoServerUserGroupService) Class.forName(config.getClassName()).newInstance();
canCreateStore=s.canCreateStore();
} catch (Exception e) {
// do nothing
}
recodeCheckBox= new CheckBox("recodeExistingPasswords", Model.of(false));
recodeCheckBox.setOutputMarkupId(true);
recodeCheckBox.setVisible(canCreateStore);
recodeCheckBox.setEnabled(false);
add(recodeCheckBox);
add(new PasswordPolicyChoice("passwordPolicyName"));
}
代码示例来源:origin: org.geoserver.web/web-sec-core
public UserGroupServicePanel(String id, IModel<T> model) {
super(id, model);
add(new PasswordEncoderChoice("passwordEncoderName").add(new OnChangeAjaxBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
if (recodeCheckBox.isVisible()) {
recodeCheckBox.setEnabled(true);
target.addComponent(recodeCheckBox);
}
}
}));
boolean canCreateStore=false;
SecurityUserGroupServiceConfig config = model.getObject();
try {
GeoServerUserGroupService s =
(GeoServerUserGroupService) Class.forName(config.getClassName()).newInstance();
canCreateStore=s.canCreateStore();
} catch (Exception e) {
// do nothing
}
recodeCheckBox= new CheckBox("recodeExistingPasswords", Model.of(false));
recodeCheckBox.setOutputMarkupId(true);
recodeCheckBox.setVisible(canCreateStore);
recodeCheckBox.setEnabled(false);
add(recodeCheckBox);
add(new PasswordPolicyChoice("passwordPolicyName"));
}
代码示例来源:origin: org.geoserver.web/gs-web-sec-core
public UserGroupServicePanel(String id, IModel<T> model) {
super(id, model);
add(
new PasswordEncoderChoice("passwordEncoderName")
.add(
new OnChangeAjaxBehavior() {
@Override
protected void onUpdate(AjaxRequestTarget target) {
if (recodeCheckBox.isVisible()) {
recodeCheckBox.setEnabled(true);
target.add(recodeCheckBox);
}
}
}));
boolean canCreateStore = false;
SecurityUserGroupServiceConfig config = model.getObject();
try {
GeoServerUserGroupService s =
(GeoServerUserGroupService) Class.forName(config.getClassName()).newInstance();
canCreateStore = s.canCreateStore();
} catch (Exception e) {
// do nothing
}
recodeCheckBox = new CheckBox("recodeExistingPasswords", Model.of(false));
recodeCheckBox.setOutputMarkupId(true);
recodeCheckBox.setVisible(canCreateStore);
recodeCheckBox.setEnabled(false);
add(recodeCheckBox);
add(new PasswordPolicyChoice("passwordPolicyName"));
}
代码示例来源:origin: org.artifactory/artifactory-web-common
protected void init() {
setType(Boolean.class);
super.add(ResourcePackage.forJavaScript(StyledCheckbox.class));
super.add(new CssClass("styled-checkbox"));
checkbox = new MyCheckBox("checkbox");
checkbox.setOutputMarkupId(true);
add(checkbox);
button = new CheckboxButton("button");
add(button);
}
代码示例来源:origin: org.onehippo.cms7/hippo-addon-hst-configuration-editor-frontend
private void addHstRepositoryBasedMenuConfiguration() {
CheckBox repositoryBased = new CheckBox("repobased");
repositoryBased.setOutputMarkupId(true);
repositoryBased.setEnabled(!getLockInfo().isLocked());
form.add(repositoryBased);
CheckBox foldersOnly = new CheckBox("foldersOnly");
foldersOnly.setOutputMarkupId(true);
foldersOnly.setEnabled(!getLockInfo().isLocked());
form.add(foldersOnly);
TextField depth = new TextField("depth");
depth.setOutputMarkupId(true);
depth.add(new RangeValidator(0l, null));
depth.setEnabled(!getLockInfo().isLocked());
form.add(depth);
}
代码示例来源:origin: theonedev/onedev
canCreateProjectsInput.setOutputMarkupId(true);
form.add(canCreateProjectsInput);
add(form);
内容来源于网络,如有侵权,请联系作者删除!