Re: Accessing User input in execute ( ) method

2010-09-29 Thread serge nana
You could save the set object into the request object as: request.setAttribute("officer", new BlahBlahOfficer()); and then use strut Logic tag in your view to iterate through the list as: The list that you pass has to implement an Iterator. I have not ra

Re: Accessing User input in execute ( ) method

2010-09-29 Thread serge nana
The MODEL (Persistence, DB) part does not really exist in Struts. On Tue, Sep 28, 2010 at 5:53 PM, serge nana wrote: > Hareendra, > > You don't need to have an ActionForm in order to invoke an Action class. An > ActionForm is a data transfer object (DTO) that allows you to transfer data > from

Re: Accessing User input in execute ( ) method

2010-09-29 Thread Dave Newton
So you're using Struts 2? Dave On Wed, Sep 29, 2010 at 3:02 AM, hareendra seneviratne wrote: > Hi Thank u all for ur replies. > > This is my next step... > > Here is the source of one of my model classes, Officer > public class Officer { >private String id; >private String error = null

Re: Accessing User input in execute ( ) method

2010-09-29 Thread Maurizio Cucchiara
Hareendra, You should take a look at http://struts.apache.org/1.x/struts-taglib/tlddoc/logic/iterate.html Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@s

Re: Accessing User input in execute ( ) method

2010-09-29 Thread hareendra seneviratne
Hi Thank u all for ur replies. This is my next step... Here is the source of one of my model classes, Officer public class Officer { private String id; private String error = null; private Set *totalExcessSet* = new HashSet(); . In my execute() method I have an Officer Insta

Re: Accessing User input in execute ( ) method

2010-09-28 Thread serge nana
Hareendra, You don't need to have an ActionForm in order to invoke an Action class. An ActionForm is a data transfer object (DTO) that allows you to transfer data from the view to the controller( in this case your action). So, if you want to use struts and you have a form to send to the server, i

RE: Accessing User input in execute ( ) method

2010-09-28 Thread adam pinder
if you're new to struts why don't you use struts2 its far better and less intrusive code wise. > Date: Tue, 28 Sep 2010 09:03:51 +0530 > Subject: Re: Accessing User input in execute ( ) method > From: hareend...@gmail.com > To: user@struts.apache.org > &

Re: Accessing User input in execute ( ) method

2010-09-27 Thread hareendra seneviratne
Guys, Thnks for all replies. I'm using struts 1.2.9. I could use request.getParameter() to get the user input. :) Can you plc advice me on what should be done and what should not be done in execute() method. According to my understanding is like a router to route the requests. (Plc correct if

Re: Accessing User input in execute ( ) method

2010-09-27 Thread Kushan Jayathilake
yeah lol... -- Regards Kushan Jayathilake On Mon, Sep 27, 2010 at 6:21 PM, Dave Newton wrote: > We're all making an assumption the OP is talking about Struts 2; I made an > assumption the opposite way. > > Let's just ask--Hareendra, what version of Struts are you asking about? > > Dave > > On

Re: Accessing User input in execute ( ) method

2010-09-27 Thread Dave Newton
We're all making an assumption the OP is talking about Struts 2; I made an assumption the opposite way. Let's just ask--Hareendra, what version of Struts are you asking about? Dave On Mon, Sep 27, 2010 at 8:45 AM, Li Ying wrote: > Hi hareendra : > > You don't need an ActionForm to capture th

Re: Accessing User input in execute ( ) method

2010-09-27 Thread Li Ying
Hi hareendra : You don't need an ActionForm to capture the variables sent by client request. What you used to defined in ActionForm class, is now should be defined in Action class. You can read more detail information in http://struts.apache.org/2.2.1/docs/comparing-struts-1-and-2.html

Re: Accessing User input in execute ( ) method

2010-09-27 Thread Kushan Jayathilake
Hi, There is a new interface called *ActionSupport *in struts 2 you can it from that, you just need to put ** in JSP. remember to map the action with the struts.xml. thats all you need ie: * /pages/ext/summary.jsp * -- Regards Kushan Jayathilake On Mon, Sep 27, 2010 at 4:54 PM, hareendra sen

Re: Accessing User input in execute ( ) method

2010-09-27 Thread Dave Newton
You could get it directly from the request... but why would you want to? That would defeat one of the purposes of having Struts, wouldn't it? Dave On Mon, Sep 27, 2010 at 7:24 AM, hareendra seneviratne wrote: > Hi all, > > > > I’m new to struts and getting to know it. > > > > Is it mandatory to

Accessing User input in execute ( ) method

2010-09-27 Thread hareendra seneviratne
Hi all, I’m new to struts and getting to know it. Is it mandatory to have an ActionForm? Can we access the variables defined in *view* from *execute()* method without using an ActionForm? Thnks for ur replies J