// 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();
//