Hello friends -
Here is my code:
// OK. GET OUR STORE.
var store = Ext.data.StoreManager.lookup('loginJsonStore');
// GET ACCESS TO THE TEXT FIELD.
var userNameTextBox = Ext.getCmp('userNameField');
var passwordTextBox = Ext.getCmp('passwordField');
store.getProxy().setExtraParams({userName:userNameTextBox.getValue(),
password: passwordTextBox.getValue()});
// SEE IF WE CAN GET SOMETHING.
store.load();
// LETS TRY TO POPULATE OUR VALUE.
console.log("debug alpha");
var loginModelRef = Ext.data.ModelManager.getModel('MyFirstTestApplication.model.loginModel');
console.log(loginModelRef.prototype.fields);
console.log("debug beta");
var theModelField = loginModelRef.get("successOrFailureSw");
console.log("debug gamma");
console.log(theModelField);
I am attaching a screenshot of the Chrome console, but the upshot is that I get success at server response time in regards that it gets my request based on the values that the user enters; but I get a failure at loginModelRef.get("successOrFailureSw") call. Specifically, it reads:
Object function (){return this.constructor.apply(this,arguments)} has no method 'get'
Curiously, the documentation set for Ext.data.Model states there is a get(fieldName) method.
I'm almost certainly doing something wrong. What is it?
Thanks.
brian