1
간단한 양식이 있습니다. 서버 아래 등으로부터 반환 JSON 값 : 당신이 볼 수 있듯이배열에서 양식 텍스트 영역 값 채우기
{
"success":true,
"data":{
"DNR_ID":"9",
"DNR_TYPE_ID":"1",
"DNR_DEF_ID":"1",
"DNR_DESC":"PROCTOR & GAMBLE HAFTASONU AKSIYONU",
"STORES": {
"0" => "ANKARA"
"1" => "ISTANBUL"
}
}
}
는 STORES
인 data
내부 배열이 있습니다. 그래서, 내가하고 싶은 것은, 그 값을 그 형식으로 사용할 수있는 텍스트 영역에 넣는 것입니다.
ExtJS 간단한 양식 메커니즘이 작동하지 않았습니다.
listeners: {
select: function() {
if (this.getSelectionModel().hasSelection()) {
var row = this.getSelectionModel().getSelection()[0];
Ext.getCmp('dnr-list-info').getForm().load({
url: '<?php echo base_url() ?>/list/get_dnr_info',
params: {dnrid: row.get('DNR_ID')},
method: 'GET',
success: function(res) {
// In fact, this line doesn't necessary because form load function automatically fill the form
Ext.getCmp('dnr-list-info').getForm().setValues(res);
}
});
}
}
}
에서
추가 정보 있음 레코드의 데이터로 서식을로드하려고합니다. loadRecord를 사용할 수 있습니다. 텍스트 영역의 이름이 상점의 이름과 일치하는지 확인하십시오. – weeksdev