Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Cutted widgetset
Hi!
I want to make small widgetset including UI, VerticalLayout, Label, Button only. How to do it?
Thank you in advance...
I solved this:
1. Configure WidgetSet.gwt.xml to use our loader class package.WSF instead of Vaadin ConnectorBundleLoader:
<generate-with class="package.WSF">
<when-type-assignable class="com.vaadin.client.metadata.ConnectorBundleLoader" />
</generate-with>
2. In package.WSF class override protected Collection<JClassType> getConnectorsForWidgetset(...) method to return our necessary connectors:
@Override
protected Collection<JClassType> getConnectorsForWidgetset(TreeLogger logger, TypeOracle typeOracle) throws UnableToCompleteException {
// Proof code
List<String> whiteList = new ArrayList<String>();
whiteList.add("com.vaadin.client.ui.ui.UIConnector");
whiteList.add("com.vaadin.client.ui.orderedlayout.VerticalLayoutConnector");
whiteList.add("com.vaadin.client.ui.label.LabelConnector");
whiteList.add("com.vaadin.client.ui.button.ButtonConnector");
whiteList.add("ru.rlisystems.web.platform.addons.dynamichtml.client.DynamicHTMLConnector");
Collection<JClassType> list = new ArrayList<JClassType>();
System.out.println("getConnectorsForWidgetset() called: typeOracle=" + String.valueOf(typeOracle.getJavaLangObject() ));
for (JClassType ct : super.getConnectorsForWidgetset(logger, typeOracle)) {
String log = ct.getParameterizedQualifiedSourceName();
if (whiteList.contains(ct.getParameterizedQualifiedSourceName())) {
list.add(ct);
log += " [OK]";
} else
log += " [EXCLUDE]";
System.out.println(log);
}
return list;
}
So, our widgetset contains widgets with connector names, specified in whiteList collectiob, and widgetset .js file decreased from 12 to 6 Mbytes :)