I want to have a set of controls of some sort that, when clicked, each
provide a different work context. Think, Page A supports Data Entry,
Page B supports Reporting and Analysis. Each wants to have completely
separate functions. I think that the basic organization is that I want
to have a document controller, call it the AppOvervallController and,
then I want to have PageAController, PageBController, etc.
Given this, I would have the global navigation receive a click (though
this is mysteriously failing right now) and tell the current page
controller to clean up and die, and then tell the newly clicked
controller to hop into action. Presumably, that controller would need
to have some number of application elements that do things.
For my demo, Page A has a category list that, when an item is clicked,
tells a detail list to fill itself with appropriate details. At
present, the category and the detail are each a separate controller.
Really, I'm looking for discussion about whether this is the right way
to think. But, I'm also wondering if those category and details are
supposed to be in their own controllers? Am I supposed to have a
controller for every operating <div> in the app? That also means that
I have a separate view folder for each, probably containing only one
file. That seems messy to me.
That's enough to ask but, I have one more thing to toss in. On the
JMVC website, I see that I can execute a statement like:
TodosController = Controller.extend("todos",{...));
Where "todos" refers to a DOM element named "todos" (id?). Is this how
I should be creating my category and detail controllers?
Thanks for any advice.
tqii
--
You received this message because you are subscribed to the Google Groups "JavaScriptMVC" group.
To post to this group, send email to javasc...@googlegroups.com.
To unsubscribe from this group, send email to javascriptmv...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascriptmvc?hl=en.
Honestly, I figured this was a question that should elicit some
general interest. I'm a big fan of that social networking thing. I
don't expect you to be responsible for my every question. I know that
I answer questions when I can, not here, yet, but elsewhere.
Hopefully, there are others that feel that way, too.
peace,
tqii
ps, I also want to thank you for this response. I am totally good with
"I see this but don't have time to focus on it. Good luck." Let's me
know what's going on.
On Feb 26, 4:17 pm, Justin Meyer <justinbme...@gmail.com> wrote:
> I really appreciate all JMVC questions. I am here to help. But, I am
> insanely busy. We give away JMVC for free, work on it on weekends, but I
> have one request ...
>
> Please try to be as concise as possible when asking questions. Ask a short
> simple question that other people can understand and benefit from.
>
> If anyone wants to ask long questions, we have paid support.
>
> I hope I'm not coming across like a dick.
>
> Justin Meyer
>
> Jupiter Consulting
> \Development\Training\Support
> 847-924-6039
> > javascriptmv...@googlegroups.com<javascriptmvc%2Bunsubscribe@goog legroups.com>
But instead of listening to clicks, it listens to history events.
Steps
1 add HREF to nav links that look like: href='#reports'.
2. Include the history plugin.
3. Add a main content div to your page.
4. Create a PageController that had the following:
"history.** subscribe": function(called, data) {
parse 'called' and extract controller name
$(#content).html('').controller().destroy()
$(#content)[controller_name+'_controller'](data)
}
Sent from my iPhone
> --
> You received this message because you are subscribed to the Google
> Groups "JavaScriptMVC" group.
> To post to this group, send email to javasc...@googlegroups.com.
> To unsubscribe from this group, send email to javascriptmv...@googlegroups.com