vl.setWidth(100, Sizeable.UNITS_PERCENTAGE);
List<ProcessStateWidget> widgets = new ArrayList<ProcessStateWidget>(stateConfiguration.getWidgets());
Collections.sort(widgets, new WidgetPriorityComparator());
TaskWatch watch = new TaskWatch(ProcessDataPane.class.getSimpleName() + " - generowanie interfejsu dla kroku " + stateConfiguration.getName());
final WidgetEventBus widgetEventBus = new WidgetEventBus();
for (final ProcessStateWidget w : widgets) {
try {
watch.watchTask(w.getClassName() + ": " + w.getName(), new Callable() {
@Override
public Object call() throws Exception {
try {
ProcessToolWidget realWidget = getWidget(w, stateConfiguration, ctx, null, widgetEventBus);
if (realWidget instanceof ProcessToolVaadinRenderable && (!nvl(w.getOptional(), false) || realWidget.hasVisibleData())) {
processWidgetChildren(w, realWidget, stateConfiguration, ctx, null, widgetEventBus);
ProcessToolVaadinRenderable vaadinW = (ProcessToolVaadinRenderable) realWidget;
vl.addComponent(vaadinW.render());
}
}
catch (Exception e) {
logger.log(Level.SEVERE, e.getMessage(), e);
vl.addComponent(new Label(getMessage("process.data.widget.exception-occurred")));
vl.addComponent(new Label(e.getMessage()));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
e.printStackTrace(new PrintWriter(baos));
vl.addComponent(new Label("<pre>" + baos.toString() + "</pre>", CONTENT_XHTML));
}
// TODO Auto-generated method stub
return null;
}
});
} catch (Exception e) {
throw new RuntimeException(e);
}
}
watch.stopAll();
logger.log(Level.INFO, watch.printSummary());
addComponent(vl);
setExpandRatio(vl,1f);
if (isOwner) {