Hi Vikrant!
Thanks for your question.
To customize the dialog options, you can extend the excel export action and override the behavior.
Then, just use your action instead of excel export.
Small example:
@ActionType(MyExcelExport.ID)
public class MyExcelExport extends ExcelExportAction {
public static final String ID = "myExcelExport";
public MyExcelExport() {
this(ID);
}
public MyExcelExport(String id) {
this(id, null);
}
public MyExcelExport(String id, String shortcut) {
super(id, shortcut);
}
@Override
protected void execute() {
if (tableExporter == null) {
throw new IllegalStateException("Table exporter is not defined");
}
AbstractAction exportAllAction = new AbstractAction("ExportMode.ALL_ROWS") {
@Override
public void actionPerform(Component component) {
doExport(ExportMode.ALL_ROWS);
}
};
exportAllAction.setCaption(messages.getMessage(ExportMode.ALL_ROWS));
exportAllAction.setPrimary(true);
Dialogs dialogs = ComponentsHelper.getScreenContext(target).getDialogs();
dialogs.createOptionDialog()
.withCaption(getMessage("exportConfirmationDialog.caption"))
.withMessage(getMessage("exportConfirmationDialog.message"))
.withActions(
exportAllAction,
new DialogAction(DialogAction.Type.CANCEL)
)
.withWidth("530px")
.show();
}
@Override
protected String getMessage(String id) {
return messages.getMessage(ExportAction.class, id);
}
}
Code example for latest version Jmix Framework 1.5.0-RC1.
Regards,
Dmitriy