Today, I am demonstrating on how to add combo box on RunBase Dialog.
Firstly, I want to give a brief introduction about RunBase Class.
This Class is used to schedule the batch jobs. So, Adding Comobox
to RunBase Dialog starts with Class Declaration.
class SampleComboDialog extends RunBaseBatch
In the above class declaration, I declared dialog object of type DialogRunbase & operationField of type DialogField and then i overrided dialog method.
protected Object dialog()
dialog = super();
operationField = dialog.addField(enumStr(Operations));
In this, I assigned the Operation field which is of Type Base Enum to operationField which is of type DialogField and returned the dialog which of type object.
You can even use putToDialog() and getFromDialog() but I want to make it as simplified version. So, I wrote run() method here below.
public void run()
info(strFmt(“the result is %1”, operationField.value()));
It displays the value selected in ComboBox but it requires to initialisation of RunBase Class Object. This is has to be written in main method of respective class.
public static void main(Args _args)
sampleComboDialog = new SampleComboDialog();
So, I compile & run it and here is the Output.
If you clicked at ComboBox, it show it list of enums.
Suppose, If I select Add Operation from the ComboBox and press ok then, here it is the output.
That’s it, just try it and happy Daxing…….