Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » execPageDeactivated and [x] on TablePage
execPageDeactivated and [x] on TablePage [message #1531896] Sat, 27 December 2014 18:23 Go to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hello,

is execPageDeactivated called when another item in the OutlineTree is chosen? Or is it also invoked when a TablePage is closed by pressing [x] on its tab?

index.php/fa/20316/0/

Thanks,

Peter
Re: execPageDeactivated and [x] on TablePage [message #1534971 is a reply to message #1531896] Mon, 29 December 2014 12:10 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Thank you for this question (the screenshots are really helping to understand).

I have noticed another method on the page: execDisposePage(). This could also correspond to what you are looking for.

But when I have tried to figure it out by trying, I got some unexpected behavior. When I close the view you have mentioned with the [x] (this view is an instance of the DefaultOutlineTableForm created in Desktop#execOpened()) and I click on another page in Page Outline Tree, I got following exception:
org.eclipse.swt.SWTException: Widget is disposed

I am not sure if this ever worked. It seems broken to me (and to you according to your thread: Widget is disposed Exception when all Outline Pages are closed - It is a good practice to separate your questions in multiple threads. I will continue to discuss this other problem there).

All Scout Applications working with the SWT renderer I know are not "outline based application".

I had a look at the Swing Renderer: the view containing the table cannot be closed.
This might explain why the Model does not call execPageDeactivated() or execDisposePage() when the center view is closed.

RAP is probably exactly like Swing.

I am not sure what the solution might be...

.
Re: execPageDeactivated and [x] on TablePage [message #1535070 is a reply to message #1534971] Mon, 29 December 2014 13:28 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Jeremie Bresson wrote on Mon, 29 December 2014 12:10

I had a look at the Swing Renderer: the view containing the table cannot be closed.
This might explain why the Model does not call execPageDeactivated() or execDisposePage() when the center view is closed.

RAP is probably exactly like Swing.

I am not sure what the solution might be...

.


Perhaps making the SWT ViewParts/EditorParts (don't know which you are using) not closeable?

So just changing the selection in the outline tree changes the viewpart/editorpart. That would be fine for me too Smile

But what I also want to achieve is, that I'll be asked to save my changes, when I have got dirty form (opened as views) state. Similar to when closing the whole app (see screenshot and observe the empty dialog again Wink
index.php/fa/20325/0/

Is there a way to achieve this kind of dialog/information when switching outline elements too?

Peter

[Updated on: Mon, 29 December 2014 13:29]

Report message to a moderator

Re: execPageDeactivated and [x] on TablePage [message #1549519 is a reply to message #1535070] Tue, 06 January 2015 15:29 Go to previous messageGo to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Have a look at the execOnCloseRequest() method, we use this to detect forms being closed from the RCP view.
Re: execPageDeactivated and [x] on TablePage [message #1550775 is a reply to message #1549519] Wed, 07 January 2015 08:01 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Urs Beeli wrote on Tue, 06 January 2015 16:29
Have a look at the execOnCloseRequest() method, we use this to detect forms being closed from the RCP view.


Yes, we have discussed it here: explanation of isSaveNeeded() and execOnCloseRequest()

The problem in this case, the form in question is DefaultOutlineTableForm. It is provided by the scout framework to display the content of a page and instanciated once in Desktop.execOpened().
The more I think about it, the more I think that the SWT View containing DefaultOutlineTableForm should not be closable.
Previous Topic:deploy server to tomcat problem "Address allredy in use"
Next Topic:Exception by Export Scout Project
Goto Forum:
  


Current Time: Thu Apr 25 05:51:27 GMT 2024

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

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

Back to the top