Exemplo n.º 1
0
 /** Get the value of encoding based on encoding type */
 public String getEncoding() {
   if (!ENCODING_TYPE_CUSTOM.equals(encodingType.getValue())) {
     return encodingType.getValue();
   } else {
     return customEncoding.getValue();
   }
 }
Exemplo n.º 2
0
 @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);
   }
 }
Exemplo n.º 3
0
 @Override
 public void setupProperties() {
   super.setupProperties();
   List<String> defaultEncodings = getDefaultEncodings();
   if (defaultEncodings.size() > 0) {
     encodingType.setPossibleValues(getProperties());
     encodingType.setValue(defaultEncodings.get(0));
   }
 }