Pagination through Struts2 using DisplayTag Library Framework

后端 未结 5 1675
夕颜
夕颜 2021-01-16 18:13

I want to apply pagination for some class of my application, in which i am using spring, struts2 & hibernate. Here i am calling action class from welcome.jsp file. It ha

5条回答
  •  轮回少年
    2021-01-16 19:05

    You need to have a getter for your countryList in your action.

    List countryList = new ArrayList();
    
    public String executeAction() throws Exception {
      try {
         countryList = this.countrySecurityProcessor.findByAll(0, null, null, null, null, false, false, null, null, null, null, 0);
         System.out.println("countryList = "+countryList);
         return ActionSupport.SUCCESS;
    
      } catch (Exception ex) {
         return ActionSupport.ERROR;
      }
    
    }
    
    public List getCountryList() {
      return countryList;
    }
    

提交回复
热议问题