Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Refresh Page from Form
Refresh Page from Form [message #1810678] Thu, 15 August 2019 20:51 Go to next message
Tim Meuser is currently offline Tim MeuserFriend
Messages: 16
Registered: February 2019
Junior Member
Hi,
I have a table page that reloads after creating with the form.
@Override
public void formChanged(FormEvent e) {
if (FormEvent.TYPE_CLOSED == e.getType() && e.getForm().isFormStored()) {
reloadPage();
}
}

My problem now is, when I create a form from the header, the formChanged Listener is not working and I need to manually refresh my table page. Is there a way to refresh the table from the form? I thought about this:
getDesktop().refreshPages(TablePage.class);
But it is now working for me.
Re: Refresh Page from Form [message #1810746 is a reply to message #1810678] Mon, 19 August 2019 06:40 Go to previous message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
Maybe you should take a look at the org.eclipse.scout.rt.client.ui.desktop.datachange.DataChangeEvent class. Use it together with AbstractDesktop#dataChanged(event), #fireDataChangeEvent(event) and #addDataChangeListener. Each time you modify (or create) an entity (like a Person, a Car, a Book, etc.) in your application the event handler is notified and you can reload/update the related data and update the UI. With that you could simply trigger a data change event in the execStore() method of your form handler by calling getDesktop().dataChanged(new DataChangeEvent(MyEntity.class, ChangeStatus.INSERTED)).

Eclipse Scout Homepage | Documentation | GitHub
Previous Topic:Registration Form
Next Topic:Scout Explorer and setting up a connection to MySQL
Goto Forum:
  


Current Time: Tue Nov 12 00:14:53 GMT 2024

Powered by FUDForum. Page generated in 0.03929 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top