Note that there are some explanatory texts on larger screens.

plurals
  1. PObackbone.js managing master detail views and history
    primarykey
    data
    text
    <p>We have a Backbone.js app that is pretty normal in that you click on a menu item, you get a grid of items, you click on an item in the grid, the grid hides and you see the form, you save or cancel the form and the form is destroyed and the grid shows and is updated.</p> <p>It's slightly more complex than that though, in that there are different parts of the application that you can get to a particular form from, and sometimes you have a grid -> form -> anotherform, and you need to get back to the first form and then the grid. It's not really a wizard, it's just somewhat complex forms and I don't really want to hard code a "root view" or breadcrumb into the view.</p> <p>So my question/issue is that I can't figure out how to integrate it with the Backbone router. I'm doing fine with just ajax calls and all but we need back button functionality. What I'm looking at is having a state object or model, with a stack of views on it and when you click cancel it destroys the form and pops the previous view. </p> <p>This, however, won't allow for bookmarking because you have to build up the stack by navigating the app, and what if they don't click cancel (which destroys the view and pops the stack) but click back then your on the middle view but the third view is still on the stack.</p> <p>What I'd like to do is have a URL (I'm using MVC on the back end so it would be nice to use controller/action/id urls) #usergrid/list then #usergrid/list/user/addupdate/3 then #usergrid/list/user/addupdate/3/someothercontroller/someotheraction/4</p> <p>But a) I can't figure out how to get the router to accommodate this and b) I would have to parse the args which would be difficult with out some sort of demarcation between the urls and c) the only way I can think to do it with the routing is to specify basically every possible variation of every URL.</p> <p>Any experience or insight into this would be really really appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload