org.apache.wicket.markup.html.form.Button.add()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(169)

本文整理了Java中org.apache.wicket.markup.html.form.Button.add()方法的一些代码示例,展示了Button.add()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.add()方法的具体详情如下:
包路径:org.apache.wicket.markup.html.form.Button
类名称:Button
方法名:add

Button.add介绍

暂无

代码示例

代码示例来源:origin: org.opensingular/singular-form-wicket

private Button buildModelTrigger() {
  final Button modalTrigger = new Button(MODAL_TRIGGER_ID);
  modalTrigger.add(new AjaxEventBehavior("click") {
    @Override
    protected void onEvent(AjaxRequestTarget target) {
      target.add(ctx.getExternalContainer());
      getModal().show(target);
    }
  });
  return modalTrigger;
}

代码示例来源:origin: org.opensingular/form-wicket

private Button buildModelTrigger() {
  final Button modalTrigger = new Button(MODAL_TRIGGER_ID);
  modalTrigger.add(new AjaxEventBehavior("click") {
    @Override
    protected void onEvent(AjaxRequestTarget target) {
      modal.show(target);
    }
  });
  return modalTrigger;
}

代码示例来源:origin: micromata/projectforge

/**
 * @param attributeName
 * @param value
 * @return this for chaining.
 * @see AttributeModifier#append(String, java.io.Serializable)
 */
public IconButtonPanel oldAppendAttribute(final String attributeName, final Serializable value)
{
 button.add(AttributeModifier.append(attributeName, value));
 return this;
}

代码示例来源:origin: micromata/projectforge

public void setNonSubmitButton()
{
 button.add(AttributeModifier.replace("type", "button"));
}

代码示例来源:origin: micromata/projectforge

public ButtonPanel(final String id, final String title, final Button button, final ButtonType... buttonTypes)
{
 super(id);
 this.button = button;
 button.add(new Label("title", title));
 for (final ButtonType buttonType : buttonTypes) {
  button.add(AttributeModifier.append("class", buttonType.getClassAttrValue()));
 }
 add(button);
}

代码示例来源:origin: micromata/projectforge

public ButtonPanel(final String id, final String label, final ButtonType... buttonTypes)
{
 super(id);
 button = new Button(BUTTON_ID, new Model<String>(label));
 button.add(new Label("title", label));
 for (final ButtonType buttonType : buttonTypes) {
  button.add(AttributeModifier.append("class", buttonType.getClassAttrValue()));
 }
 add(button);
}

代码示例来源:origin: micromata/projectforge

/**
 * @param classnames css class names
 * @return this for chaining.
 */
public SingleButtonPanel setClassnames(final String... classnames)
{
 if (classnames != null) {
  button.add(AttributeModifier.append("class", StringHelper.listToString(" ", classnames)));
 }
 return this;
}

代码示例来源:origin: org.opensingular/singular-wicket-utils

/**
 * Popula cada botão
 *
 * @param item o container do botao atual
 */
private void populateButton(ListItem<ButtonMetadata> item) {
  ButtonMetadata buttonMetadata = item.getModelObject();
  item.add(buttonMetadata.buttonFactory.apply("button").add(new Label("button-label", buttonMetadata.label)));
}

代码示例来源:origin: org.opensingular/wicket-utils

/**
 * Popula cada botão
 *
 * @param item o container do botao atual
 */
private void populateButton(ListItem<ButtonMetadata> item) {
  ButtonMetadata buttonMetadata = item.getModelObject();
  item.add(buttonMetadata.buttonFactory.apply("button").add(new Label("button-label", buttonMetadata.label)));
}

代码示例来源:origin: micromata/projectforge

private void init(final IconType type, final String tooltip)
{
 icon = new WebMarkupContainer("icon");
 button.add(icon);
 button.add(new Label("text").setVisible(false));
 icon.add(AttributeModifier.append("class", type.getClassAttrValue()));
 if (tooltip != null) {
  WicketUtils.addTooltip(button, tooltip);
 }
}

代码示例来源:origin: org.onehippo.cms7/hippo-cms-api

@Override
  protected void populateItem(ListItem<ButtonWrapper> item) {
    final Button button = item.getModelObject().getButton();
    if (StringUtils.isNotEmpty(buttonCssClass)) {
      button.add(CssClass.append(buttonCssClass));
    }
    item.add(button);
  }
};

代码示例来源:origin: org.opensingular/singular-studio-core

@Override
  protected void populateItem(ListItem<ButtonFactory> item) {
    ButtonFactory buttonFactory = item.getModelObject();
    Button        button        = buttonFactory.make("button", (IModel<SInstance>) singularFormPanel.getInstanceModel());
    button.add(new Label("label", buttonFactory.getLabel()));
    item.add(button);
  }
};

代码示例来源:origin: org.opensingular/singular-wicket-utils

@Override
protected void onInitialize() {
  super.onInitialize();
  add(dropdownButton.add(dropdownButtonLabel.setDefaultModel(dropdownLabel)));
  add(dropdownMenu.add(buttons));
  buttons.setList(buttonsMetadata.getObject());
  if (pullRight.getObject()) {
    dropdownMenu.add(Shortcuts.$b.attrAppender("class", "pull-right", " "));
  }
}

代码示例来源:origin: org.opensingular/wicket-utils

@Override
protected void onInitialize() {
  super.onInitialize();
  add(dropdownButton.add(dropdownButtonLabel.setDefaultModel(dropdownLabel)));
  add(dropdownMenu.add(buttons));
  buttons.setList(buttonsMetadata.getObject());
  if (pullRight.getObject()) {
    dropdownMenu.add(Shortcuts.$b.attrAppender("class", "pull-right", " "));
  }
}

代码示例来源: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: ops4j/org.ops4j.pax.wicket

public Homepage() {
    // Wiquery Example
    final Dialog dialog = new Dialog("dialog");
    add(dialog);
    Button button = new Button("open-dialog");
    button.add(new WiQueryEventBehavior(new Event(MouseEvent.DBLCLICK) {
      @Override
      public JsScope callback() {
        return JsScope.quickScope(dialog.open().render());
      }
    }));
    add(button);
  }
}

代码示例来源:origin: org.opensingular/wicket-utils

public BSModalBorder addButton(ButtonStyle style, IModel<String> label, Button button) {
  if (label != null) {
    button.setLabel(label);
  }
  buttonsContainer.addOrReplace(button
      .add(newButtonLabel(BUTTON_LABEL, button))
      .add(new AttributeAppender("class", style.cssClassModel(), " ")));
  return this;
}

代码示例来源:origin: org.opensingular/singular-wicket-utils

public BSModalBorder addButton(ButtonStyle style, IModel<String> label, Button button) {
  if (label != null) {
    button.setLabel(label);
  }
  buttonsContainer.addOrReplace(button
      .add(newButtonLabel(BUTTON_LABEL, button))
      .add(new AttributeAppender("class", style.cssClassModel(), " ")));
  return this;
}

代码示例来源:origin: de.alpharogroup/jaulp.wicket.components

/**
 * Inits the component.
 */
protected void initComponent()
{
  addOrReplace(form = newForm("form", getModel()));
  form.addOrReplace(signupPanel = newSignupPanel("signupPanel", getModel()));
  form.addOrReplace(submitButton = newButton("signupButton"));
  submitButton.add(
    buttonLabel = newButtonLabel("buttonLabel", "global.button.sign.up.label", "Sign up"));
  form.add(submitButton);
  form.add(new EqualPasswordInputValidator(signupPanel.getSigninPanel().getPassword().getPasswordTextField(), signupPanel.getRepeatPassword().getPasswordTextField()));
}

代码示例来源:origin: de.alpharogroup/jaulp-wicket-components

/**
 * Inits the component.
 */
protected void initComponent()
{
  addOrReplace(form = newForm("form", getModel()));
  form.addOrReplace(signupPanel = newSignupPanel("signupPanel", getModel()));
  form.addOrReplace(submitButton = newButton("signupButton"));
  submitButton.add(
    buttonLabel = newButtonLabel("buttonLabel", "global.button.sign.up.label", "Sign up"));
  form.add(submitButton);
  form.add(new EqualPasswordInputValidator(
    signupPanel.getSigninPanel().getPassword().getPasswordTextField(),
    signupPanel.getRepeatPassword().getPasswordTextField()));
}

相关文章