can someone help me with this please?

Thanks.


From: "fea jabi" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: user@struts.apache.org
Subject: design question --- struts & displaytag
Date: Wed, 30 Nov 2005 16:02:26 -0500

Have a table as below -- will be using displaytag for this.

             Hrs
Loans          3
deposit        5


For this I created a DynaValidatorForm with
loans, deposits as it's form properties.

<form-bean name="HoursForm" type="org.apache.struts.validator.DynaValidatorForm" dynamic="true">
        <form-property name="loans" type="java.lang.Integer"/>
        <form-property name="deposits" type="java.lang.Integer"/>
   </form-bean>

<action
       path="/PrepareHoursAction"
       type="com.actions.PrepareHoursAction"
       name="HoursForm"
       scope="session">
       <forward name="success" path="/Hours.jsp" redirect="false"/>
    </action>

In action

public ActionForward execute(ActionMapping mapping,
                          ActionForm form,
                          HttpServletRequest request,
                          HttpServletResponse response)
                  throws ServletException, IOException {

       DynaValidatorForm hrsForm = (DynaValidatorForm) form;
      request.setAttribute("hrs", gethrs(hrsForm) );
       return mapping.findForward("success");
   }

private ArrayList getAdminHrs(DynaValidatorForm hrsForm) {
       hrsForm.set("loans",3);
       hrsForm.set("deposits",5);


       ArrayList hrs = new ArrayList();

       hrs .add(hrsForm.get("loans"));
       hrs.add(hrsForm.get("deposits"));

       return hrs;
   }

In Jsp
...............
...........

          <display:table name="hrs" >
<display:column property="" /> ---------------------- not sure how to get this value
         </display:table>

.....................
....................


IS this the right way of doing this? I am stuck here in jsp not knowing what to do.

Thanks.

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to