It's a map, you have to call get("name");

Eric D. Lemle
Senior Programmer / Analyst
Intermountain Health Care
36 South State Street, Suite 1100
Salt Lake City, Utah 84111 
United States of America (USA)
(801) 442-3688 -- e-mail: [EMAIL PROTECTED]


>>> [EMAIL PROTECTED] 2/22/2005 1:38:02 PM >>>
Hello,
 
I have a question about using DynaActionForm objects. I would like to
use DynaActionForm class to keep maintenance simpler. But I do not know
how to get the form values out in the action class? 
 
 
I have the following bean set up.
 
  <form-beans>
    <form-bean
       name="loginbean"
       type="org.apache.struts.action.DynaActionForm">
        <form-property name="name" type="java.lang.String"
initial="Titan" />
     </form-bean>
  </form-beans>
 
Now in the action class when I am working in the execute() method
how do I get the data back from the bean?
 
I tried the following
 public ActionForward executeAction(ActionMapping mapping,
                               ActionForm form,
                               HttpServletRequest request,
                               HttpServletResponse response,
                               UserContainer userContainer)
    throws Exception {
 

    //    MenuObject menu = new MenuObject();
    System.out.println((String)form.getName());

 
and of course it will not compile, because it doesn't recognize any
methods in the form. Can you not get data back from a dynaform like you
can a normal bean?
 

Thanks
Scott

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

Reply via email to