public void populate(FormItemRepresentation rep) throws FormBuilderException {
if (!(rep instanceof MenuPanelRepresentation)) {
throw new FormBuilderException(i18n.RepNotOfType(rep.getClass().getName(), "MenuPanelRepresentation"));
}
super.populate(rep);
MenuPanelRepresentation mrep = (MenuPanelRepresentation) rep;
this.cssClassName = mrep.getCssClassName();
this.id = mrep.getId();
this.dir = mrep.getDir();
this.type = mrep.getType();
if (mrep.getWidth() != null && !"".equals(mrep.getWidth())) {
setWidth(mrep.getWidth());
}
if (mrep.getHeight() != null && !"".equals(mrep.getHeight())) {
setHeight(mrep.getHeight());
}
populate(this.panel);
if (mrep.getItems() != null) {
for (FormItemRepresentation item : mrep.getItems()) {
add(super.createItem(item));
}
}
}