String bundle = childConfig.getAttribute("bundle", parentGroup != null ? parentGroup.getBundle()
: parentField.getBundle());
if ("field".equals(childConfig.getName()))
{
FieldDescriptor field = new FieldDescriptor(childConfig.getAttribute("name"), bundle, childConfig
.getAttribute("editor", ""), NumberTools
.toInt(childConfig.getAttribute("size", "0"), 0));
field.setLabel(childConfig.getAttribute("label", null));
field.setToolTip(childConfig.getAttribute("tip", null));
field.setRows(NumberTools.toInt(childConfig.getAttribute("rows", "6"), 6));
field.setNoLabel(NumberTools.toBool(childConfig.getAttribute("nolabel", childConfig.getAttribute(
"noLabel", "false")), false));
field.setTrim(NumberTools.toBool(childConfig.getAttribute("trim", "false"), false));
if (childConfig.getAttribute("unbound", null) != null)
{
field.setUnbound(childConfig.getAttributeAsBoolean("unbound", false));
}
field.setSelectable(childConfig.getAttributeAsBoolean("selectable", false));
field.setValidationClassName(childConfig.getAttribute("validator", null));
if (childConfig.getAttribute("readonly", null) != null)
{
field.setReadOnly(childConfig.getAttributeAsBoolean("readonly", false));
}
if (childConfig.getAttribute("duty", null) != null)
{
field.setDuty(childConfig.getAttributeAsBoolean("duty", false));
}
if (childConfig.getAttribute("submit", null) != null)
{
field.setSubmit(childConfig.getAttributeAsBoolean("submit", false));
}
if (parentGroup != null)
{
parentGroup.addField(field);
}
else if (parentField != null)
{
parentField.addField(field);
}
createCommandsForField(childConfig, formular, field);
}
else if ("comment".equals(childConfig.getName()))
{
FieldDescriptor field = new FieldDescriptor(childConfig.getAttribute("label"), bundle, "", 0);
field.setComment(true);
if (parentGroup != null)
{
parentGroup.addField(field);
}
else if (parentField != null)
{
parentField.addField(field);
}
}
else if ("buttons".equals(childConfig.getName()))
{
FieldDescriptor field = new FieldDescriptor(childConfig.getAttribute("id", "dummy"), null, "", 0);
field.setUnbound(true);
field.setLabel("0.empty");
if (parentGroup != null)
{
parentGroup.addField(field);
}
else if (parentField != null)
{
parentField.addField(field);
}
createCommandsForField(childConfig, formular, field);
field.setBundle("Aktera");
}
else if ("multi".equals(childConfig.getName()) && parentField == null)
{
FieldDescriptor field = new FieldDescriptor(childConfig.getAttribute("label"), bundle, "", 0);
field.setMulti(true);
if (parentGroup != null)
{
parentGroup.addField(field);
createFields(childConfig, formular, null, field);