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 achieved in struts2
 
   We will have one xml file say list.xml
 
   <List>
    <Page URL="/employeeList.jsp" actionClass="com.EmployeeAction">
    <Column name="empNo" type="long"/>
    <Column name="empName” type=”String”/>
    <Column name="empDOJ” type=”Date” />
    <Column name="empDept” type=”String” /> 
    </Page>
 
    <Page URL="/orderList.jsp" actionClass="com.OrderAction">
    <Column name="orderNo" type="long"/>
    <Column name="orderName” type=”String”/>
    <Column name="orderDate” type=”Date” />
    <Column name="orderAddress” type=”String” /> 
    </Page>
   </List>
 
    When struts2 action results into employeeList.jsp then we need to read this 
xml file and need to display list page based on column described in this .xml 
file. 
 
    Is anyone used this customization process using struts2?? How to invoke 
this list.xml file and how to show results in .jsp file(generic).
 
    Please suggest me how to do this process, if possible can you please send 
me sample code.
 
    Thanks for your help.
 
Regards,
Sharath Karnati.


      

Reply via email to