You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by sharath karnati <ka...@yahoo.com> on 2009/05/22 16:32:47 UTC

How to customize with struts2.

Hi All,
 
    I'm having 'EmployeeBean' which is having below properties
 
               empNo
               empName
               empDOJ
               empDept
 
   In database we are having 'EMPLOYEE' table which is having employee records.
 
   In struts2, we are having 'EmployeeAction' where we are calling a method say 'fetchEmployeeList()'
 
   This method invokes spring framework getting records from DAO. For every row in database we are populating one EmployeeBean and this will be added to ArrayList.
 
    In .jsp file we are using <s:iterator> on this list and displaying rows in UI.
 
    Here I'm talking about employee it could be anything...
 
    ----------------------------------------------------------------------------------------
 
    I'm thinking customizing this process rather than doing this scenario over and over but I need your inputs how this can be achived in struts2
 
   We will have one xml file say list.xml
 
    <Page URL="/employeeList.jsp" actionClass="com.EmployeeAction">
    <Column name="empNo" type="String">
   empName
               empDOJ
               empDept
 
    </Page>