Skip to content
apotonick edited this page Sep 14, 2010 · 3 revisions

Purpose of deep links in Apotomo

  • 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)
  • make back- and forward button work as expected

Note: deep linking in Apotomo is not limited to TabPanels only, it’s just for demonstration.

Scenarios

  • TabPanel A [A]
  • TabPanel A containing TabPanel B [A <— B]
  • TabPanel A and TabPanel B on same level [A—B]

Basic Implementation

  • 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 (#adds_deep_link or so)
  • widgets are informed with an :urlChanged event
  • widgets have to find out themselves what to do