use of com.revolsys.ui.html.decorator.Decorator in project com.revolsys.open by revolsys.
the class UiBuilderObjectForm method initialize.
@Override
public void initialize(final HttpServletRequest request) {
for (final String key : this.fieldKeys) {
if (!getFieldNames().contains(key)) {
final Element field = this.builder.getAttribute(request, key);
if (field instanceof SetObject) {
((SetObject) field).setObject(this.object);
}
if (field != null) {
if (!getElements().contains(field)) {
if (field instanceof HiddenField) {
final HiddenField hiddenField = (HiddenField) field;
add(hiddenField);
} else {
final Decorator label = this.builder.getAttributeFormGroupLabel(key, field);
this.fieldContainer.add(field, label);
}
}
}
}
}
this.builder.initializeForm(this, request);
super.initialize(request);
}
use of com.revolsys.ui.html.decorator.Decorator in project com.revolsys.open by revolsys.
the class HtmlUiBuilderObjectForm method initialize.
@Override
public void initialize(final HttpServletRequest request) {
for (final String key : this.fieldKeys) {
if (!getFieldNames().contains(key)) {
final Element field = this.builder.getAttribute(request, key);
if (field instanceof SetObject) {
((SetObject) field).setObject(this.object);
}
if (field != null) {
if (!getElements().contains(field)) {
final Decorator label = this.builder.getAttributeLabel(key, field);
add(field, label);
}
}
}
}
this.builder.initializeForm(this, request);
super.initialize(request);
}
use of com.revolsys.ui.html.decorator.Decorator in project com.revolsys.open by revolsys.
the class HtmlUiBuilder method getAttributeLabel.
public Decorator getAttributeLabel(final String key, final Element element) {
final Map<String, Decorator> fieldLabels = getAttributeLabels();
Decorator fieldLabel = fieldLabels.get(key);
if (fieldLabel == null) {
final String label = getLabel(key, element);
final String instructions = getAttributeInstruction(key);
if (element instanceof Field) {
fieldLabel = new FieldLabelDecorator(label, instructions);
} else {
fieldLabel = new ElementLabel(label, instructions);
}
fieldLabels.put(key, fieldLabel);
}
return fieldLabel;
}
Aggregations