PDA

View Full Version : Where should I shove it ? (the salesrep store, that is)



jmls
18 Jul 2012, 11:14 AM
Just about getting my head around this javascript stuff ;) However, I have an issue about where to put things in this mvc world.

let's say that I have a customer . This customer has a salesrep assigned.

#1 I need a model for customer and salesrep
#2 I need a store for each model
#3 I need a view to maintain each model (crud etc)

this is my mvc. I get this :) lots of flag waving and cheering at this point.

now. what happens when I want to assign a salesrep to a client ?

I want a combo in the customer view to select an appropriate sales rep.

Where is this combo populated from ? The customer controller ? Does that mean the customer controller needs the salesrep model and datastore as well ?

Or do I put the store into the customer view ?

Or do I reference the salesrep controller from the customer view ?

It's not very clear to this old dinosaur.

Things were _so_ much simpler writing z80 assembler ;)

Thanks

mitchellsimoens
25 Jul 2012, 10:24 AM
Moved to the Ext JS Q&A forum

The combo is populated from the store and the store is populated from a source (hardcoded data, a remote server, etc)