refresh view from Button openEditor

How to refresh view from Button -> openEditor(“prodstyring$MeldOpr.edit”, singleSelected, WindowManager.OpenType.DIALOG);
I don’t have the datasource from view nor the table to refresh.

Hi,
We will be able to help you if you send us a small sample project along with reproduction scenario that demonstrates the issue.

Hi,

I have created a small project that reproduce the problem.
In the Application Menu: Open “Operation View”.
I have already addet to Operation in this view. Number 10 and 20. Each of them, has a status and used time fields.
When I press the “Register” button “Button extends Action” I open a window where the user can add usedTime and select new status.
When the user press OK to commit changes, changes is saved to database but the datasource or table don’t refresh on “OK” in window like the default buttons for Create and Edit in table.
How can I make a refresh of datasource and table with button that extends Action and don’t have the
setAfterCommitHandler implemented.

RefreshTableDemo.zip (334.6K)

Hi,

I would recommend you to create a custom EditAction which has all necessary logic for refreshing a table and more (for example track item selection).

I’ve attached a corrected demo project sent by you.

I’ve implemented two ways:

  1. I added a custom EditAction in OperasjonBrowse.java which opens selected item in your created screen - register
  2. I added a custom EditAction in OperasjonBrowse.java which opens selected item in the standard edit screen but sends window parameter - register=true. This parameter is used in OperasjonEdit.java and the name field becomes editable, depending on it. (More preferred)

Regards, Gleb

RefreshTableDemo.zip (30.5K)