Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Restoring closed form in panel navigation tree
Restoring closed form in panel navigation tree [message #1820751] Tue, 28 January 2020 11:23 Go to next message
Krzysztof Leja is currently offline Krzysztof LejaFriend
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 Go to previous message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 204
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Senior Member
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
Previous Topic:A quick method of editing text translations
Next Topic:Keycloak authentication with scout?
Goto Forum:
  


Current Time: Tue Apr 23 09:27:44 GMT 2024

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

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

Back to the top