本文整理汇总了Java中com.haulmont.cuba.gui.ComponentsHelper.getComponents方法的典型用法代码示例。如果您正苦于以下问题:Java ComponentsHelper.getComponents方法的具体用法?Java ComponentsHelper.getComponents怎么用?Java ComponentsHelper.getComponents使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.haulmont.cuba.gui.ComponentsHelper
的用法示例。
在下文中一共展示了ComponentsHelper.getComponents方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validateAll
import com.haulmont.cuba.gui.ComponentsHelper; //导入方法依赖的package包/类
@Override
public boolean validateAll() {
ValidationErrors errors = new ValidationErrors();
Collection<Component> components = ComponentsHelper.getComponents(this);
for (Component component : components) {
if (component instanceof Validatable) {
Validatable validatable = (Validatable) component;
if (validatable.isValidateOnCommit()) {
try {
validatable.validate();
} catch (ValidationException e) {
if (log.isTraceEnabled())
log.trace("Validation failed", e);
else if (log.isDebugEnabled())
log.debug("Validation failed: " + e);
ComponentsHelper.fillErrorMessages(validatable, e, errors);
}
}
}
}
return handleValidationErrors(errors);
}
示例2: validate
import com.haulmont.cuba.gui.ComponentsHelper; //导入方法依赖的package包/类
@Override
public void validate() throws ValidationException {
Collection<Component> components = ComponentsHelper.getComponents(this);
for (Component component : components) {
if (component instanceof Validatable) {
Component.Validatable validatable = (Component.Validatable) component;
if (validatable.isValidateOnCommit()) {
validatable.validate();
}
}
}
}
示例3: validate
import com.haulmont.cuba.gui.ComponentsHelper; //导入方法依赖的package包/类
public void validate() throws ValidationException {
Collection<Component> components = ComponentsHelper.getComponents(window);
for (Component component : components) {
if (component instanceof Component.Validatable) {
Component.Validatable validatable = (Component.Validatable) component;
if (validatable.isValidateOnCommit()) {
validatable.validate();
}
}
}
}
示例4: isValid
import com.haulmont.cuba.gui.ComponentsHelper; //导入方法依赖的package包/类
@Override
public boolean isValid() {
Collection<Component> components = ComponentsHelper.getComponents(this);
for (Component component : components) {
if (component instanceof Validatable) {
Component.Validatable validatable = (Component.Validatable) component;
if (validatable.isValidateOnCommit() && !validatable.isValid())
return false;
}
}
return true;
}
示例5: isValid
import com.haulmont.cuba.gui.ComponentsHelper; //导入方法依赖的package包/类
public boolean isValid() {
Collection<Component> components = ComponentsHelper.getComponents(window);
for (Component component : components) {
if (component instanceof Component.Validatable) {
Component.Validatable validatable = (Component.Validatable) component;
if (validatable.isValidateOnCommit() && !validatable.isValid())
return false;
}
}
return true;
}
示例6: getComponents
import com.haulmont.cuba.gui.ComponentsHelper; //导入方法依赖的package包/类
@Override
public Collection<Component> getComponents() {
return ComponentsHelper.getComponents(this);
}