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

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

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

Button.setMarkupId介绍

暂无

代码示例

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

private Button createDeleteButton()
{
 final Button deleteButton = new Button("deleteButton");
 deleteButton.add(new AjaxEventBehavior("click")
 {
  @Override
  protected void onEvent(AjaxRequestTarget target)
  {
   // open dialog only if an attr row is selected
   if (selectedAttrRowModel.getObject() != null) {
    deleteDialog.open(target);
   }
  }
 });
 deleteButton.setMarkupId(attrGroup.getName() + "-deleteButton").setOutputMarkupId(true);
 return deleteButton;
}

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

private Button createAddButton()
{
 final Button addButton = new Button("addButton");
 addButton.add(new AjaxEventBehavior("click")
 {
  @Override
  protected void onEvent(AjaxRequestTarget target)
  {
   if (!isDirty) {
    addAndSelectNewEntry();
    updateChoicesOfDateDropDown(false);
    container.addOrReplace(createContentWithDatepicker());
    target.add(container);
    // a new attr row must be dirty because it is new and must be saved
    isDirty = true;
   } else {
    // this indicates that the add button was clicked in onBeforeRender
    newSelectedAttrRow = null;
    saveChangesDialog.open(target);
   }
  }
 });
 addButton.setMarkupId(attrGroup.getName() + "-addButton").setOutputMarkupId(true);
 return addButton;
}

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

markAsDeletedButton.setMarkupId("markAsDeleted").setOutputMarkupId(true);
markAsDeletedButton.add(AttributeModifier.replace("onclick", "return showDeleteQuestionDialog();"));
markAsDeletedButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), markAsDeletedButton,
updateButton.setMarkupId("update").setOutputMarkupId(true);
updateButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), updateButton, getString("update"));
actionButtons.add(updateButtonPanel);
updateAndStayButton.setMarkupId(UPDATE_AND_STAY_BUTTON_MARKUP_ID).setOutputMarkupId(true);
updateAndNextButton.setMarkupId("updateAndNext").setOutputMarkupId(true);
updateAndNextButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), updateAndNextButton,
  getString("updateAndNext"));
createButton.setMarkupId("create").setOutputMarkupId(true);
undeleteButton.setMarkupId("undelete").setOutputMarkupId(true);

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

public static void createLastLoginAndDeleteAllStayLogins(final GridBuilder gridBuilder, final PFUserDO user,
  final UserService userService,
  final Form<?> form)
{
 // Last login and deleteAllStayLoggedInSessions
 final FieldsetPanel fs = gridBuilder.newFieldset(gridBuilder.getString("login.lastLogin"))
   .suppressLabelForWarning();
 fs.add(new DivTextPanel(fs.newChildId(), DateTimeFormatter.instance().getFormattedDateTime(user.getLastLogin())));
 @SuppressWarnings("serial")
 final Button button = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("invalidateStayLoggedInSessions"))
 {
  @Override
  public final void onSubmit()
  {
   userService.renewStayLoggedInKey(user.getId());
   form.error(getString("login.stayLoggedIn.invalidateAllStayLoggedInSessions.successfullDeleted"));
  }
 };
 button.setMarkupId("invalidateStayLoggedInSessions").setOutputMarkupId(true);
 fs.add(new SingleButtonPanel(fs.newChildId(), button,
   gridBuilder.getString("login.stayLoggedIn.invalidateAllStayLoggedInSessions"),
   SingleButtonPanel.DANGER));
 WicketUtils.addTooltip(button,
   gridBuilder.getString("login.stayLoggedIn.invalidateAllStayLoggedInSessions.tooltip"));
}

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

finishButton.setMarkupId("finishEvent").setOutputMarkupId(true);
finishButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), finishButton, getString("plugins.ffp.finishEvent"),
  SingleButtonPanel.SUCCESS);

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

loginButton.setMarkupId("loginButton").setOutputMarkupId(true);
setDefaultButton(loginButton);
add(new SingleButtonPanel("loginButton", loginButton, getString("login"), SingleButtonPanel.DEFAULT_SUBMIT));

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

finishButton.setMarkupId("finish").setOutputMarkupId(true);
final SingleButtonPanel finishButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), finishButton,
  getString("administration.setup.finish"), SingleButtonPanel.DEFAULT_SUBMIT);

相关文章