Browse table update from non-standard action

I have the order>order line composition relationship found in the sales sample. I have 2 buttons that opens a custom editors for the selected order line. Because there are two buttons, I can’t use the standard EditAction class (right?) so I attach BaseActions to the buttons which call openEditor(). The editors open just fine but when I hit ‘OK’ and close the editor, the OrderLine table is not being updated. If I hit ‘OK’ on the order editor and then go back to edit that same Order, the OrderLine table reflects the changes I made. How can I make the OrderLine table reflect the changes of my custom editors without committing the entire Order?

I would recommend adding another instance of the EditAction programmatically. For example:

@Override
public void init(Map<String, Object> params) {
    EditAction myEditAction = EditAction.create(myTable, WindowManager.OpenType.THIS_TAB, "myEditAction");
    myEditAction.setCaption("My Edit");
    myEditAction.setWindowParams(ParamsMap.of("someParam", "someValue"));
    myTable.addAction(myEditAction);
}

You can use actions added to a component in init() method in the XML descriptor declaratively:

<buttonsPanel>
    <button action="coloursTable.create"/>
    <button action="coloursTable.edit"/>
    <button action="coloursTable.myEditAction"/>
</buttonsPanel>

Otherwise, if you stick with your solution with BaseAction, try to pass the orderLinesDs as a parent datasource to the edit screen: see how it is done in EditAction.internalOpenEditor() method.

I see. I didn’t realize I could add multiple EditActions to the same table. That’ll probably do it.