How to create a page that contains a form instead of a table? [message #1001776] |
Thu, 17 January 2013 06:00  |
Eclipse User |
|
|
|
I wanted a page to show a form instead of a table. After failed attempts at trying this with an AbstractPage I reverted to using a AbstractPageWithTable and then added the following code to execPageActivated:
@Override
protected void execPageActivated() throws ProcessingException {
if (getCompanyNr() != null) {
form = new TabbedForm();
form.setCompanyNr(getCompanyNr());
form.setDisplayViewId(IForm.VIEW_ID_PAGE_TABLE);
form.setEnabledGranted(false);
setDetailForm(form);
form.startDisplay();
}
}
This works nicely in my Swing client, but causes problems in the SWT client (see Bug 398305).
Is this the recommended way of doing it? Or is there a better way to show a form instead of the table?
Another question is how I would show the table again on this page instead of the form?
[Updated on: Thu, 17 January 2013 06:01] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: How to create a page that contains a form instead of a table? [message #1062417 is a reply to message #1001776] |
Fri, 07 June 2013 11:03   |
Eclipse User |
|
|
|
After having analyzed and solved the problems with a dirty workaround described in bug 406764, the bug 387625 also seems to have been gone with the latest Scout Kepler 3.9 RC3.
So I was hoping that this would also be the solution to the problem posted by Stathis Alexopoulos. Unfortunately, it is not
What we've found out so far is that this is definitely an E4 bug that we already reported in bug 385618. The bug does not appear if the Eclipse platform 3.x is used.
In summary, there is probably a multi-threading issue in E4 while hiding and re-opening a view. Somehow, a close event is fired after re-opening the view. More details can be found in the reported bug above.
The difference between the previous mentioned Scout bugs and the problem described in this forum post is that we have several forms in this example.
In the FirstPage we close the mainForm, secondaryForm and thirdForm first before opening the mainForm and secondayForm of the SecondPage. Since this is done in the model code, Scout will delegate these changes to the SWT GUI thread which handles the view hide / show events asynchronously.
So postponing the thread that handles the close view event may work if a single view is hidden / re-opened but since we have 3 "hide" threads and 2 "show" view threads in the queue, we cannot guarantee that the "hiding" threads are executed AFTER the "showing" threads.
Since I cannot find any reasonable solution in Scout, I hope that the bug 385618 will be fixed in E4 soon.
[Updated on: Fri, 07 June 2013 11:03] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.29515 seconds