本文整理了Java中org.apache.wicket.markup.html.form.Button.setOutputMarkupId()
方法的一些代码示例,展示了Button.setOutputMarkupId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setOutputMarkupId()
方法的具体详情如下:
包路径:org.apache.wicket.markup.html.form.Button
类名称:Button
方法名:setOutputMarkupId
暂无
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* Constructor without a model. Buttons without models leave the markup attribute
* "value". Provide a model if you want to set the button's label dynamically.
*
* @see org.apache.wicket.Component#Component(String)
*/
public Button(String id)
{
super(id);
setVersioned(true);
setOutputMarkupId(true);
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Constructor without a model. Buttons without models leave the markup attribute
* "value". Provide a model if you want to set the button's label dynamically.
*
* @see org.apache.wicket.Component#Component(String)
*/
public Button(String id)
{
super(id);
setVersioned(true);
setOutputMarkupId(true);
}
代码示例来源:origin: org.apache.wicket/com.springsource.org.apache.wicket
/**
* Constructor taking an model for rendering the 'label' of the button (the value attribute of
* the input/button tag). Use a {@link org.apache.wicket.model.StringResourceModel} for a
* localized value.
*
* @param id
* Component id
* @param model
* The model property is used to set the "value" attribute. It will thus be
* the label of the button that shows up for end users. If you want the attribute to
* keep it's markup attribute value, don't provide a model, or let it return an empty
* string.
*/
public Button(final String id, final IModel model)
{
super(id, model);
setVersioned(true);
setOutputMarkupId(true);
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* Constructor taking an model for rendering the 'label' of the button (the value attribute of
* the input/button tag). Use a {@link org.apache.wicket.model.StringResourceModel} for a
* localized value.
*
* @param id
* Component id
* @param model
* The model property is used to set the "value" attribute. It will thus be
* the label of the button that shows up for end users. If you want the attribute to
* keep it's markup attribute value, don't provide a model, or let it return an empty
* string.
*/
public Button(final String id, final IModel<String> model)
{
super(id, model);
setVersioned(true);
setOutputMarkupId(true);
}
代码示例来源:origin: org.apache.wicket/wicket-core
/**
* Constructor taking an model for rendering the 'label' of the button (the value attribute of
* the input/button tag). Use a {@link org.apache.wicket.model.StringResourceModel} for a
* localized value.
*
* @param id
* Component id
* @param model
* The model property is used to set the "value" attribute. It will thus be
* the label of the button that shows up for end users. If you want the attribute to
* keep it's markup attribute value, don't provide a model, or let it return an empty
* string.
*/
public Button(final String id, final IModel<String> model)
{
super(id, model);
setVersioned(true);
setOutputMarkupId(true);
// don't double encode the value. it is encoded by ComponentTag.writeOutput()
setEscapeModelStrings(false);
}
代码示例来源:origin: apache/wicket
/**
* Constructor taking an model for rendering the 'label' of the button (the value attribute of
* the input/button tag). Use a {@link org.apache.wicket.model.StringResourceModel} for a
* localized value.
*
* @param id
* Component id
* @param model
* The model property is used to set the "value" attribute. It will thus be
* the label of the button that shows up for end users. If you want the attribute to
* keep it's markup attribute value, don't provide a model, or let it return an empty
* string.
*/
public Button(final String id, final IModel<String> model)
{
super(id, model);
setVersioned(true);
setOutputMarkupId(true);
// don't double encode the value. it is encoded by ComponentTag.writeOutput()
setEscapeModelStrings(false);
}
代码示例来源:origin: net.ontopia/ontopoly-editor
button.setOutputMarkupId(true);
button.add(new AjaxFormComponentUpdatingBehavior("onclick") {
@Override
代码示例来源:origin: ontopia/ontopia
button.setOutputMarkupId(true);
button.add(new AjaxFormComponentUpdatingBehavior("onclick") {
@Override
代码示例来源:origin: micromata/projectforge
@Override
public void populateItem(Item<ICellPopulator<FFPDebtDO>> item, String componentId,
IModel<FFPDebtDO> rowModel)
{
FFPDebtDO debt = rowModel.getObject();
Button button = new Button(ButtonPanel.BUTTON_ID);
if (debt.getFrom().equals(ThreadLocalUserContext.getUser())) {
button.setOutputMarkupId(true);
button.add(new AjaxEventBehavior("click")
{
@Override
protected void onEvent(AjaxRequestTarget target)
{
if (debt.isApprovedByFrom() == false) {
eventService.updateDebtFrom(debt);
button.add(AttributeModifier.append("class", ButtonType.GREEN.getClassAttrValue()));
button.addOrReplace(new Label("title", I18nHelper.getLocalizedMessage("plugins.ffp.payed")));
target.add(button);
}
}
});
}
String label = debt.isApprovedByFrom() ?
I18nHelper.getLocalizedMessage("plugins.ffp.payed") :
I18nHelper.getLocalizedMessage("plugins.ffp.notPayed");
ButtonType bt = debt.isApprovedByFrom() ? ButtonType.GREEN : ButtonType.RED;
ButtonPanel buttonPanel = new ButtonPanel(componentId, label, button, bt);
item.add(buttonPanel);
}
代码示例来源:origin: micromata/projectforge
@Override
public void populateItem(Item<ICellPopulator<FFPDebtDO>> item, String componentId,
IModel<FFPDebtDO> rowModel)
{
FFPDebtDO debt = rowModel.getObject();
Button button = new Button(ButtonPanel.BUTTON_ID);
if (debt.isApprovedByFrom() && debt.getTo().equals(ThreadLocalUserContext.getUser())) {
button.setOutputMarkupId(true);
button.add(new AjaxEventBehavior("click")
{
@Override
protected void onEvent(AjaxRequestTarget target)
{
if (debt.isApprovedByTo() == false) {
eventService.updateDebtTo(debt);
button.add(AttributeModifier.append("class", ButtonType.GREEN.getClassAttrValue()));
button.addOrReplace(new Label("title", I18nHelper.getLocalizedMessage("plugins.ffp.approved")));
target.add(button);
}
}
});
}
String label = debt.isApprovedByTo() ?
I18nHelper.getLocalizedMessage("plugins.ffp.approved") :
I18nHelper.getLocalizedMessage("plugins.ffp.notApproved");
ButtonType bt = debt.isApprovedByTo() ? ButtonType.GREEN : ButtonType.RED;
ButtonPanel buttonPanel = new ButtonPanel(componentId, label, button, bt);
item.add(buttonPanel);
}
代码示例来源:origin: org.onehippo.cms7/hippo-cms-api
protected JQueryFileUploadDialog(final IPluginContext pluginContext, final IPluginConfig pluginConfig){
setOutputMarkupId(true);
setMultiPart(true);
setOkVisible(false);
setOkEnabled(false);
setCancelLabel(new ResourceModel("button-close-label"));
uploadButton = new AjaxButton(DialogConstants.BUTTON, new ResourceModel("button-upload-label")){
@Override
protected String getOnClickScript(){
return fileUploadWidget.getUploadScript();
}
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) {
isUploadButtonEnabled = false;
target.add(this);
}
@Override
public boolean isEnabled() {
return isUploadButtonEnabled;
}
};
uploadButton.add(new InputBehavior(new KeyType[]{KeyType.Enter}, EventType.click));
uploadButton.setOutputMarkupId(true);
this.addButton(uploadButton);
this.pluginContext = pluginContext;
this.pluginConfig = pluginConfig;
this.validator = getValidator();
createComponents();
}
内容来源于网络,如有侵权,请联系作者删除!