Invoke Save button after Report print

Can I save editor values and keep open it?

I will try to explain. I have a Print button inside editor screen and when pressed, a report is launched (myButton.setAction(new EditorPrintFormAction("report", this, null))).

1st: How to change a value in this editor (Status: Printed) once the button action is invoked.
2nd: How to save it, and keep editor open. Mainly my goal is to simulate windowactions Save button after the report is launched.

I believe u can extend EditorPrintFormAction and add your logic in action perform then(or before) just call super.actionPerform(Component)



Here’s an example of the approach suggested above:

public class ReportEntityEdit extends AbstractEditor<ReportEntity> {

    private Button button;

    public void init(Map<String, Object> params) {
        button.setAction(new MyReportAction("report", this, null));

    private class MyReportAction extends EditorPrintFormAction {
        public MyReportAction(String id, Editor editor, @Nullable String reportOutputName) {
            super(id, editor, reportOutputName);

        public void actionPerform(Component component) {
1 Like

Olga, i just browsed EditorPrintFormAction - is it possible to make editor field protected or at least create getter?
I believe it can be really useful if developer need to have universal (across application) extended print action.

Ivan, we will consider your idea.

1 Like

@baranukis, @shiryaeva thanks to both for your aproach. Works perfectly.