板桥老师:
我写了一个Action继承于ModelListAction,核心代码如下;
public class TypeRepositoryListAction extends ModelListAction {
public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest req, HttpServletResponse res) throws Exception {
String isRepostitory="";
List list2 = null;
PageIterator iterator2 = sAService.getSiteArticlesByModule(isRepostitory, start, count);//这是自定义的方法,经测试能正确的得到PageIterator;
list2 = getModelList(req, iterator2);
}
}
当,数据库表中只有一条记录时,能成功取得list2,当数据表中有两条以上记录时[list2 = getModelList(req, iterator2);]处发生错误,后跟踪jdon的源码,发现在ModelListAction中的getModelList方法中从缓存中获取对象[model = modelManager.getCache(modelKey);],发生错误,请问如何解决这个问题?