public void populate(FormItemRepresentation rep) throws FormBuilderException {
if (!(rep instanceof ConditionalBlockRepresentation)) {
throw new FormBuilderException(i18n.RepNotOfType(rep.getClass().getName(), "ConditionalBlockRepresentation"));
}
super.populate(rep);
ConditionalBlockRepresentation srep = (ConditionalBlockRepresentation) rep;
this.conditionScript = srep.getCondition();
FormItemRepresentation ifRep = srep.getIfBlock();
if (ifRep == null) {
this.ifBlock = null;
} else {
this.ifBlock = createItem(ifRep);
}
FormItemRepresentation elseRep = srep.getElseBlock();
if (elseRep == null) {
this.elseBlock = null;
} else {
this.elseBlock = createItem(elseRep);
}