[dojo-contributors] MVC support for dijit based on dojo.Stateful

Bill Keese bill at dojotoolkit.org
Wed Mar 9 04:50:02 EST 2011

> After that I want to take a look at when you are using "ref" as a
> > string and when you are using it as an object.   I'm guessing it's always
> an
> > object except when it's a value relative to a parent node, in which case
> > it's a string.
> >
> <snap/>
> Right, thats how its treated. Its always specified as a string.

Actually, "always specified as a string" is the opposite of what I said.
Here's your current code example:

          <div class="row" data-dojo-type="dijit.mvc.Group" data-dojo-props
="ref: 'model'">

            <div class="row">

                <label class="cell" for="serialInput">Order #:</label>

                <input class="cell" id="serialInput" data-dojo-type="

                                    data-dojo-props="ref: 'Serial'"></input>


            <div class="row">

                <label class="cell" for="lastnameInput">Last:</label>

                <input class="cell" id="lastnameInput" data-dojo-type="

                                    data-dojo-props="ref: 'Last'"></input>


            <div class="row">

                <label class="cell" for="emailInput">Email:</label>

                <input class="cell" id="emailInput" data-dojo-type="

                                    data-dojo-props="ref: 'Email'"></input>


It's depending on a global variable named model, right?   It's bad to depend
on global variables; it's the opposite of the direction we are trying to go
with the  AMD work.

What I expected was:

       <div class="row" data-dojo-type="dijit.mvc.Group" data-dojo-props="ref:

Eventually the parser will have a context/scope argument against which it
will resolve variables like "model", allowing model to be a local variable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.dojotoolkit.org/pipermail/dojo-contributors/attachments/20110309/c501cf10/attachment.htm 

More information about the dojo-contributors mailing list