com.vaadin.ui.Button.setComponentError()方法的使用及代码示例

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

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

Button.setComponentError介绍

暂无

代码示例

代码示例来源:origin: org.activiti/activiti-explorer

public void buttonClick(ClickEvent event) {
  fireEvent(new FormPropertiesEvent(FormPropertiesForm.this, FormPropertiesEvent.TYPE_CANCEL));
  submitFormButton.setComponentError(null);
 }
});

代码示例来源:origin: org.activiti/activiti-explorer

public void buttonClick(ClickEvent event) {
  // Extract the submitted values from the form. Throws exception when validation fails.
  try {
   Map<String, String> formProperties = formPropertiesComponent.getFormPropertyValues();
   fireEvent(new FormPropertiesEvent(FormPropertiesForm.this, FormPropertiesEvent.TYPE_SUBMIT, formProperties));
   submitFormButton.setComponentError(null);
  } catch(InvalidValueException ive) {
   // Error is presented to user by the form component
  }
 }
});

代码示例来源:origin: nz.co.senanque/madura-vaadin-touchkit

public void error(ErrorEvent event) {
  Throwable t = event.getThrowable();
  while (t != null)
  {
    if (t instanceof ValidationException)
    {
      ret.setComponentError(new UserError(((ValidationException)t).getMessage()));
    }
    t = t.getCause();
  }
  
}});

代码示例来源:origin: nz.co.senanque/madura-vaadin

@Override
public void error(ErrorEvent event) {
  Throwable t = event.getThrowable();
  while (t != null)
  {
    if (t instanceof ValidationException)
    {
      ret.setComponentError(new UserError(((ValidationException)t).getMessage()));
    }
    t = t.getCause();
  }
  
}});

代码示例来源:origin: org.apache.ace/org.apache.ace.webui.vaadin

public void buttonClick(ClickEvent event) {
    if (login((String) m_name.getValue(), (String) m_password.getValue())) {
      closeWindow();
    }
    else {
      // TODO provide some feedback, login failed, for now don't close the login window
      m_loginButton.setComponentError(new UserError("Invalid username or password."));
    }
  }
});

相关文章