dcsimg
need help using Input/Output using actions
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Matei_Lamasanu
Posted On:   Tuesday, May 3, 2005 09:22 AM

Hi, i am pretty newbie to Struts, and still in my learning process. My problem: Im using a for input from the user to use further on as parameters for a query to retrive data and then place onto a form bean, to then be displayed on a page. Very common, but im quite lost :P I can have an input action and an output action, but i dont quite see how i can structure this to pass values from one action to the other action which will populate a form bean for output (using on the jsp page), since the output action needs the data stored n the input bean form. hope this is clear! ill try to edit if theres alot of confusion in my logic. thx in advance! matei    More>>

Hi,
i am pretty newbie to Struts, and still in my learning process.

My problem: Im using a for input from the user to use further on as parameters for a query to retrive data and then place onto a form bean, to then be displayed on a page. Very common, but im quite lost :P

I can have an input action and an output action, but i dont quite see how i can structure this to pass values from one action to the other action which will populate a form bean for output (using on the jsp page), since the output action needs the data stored n the input bean form.

hope this is clear! ill try to edit if theres alot of confusion in my logic.

thx in advance!
matei

   <<Less

Re: need help using Input/Output using actions

Posted By:   jayaprakash_tr  
Posted On:   Tuesday, May 3, 2005 10:01 AM

Hey, I dont know what i understood from your question is correct or not. Anyway. If you want to read input from user and display the result, its quite easy.
From Action class
read the form bean values.
Process the results.

Set the values back to the form bean from action class.like form.set("property","value");


In jsp use tag to check the property that you set contains some value or is null .Inside that write your logic iterate. Then it would work only when that particular property contains value.
So many other tags are also there which you could use. , such and such.
If you are iterating a set of beans in your logic iterate, you could use indexed properties.

I will suggest a link for that.

http://www.developer.com/java/ejb/article.php/2233591

If this not satisfying you, explain , with some source code, about what you really want.

regards

Jayaprakash T.R
About | Sitemap | Contact