public FormBuilderInternal() {
setRendererType(FormBuilderInternalRenderer.RENDERTYPE);
}
public void initFormBuilder() {
formContent = new HtmlUnorderedList();
formContent.setClassString("connectedSortable sortable2 box-runde-ecken");
HtmlInputHidden formActionString = new HtmlInputHidden();
formActionString.setValue("update");
formActionString.setId(FORMACTIONSTRING);
HtmlInputHidden formContentString = new HtmlInputHidden();
formContentString.setValue("");
formContentString.setId(FORMCONTENTSTRING);
HtmlInputHidden formActiveTabString = new HtmlInputHidden();
if(getActiveTab() != null) {
formActiveTabString.setValue(getActiveTab());
} else {
formActiveTabString.setValue("0");
}
formActiveTabString.setId(FORMACTIVETABSTRING);
HtmlInputHidden propDialogHeader = new HtmlInputHidden();
propDialogHeader.setValue(Messages.getStringJSF("dialog.header"));
propDialogHeader.setId("prop-dialog-header");
HtmlDiv holder = new HtmlDiv();
holder.setId("holder");
holder.getChildren().add(formActionString);
holder.getChildren().add(formContentString);
holder.getChildren().add(formActiveTabString);
holder.getChildren().add(propDialogHeader);
HtmlDiv accordion = new HtmlDiv();
accordion.setId("accordion");
for (COMPONENT_CATEGORY category : COMPONENT_CATEGORY.values()) {
if(category != COMPONENT_CATEGORY.METADATA ||
(category == COMPONENT_CATEGORY.METADATA && getMetaDataDescriptions() != null && getMetaDataObject() != null)) {
HtmlHeading heading = new HtmlHeading();
heading.setSize(3);
heading.setValue(Messages.getStringJSF("menu.palette." + category.name()));
HtmlDiv paletteDiv = new HtmlDiv();
HtmlUnorderedList palette = getPalette(category);
palettes.add(palette);
paletteDiv.getChildren().add(palette);
accordion.getChildren().add(heading);
accordion.getChildren().add(paletteDiv);
}