public void populate(FormItemRepresentation rep) throws FormBuilderException {
if (!(rep instanceof HeaderRepresentation)) {
throw new FormBuilderException(i18n.RepNotOfType(rep.getClass().getName(), "HeaderRepresentation"));
}
super.populate(rep);
HeaderRepresentation hrep = (HeaderRepresentation) rep;
this.cssClassName = hrep.getCssName();
this.id = hrep.getCssId();
saveI18nMap(hrep.getI18n());
if (hrep.getValue().startsWith("<h1>")) {
setContent(hrep.getValue());
} else {
setContent("<h1>" + hrep.getValue() + "</h1>");
}
if (hrep.getFormat() != null && !"".equals(hrep.getFormat())) {
setFormat(Format.valueOf(hrep.getFormat()));
}
}