use of com.revolsys.ui.html.serializer.BuilderSerializer in project com.revolsys.open by revolsys.
the class HtmlUiBuilder method newView.
protected void newView(final String name, final List<?> elements) {
final List<KeySerializer> serializers = new ArrayList<>();
this.viewSerializers.put(name, serializers);
for (final Object element : elements) {
if (element != null) {
KeySerializer serializer = null;
if (element instanceof KeySerializer) {
serializer = (KeySerializer) element;
} else {
final String key = element.toString();
serializer = this.keySerializers.get(key);
if (serializer == null) {
final String title = getLabel(key);
serializer = new BuilderSerializer(key, title, this);
}
}
if (serializer instanceof HtmlUiBuilderAware) {
@SuppressWarnings("unchecked") final HtmlUiBuilderAware<HtmlUiBuilder<?>> builderAware = (HtmlUiBuilderAware<HtmlUiBuilder<?>>) serializer;
builderAware.setHtmlUiBuilder(this);
}
serializers.add(serializer);
}
}
}
Aggregations