Package org.olat.core.gui.components.form.flexible.impl.rules

Examples of org.olat.core.gui.components.form.flexible.impl.rules.FormItemDependencyRuleImpl


    // Rule1: hide variant when country is empty
    Set<FormItem> hideItems = new HashSet<FormItem>();
    RulesFactory.createHideRule(newCountry, "", hideItems, formLayout);
    hideItems.add(newVariant);
    // Rule 2: show variant when country is not empty
    FormItemDependencyRule showRule = new FormItemDependencyRuleImpl(newCountry, ".{2}", hideItems, FormItemDependencyRuleImpl.MAKE_VISIBLE) {
      @Override
      protected boolean doesTrigger() {
        TextElement te = (TextElement) this.triggerElement;
        String val = te.getValue();
        //
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.form.flexible.impl.rules.FormItemDependencyRuleImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.