Re: populating a form bean without using a submit button
> "chiji" == chiji nwankwo <[EMAIL PROTECTED]> writes: chiji> Hi, chiji> Is it possible to populate a form bean without using the submit button to post the form. I am using the link tag to forward chiji> the user from one page to another, but at the same time I would like the contents of the form to be sent to the Action form chiji> class. chiji> I do not know if what I am trying to do is actually possible but if it is please let me know how it can be done or at least chiji> where I can start looking for examples that implements this. chiji> Thank you very much in advance. I've gotten something like this to work, but I don't use an Action object. I populate my Form object in the "reset()" method, using a DAO facade over EJB. (Please, anyone feel free to jump in and tell me that's the wrong approach. I'm still trying to figure out what makes sense in a Struts/web application.) I have a link from a page, like this: List Classes My "struts-config.xml" has the following "" and "" elements: ... ... And my destination page can use "logic:iterate" and "bean:write" to list the information: -- === David M. Karr ; Best Consulting [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
Re: populating a form bean without using a submit button
Hi David/Chiji, I have used this solution to my problem and works fine. Basically, the difference is that instead of calling the jsp page in a success, I´m forwarding the same action (listCalsses.do). Sure, I had also to control the flow (forwards) in my action class. If you need more example, I can send you. Rogerio Zamboim System Analyst - dotIP Project CPqD - Telecom & IT Solutions - Brasil "David M. Karr" wrote: > > "chiji" == chiji nwankwo <[EMAIL PROTECTED]> writes: > > chiji> Hi, > > chiji> Is it possible to populate a form bean without using the submit button to >post the form. I am using the link tag to forward > chiji> the user from one page to another, but at the same time I would like the >contents of the form to be sent to the Action form > chiji> class. > > chiji> I do not know if what I am trying to do is actually possible but if it is >please let me know how it can be done or at least > chiji> where I can start looking for examples that implements this. > > chiji> Thank you very much in advance. > > I believe I have a similar problem, although it's possible I'm suffering from > architectural confusion. I have a link on a main page, like this: > >List Classes > > I have a "" like this: > > type="com.intsoft.sgs.web.forms.ListClassesForm"/> > > And my "" is this: > > type="com.intsoft.sgs.web.actions.ListClassesAction" > name="listClassesForm" scope="request"> > > > > An excerpt from "/class/listClasses.jsp": > > property="allClasses" >id="klass" >type="com.intsoft.sgs.web.dao.ClassDAO"> > abc > > > But when I try to run the app, I get in the browser: > > javax.servlet.ServletException: Cannot find bean listClassesForm in scope null > at >org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) > > I'm sure I have something basically wrong, but I don't see it. You may have a > similar problem. > > -- > === > David M. Karr ; Best Consulting > [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)
Re: populating a form bean without using a submit button
> "chiji" == chiji nwankwo <[EMAIL PROTECTED]> writes: chiji> Hi, chiji> Is it possible to populate a form bean without using the submit button to post the form. I am using the link tag to forward chiji> the user from one page to another, but at the same time I would like the contents of the form to be sent to the Action form chiji> class. chiji> I do not know if what I am trying to do is actually possible but if it is please let me know how it can be done or at least chiji> where I can start looking for examples that implements this. chiji> Thank you very much in advance. I believe I have a similar problem, although it's possible I'm suffering from architectural confusion. I have a link on a main page, like this: List Classes I have a "" like this: And my "" is this: An excerpt from "/class/listClasses.jsp": abc But when I try to run the app, I get in the browser: javax.servlet.ServletException: Cannot find bean listClassesForm in scope null at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) I'm sure I have something basically wrong, but I don't see it. You may have a similar problem. -- === David M. Karr ; Best Consulting [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004)