Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » How to create a Home button
How to create a Home button [message #1817490] Sat, 23 November 2019 18:32 Go to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 37
Registered: June 2014
Member
Hello,
I would like to create a button that opens the default Outline as where the application starts, is the same with navigation handlers. I would like to know how to set parent Page active.
Kind Regards
Re: How to create a Home button [message #1817508 is a reply to message #1817490] Mon, 25 November 2019 09:12 Go to previous messageGo to next message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 80
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Member
Same answer as for your previous question: to activate an outline use desktop#activateOutline(outlineInstance). It's up to you to decide which of your outlines is the "default" outline.

The outline is basically a tree (AbstractOutline inherits from AbstractTree) and a page is simply a node in that tree.
Each page has a reference to its parent page, which is returned by AbstractPage#getParentPage().
You activate a page programmatically with outline#selectNode(pageInstance).


Eclipse Scout Homepage | Documentation | GitHub
Re: How to create a Home button [message #1819051 is a reply to message #1817508] Mon, 06 January 2020 11:11 Go to previous messageGo to next message
Oueslati Anis is currently offline Oueslati AnisFriend
Messages: 37
Registered: June 2014
Member
Hello,
that right , figured out this after several trial. Thanks, now I mooved to an other subjetc, I would like to overwrite the browser buttons, mainly I would like to navigate in the application using the back and forward button in the browser
Kind Regards
Re: How to create a Home button [message #1819068 is a reply to message #1819051] Tue, 07 January 2020 08:14 Go to previous message
Andre Wegmueller is currently offline Andre WegmuellerFriend
Messages: 80
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
Member
Ok, well that's a complex subject. Scout already handles some navigation history events: when you switch between outlines, you'll notice that the URL changes. When you click back/forward, Scout brings the correct outline to the front. You can do more if you want, but you must deal with all the state that exists on the UI server (and not only in the browser). Maybe you've noticed that all the state of your application is still there, when you hit Ctrl + R in your browser. That's because the state lives on the UI server. This also means, you cannot simply use the local browser history to navigate in a Scout application, you also need to bring the model on the UI server in the correct state, which is not easy to do when you think of modal dialogs, background tasks, and dozens of open forms in tabs.

Maybe you could implement DeepLinkHandlers for your cases: they bring the model in the correct state depending on information stored in the URL and they're already supported when you navigate the browser history. See this question on StackOverflow for more infos:

https://stackoverflow.com/questions/36409145/scout-eclipse-neon-different-url-for-for-different-pages


Eclipse Scout Homepage | Documentation | GitHub
Previous Topic:How to Hide the tow button in Page
Next Topic:Setting a default Filter for a boolean column
Goto Forum:
  


Current Time: Sun Feb 23 02:46:47 GMT 2020

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

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

Back to the top