-
Notifications
You must be signed in to change notification settings - Fork 68
RFC: Deep Linking
apotonick edited this page Sep 14, 2010
·
3 revisions
- offering URLs that point to different states of the application (e.g. dashboard/#admin=quick-edit would automatically open the correct tab in a panel)
- allowing widgets to change the URL (remember, widgets often appear via AJAX and can’t change the path/query string)
- make back- and forward button work as expected
Note: deep linking in Apotomo is not limited to TabPanels only, it’s just for demonstration.
- TabPanel A [A]
- TabPanel A containing TabPanel B [A <— B]
- TabPanel A and TabPanel B on same level [A—B]
- we use SWFAddress for detecting internal and external URL events
- internal: JS on page changes deep link via SWFAddress.setValue()
- external: back/forward button, user changes deep link in address panel
- events are reported to a DeepLink cell
- we decide which widgets need to be informed in the Ruby world (NOT in JS)
- widgets that use deep links have to register for that
- generic constructor hook
:is_url_listener => true
- generic constructor hook
- widgets are informed with an :urlChanged event
- widgets have to find out themselves what to do