Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Refreshing the pages
Refreshing the pages [message #985818] Fri, 16 November 2012 04:42 Go to next message
Bertin Kiekebosch is currently offline Bertin Kiekebosch
Messages: 300
Registered: August 2011
Senior Member
Hi,

I have an outline based application with a lot of table pages and some nodes that show a form.

If a table pages is shown for the first time it loads all the data and shows it. If you to another page and back to the first page, tha data is is not reloaded automaically. Only if I hit the standard refresh button the data gets reloaded.

Now I have a Page that shows one form (that is created and shown with the method startModify()). Loading the data on this form costs a lot of time so I only do this once.

But sometimes the user also wants to refresh this page. How can I make it that also this page reacts on the standard refresh button?

Regards Bertin

Re: Refreshing the pages [message #985847 is a reply to message #985818] Fri, 16 November 2012 06:31 Go to previous message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 635
Registered: October 2011
Senior Member
I am not sure to understand what you want to do:

1) Not reloading a page after modification.
The code that open a form for modification looks like this (execAction() function of the Menu class)
@Override
protected void execAction() throws ProcessingException {
  FilmForm form = new FilmForm();
  form.setFilmId(getFilmIdColumn().getSelectedValue());
  form.startModify();
  form.waitFor();
  if (form.isFormStored()) {
    reloadPage();
  }
}


you can remove the call to reloadPage(), and your table is not reloaded when the user save the form.


2) Notification that the refresh button was called.
When the user press F5 or click on relaod, this will call:
AbstractPage#reloadPage()
that will call AbstractPageWithTable#loadChildren()
that will call AbstractPageWithTable#loadTableDataImpl()
that will call AbstractPageWithTable#execPopulateTable()
that will call AbstractPageWithTable#execLoadTableData(SearchFilter)

The last 2 functions can be overriden so you can implement what you want (like updating a form).


I hope its help. If not do not hesitate to provide more information on your use case...
Previous Topic:How to work with many-to-many entity relations?
Next Topic:Null Pointer Exception when accessing the properties of AbstractMySqlSqlService
Goto Forum:
  


Current Time: Mon Jul 28 20:50:40 EDT 2014

Powered by FUDForum. Page generated in 0.07001 seconds