JSP ページから取得したデータをリストに表示したいと考えています。これを行う方法がわかりません。ここに私の JSP ページがあります。JSPページも修正してください。
**category_List.jsp**
%@page import="java.sql.*, java.util.*" %>
<%
response.setContentType("application/json");
String result = "{\"root\"[{\"category_name\": \"Model number\"}]}";
response.getWriter().print(result);
response.getWriter().flush();
%>
そして私の煎茶コード
Ext.define('Sample.view.Blog',{
extend:'Ext.navigation.View',
xtype:'bloglist',
config:{
title:'Blog',
iconCls:'star',
scrollable:true,
styleHtmlContent: true,
items:{
xtype: 'list',
itemTpl: '{category_name}',
store:{
autoLoad: true,
fields: ['category_name'],
proxy:{
type: 'jsonp',
url: 'http://192.168.0.8:8080/new/category_list.jsp',
reader:{
type: 'json',
rootProperty: 'root'
}
}
}
}
}
});
リストにカテゴリ名を表示できません。誰でも私を助けてください。ありがとうございました