Re: DynaActionForms Question

2005-02-22 Thread Eric Lemle
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.
 
  


 
  
 
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]



RE: DynaActionForms Question

2005-02-22 Thread Benedict, Paul C
DynaValidatorForm dynaForm = (DynaValidatorForm)form;
String name = (String)dynaForm.get("name");

-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 22, 2005 3:38 PM
To: user@struts.apache.org
Subject: DynaActionForms Question


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.
 
  


 
  
 
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


--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



RE: DynaActionForms Question

2005-02-22 Thread Joe Hertz

DynaActionForm df = (DynaActionForm) form;

System.out.println(df.get("name"));

-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 22, 2005 3:38 PM
To: user@struts.apache.org
Subject: DynaActionForms Question

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.
 
  


 
  
 
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]



RE: DynaActionForms Question

2005-02-22 Thread Joe Hertz

DynaActionForm df = (DynaActionForm) form;

System.out.println(df.get("name"));

-Original Message-
From: Scott Purcell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 22, 2005 3:38 PM
To: user@struts.apache.org
Subject: DynaActionForms Question

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.
 
  


 
  
 
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]



DynaActionForms Question

2005-02-22 Thread Scott Purcell
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.
 
  


 
  
 
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