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

Reply via email to