Restoring closed form in panel navigation tree [message #1820751] |
Tue, 28 January 2020 11:23 |
Krzysztof Leja Messages: 55 Registered: April 2019 |
Member |
|
|
Hi,
In my application I often use nodes in the panel navigation tree, that opens the form as view (i.e. using the AbstractPageWithNodes class and its getConfiguredDetailForm function). A similar concept was used in the scout Widgets demo application https://scout.bsi-software.com/widgets.
In my application as well as the above-mentioned Widgets application, I noticed the following disadvantage: if the form is closed (e.g. with native buttons like AbstractOkButton/AbstractCancelButton/AbstractCloseButton), then it is not possible to open this form again by clicking on the related option in the panel navigation tree. It only helps to log out and log back in to the application.
Can it be somehow solved, so that this form always appears again after selecting the associated option in the tree panel, even if it was previously closed?
I tried to use several functions found in AbstractPageWithNodes class (e.g. createDetailForm, ensureDetailFormCreated, startDetailForm), but none of them gave a positive result.
[Updated on: Tue, 28 January 2020 11:29] Report message to a moderator
|
|
|
Re: Restoring closed form in panel navigation tree [message #1821133 is a reply to message #1820751] |
Thu, 06 February 2020 07:57 |
|
Hi Krzysztof
What you see in the widget app is a Form which is displayed as "Detail Form" in the Outline. Every Page in the Outline has a Table and a (Detail-)Form. Either the table or the form is displayed. When the form is displayed, it is rendered directly into the Outline, it's kind of embedded there. This is different from when you open a Form as a view or as a dialog. These forms are managed by the Desktop.
As a rule of thumb you should not destroy (=close) the DetailForm, because it is a part of the Page-instance and its lifecycle is managed by the Page and the Outline.
What you could do: Use an AbstractWrappedFormField in your DetailForm. That field can embed another Form. You could initialize and close the embedded form by overriding AbstractPage#execPageActivated()
I'd recommend to use the DetailForm to display (detail) information about the related page. When you need to edit data of the related page, it's a good idea to open a new Form as a view or as a dialog. The advantage of the views is, that you can have multiple open views at the same time and switch between the views, even when the user navigates to a different page in the outline.
Cheers,
André
Eclipse Scout Homepage | Documentation | GitHub
|
|
|
Powered by
FUDForum. Page generated in 0.02827 seconds