@Override public void setupLayout() { super.setupLayout(); Form form = Form.create(this, Form.MAIN); form.addRow(widget(encodingType).setWidgetType(Widget.ENUMERATION_WIDGET_TYPE)); form.addColumn(customEncoding); }
@Override public void refreshLayout(Form form) { super.refreshLayout(form); if (form.getName().equals(Form.MAIN)) { boolean isCustom = ENCODING_TYPE_CUSTOM.equals(encodingType.getValue()); form.getWidget(customEncoding.getName()).setHidden(!isCustom); } }
@Override public void setupProperties() { super.setupProperties(); List<String> defaultEncodings = getDefaultEncodings(); if (defaultEncodings.size() > 0) { encodingType.setPossibleValues(getProperties()); encodingType.setValue(defaultEncodings.get(0)); } }