Skip to Content
0
Jul 02, 2013 at 11:21 AM

problem : model.getProperty

140 Views

var mm = new sap.ui.model.json.JSONModel();

mm.loadData("/test/deputy/handler/init",true,"GET",false,"true",null);

sap.ui.getCore().setModel(mm);

.....

-


then I want to get data from the model;

//

var me = mm.getProperty("/startBy");

dosomething(me);

...

But got me : undefined

the json data like this:

{"formId":null,"formName":null,"startBy":"00091897","applicant":null,"deputy":null,"startDate":"2013-07-02","endDate":"2013-07-02","posId":null,"appType":null,"reasonType":null,"reasonText":null,"nameA":null,"nameB":null,"comments":null}

Anyone can help me?