Like what you see? Have a play with our trial version.

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The converter's user interface configuration is provided through the UserInputParameters API. The converter abstract class also extends UserInputParameters, so you can use this API as an instance of UserInputParameters. Click here for detailed documentation and examples of this API.


Below is a short example of how you might create a UI for a converter and use the configuration values:


 

@Override
protected void setupParameters() {
   Parameter p = new Parameter();
   p.setUniqueKey("DENOMINATOR");
   p.setDisplayName("Denominator");
   p.setDataType(TYPE_NUMERIC);
   p.setDisplayType(DISPLAY_TEXT_MEDLONG);
   addParameter(p);
}

@Override
public Object convertObject(Object data) throws Exception {
   if (data == null) return null;
      
   Number d = (Number)getParameterValue("DENOMINATOR");
   if (d == null) return data;
      
   ...
}

 

 

 

  • No labels