Re: handling multiple independent window
I think you could use a request-scope bean that contains an ID referring to one item in a session-scope collection (here I mean an array, a Map, a List...). Then expose your item in a page-context bean (using bean:define) and use it in the rest of the JSP page. Ciao Antonio Kailash Vasani wrote: >Hi, > >Is it possible to have 2 windows showing same JSP page, but different data, >using struts? >The data to be displayed is populated in form bean, in action class. > >Both the JSP pages would be performing same set of operations, but not >necessarily in same order. >Operations are Save, Update etc. When operation is performed, data from form >bean would be used >to perform database operation. > >To best of my knowledge, form beans with session scope will fail to achieve >this, as both the windows >would be sharing the same instance of form bean. Request scoped form beans >are not feasible due to size >and complexity (nesting mainly) of data structure. > >There is restriction that there may be only one user session in application. > >Did any one faced similar situation? Do anyone have any suggestion? > >Kailash > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Action Servlet not getting called.
Space is not there We use Apache web server & it displays a blank page. Regards, Divakar -Original Message- From: Navjot Singh [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 12:08 PM To: Struts Users Mailing List Subject: Re: Action Servlet not getting called. what does tomcat log returned? does it throw error or a blank page? is it because of space after this dot? type="mascot.workqueue.action. SummaryAction" regards Navjot Singh Divakar Satyanarayan wrote: >Hi All, >I have added following action mapping to struts-config.xml for a page. > >In >--- > type="mascot.workqueue.action. SummaryAction" > name="SummaryForm" > scope="request"> > path="/jsp/Summary.jsp"/> > > >In > > > >The file SummaryAction.java is available in a jar that is in the >classpath before and from this jar other pages are working. The jsp path >is OK and form bean is also in classpath. > > >When form a link I am calling Summary.do it works fine in my local >server. > >I uploaded all codes to other server with same application config. The >above link does not call SummaryAction.java . There is some sop inside >this java file at the beginning, that too not getting called . I tried >whole two days but not getting a clue. > >The Apache log is getting the request. Log message is below > >172.21.4.101 - - [16/Aug/2004:00:42:40 -0400] "GET >/credit/oc4j/CalmsWebApp/Summary.do?iAppId=172199 HTTP/1.1" 200 0 "-" >"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)" > > >But it never calls the action file . what can go wrong ? > >Will be great to hear from you. > >Thanks in Advance. > >Divakar Satyanarayan > > > >Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended for use only by the individual or entity to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient of this EMAIL immediately notify the sender at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any attachments. > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended for use only by the individual or entity to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient of this EMAIL immediately notify the sender at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action Servlet not getting called.
what does tomcat log returned? does it throw error or a blank page? is it because of space after this dot? type="mascot.workqueue.action. SummaryAction" regards Navjot Singh Divakar Satyanarayan wrote: Hi All, I have added following action mapping to struts-config.xml for a page. In --- type="mascot.workqueue.action. SummaryAction" name="SummaryForm" scope="request"> path="/jsp/Summary.jsp"/> In The file SummaryAction.java is available in a jar that is in the classpath before and from this jar other pages are working. The jsp path is OK and form bean is also in classpath. When form a link I am calling Summary.do it works fine in my local server. I uploaded all codes to other server with same application config. The above link does not call SummaryAction.java . There is some sop inside this java file at the beginning, that too not getting called . I tried whole two days but not getting a clue. The Apache log is getting the request. Log message is below 172.21.4.101 - - [16/Aug/2004:00:42:40 -0400] "GET /credit/oc4j/CalmsWebApp/Summary.do?iAppId=172199 HTTP/1.1" 200 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)" But it never calls the action file . what can go wrong ? Will be great to hear from you. Thanks in Advance. Divakar Satyanarayan Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended for use only by the individual or entity to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient of this EMAIL immediately notify the sender at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Connection and Tomcat server
Hai guys am still fasing same problem with my struts,tomcat with mysql. am working in the environment of tomcat,struts,dbcp,JP2, mysql.. i developed a site of round 20-50 actions which accesses db through DBCP to MySQL i completely debugged my site theroughly, there is no but in my code. i uploaded the site to net, after a using the site successfully suddenly my connections is not working . i found this by my index page where i am using 2 message board which takes top 5 records from db and displays it in text scrolling javascript where ever am connection to mysql through getDataSource(request) am not gettign connection properly. i am properly closing connection in my program but when i restart my tomcat then my program start working properlty then after a day or so the same problem arrice. can anybody help me to overcome this. am fasing the same problem for many days. thanks you Rajesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mapping ActionPath to a method in DispatchAction
If you're using Struts 1.2.x or the nightly builds, take a look at the MappingDispatchAction. It does exactly what you're looking for. http://struts.apache.org/api/org/apache/struts/actions/MappingDispatchAction.html hth, Hubert --- Kunal Parikh <[EMAIL PROTECTED]> wrote: > Hi! > > I was wondering if it were possible to drop the parameter attribute in a > dispatch action and map an actionPath to a method/methodName ? > > E.g > > /createUser -> public ActionForward createUser(ActionMapping m,ActionForm > f,HttpServletRequest req,HttpServletResponse res ) > > /editUser -> public ActionForward createUser(ActionMapping m,ActionForm > f,HttpServletRequest req,HttpServletResponse res ) > > /deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm > f,HttpServletRequest req,HttpServletResponse res ) > > instead of > > /userAction?method=createUser -> public ActionForward > createUser(ActionMapping m,ActionForm f,HttpServletRequest > req,HttpServletResponse res ) > > /userAction?method=editUserUser -> public ActionForward > editUser(ActionMapping m,ActionForm f,HttpServletRequest > req,HttpServletResponse res ) > > /userAction?method=deleteUser -> public ActionForward > deleteUser(ActionMapping m,ActionForm f,HttpServletRequest > req,HttpServletResponse res ) > > TIA, > > Kunal > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Action Servlet not getting called.
Hi All, I have added following action mapping to struts-config.xml for a page. In --- In The file SummaryAction.java is available in a jar that is in the classpath before and from this jar other pages are working. The jsp path is OK and form bean is also in classpath. When form a link I am calling Summary.do it works fine in my local server. I uploaded all codes to other server with same application config. The above link does not call SummaryAction.java . There is some sop inside this java file at the beginning, that too not getting called . I tried whole two days but not getting a clue. The Apache log is getting the request. Log message is below 172.21.4.101 - - [16/Aug/2004:00:42:40 -0400] "GET /credit/oc4j/CalmsWebApp/Summary.do?iAppId=172199 HTTP/1.1" 200 0 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)" But it never calls the action file . what can go wrong ? Will be great to hear from you. Thanks in Advance. Divakar Satyanarayan Information transmitted by this EMAIL is proprietary to iGATE Group of Companies and is intended for use only by the individual or entity to whom it is addressed and may contain information that is privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient of this EMAIL immediately notify the sender at iGATE or [EMAIL PROTECTED] and delete this EMAIL including any attachments.
Re: Mapping ActionPath to a method in DispatchAction
That is EXACTLY what I've done: Changed the last line of the execute method of dispatch action FROM return dispatchMethod(mapping, form, request, response, name); TO return dispatchMethod(mapping, form, request, response, parameter); ^ But, is there a more "standard" way of achieving the same functionality ? TIA, Kunal On Mon, 16 Aug 2004 11:22:11 +0530, Navjot Singh <[EMAIL PROTECTED]> wrote: 110% POSSIBLE. retreiving the paramter name and method calls using reflection and are already done. all you need to do is override the implementation and rather than checking for *method* value , check for last part of URI and call the respective method. just change execute() method in DispatchAction. you dont have to do much. just a few lines. regards Navjot Singh Kunal Parikh wrote: Hi! I was wondering if it were possible to drop the parameter attribute in a dispatch action and map an actionPath to a method/methodName ? E.g /createUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /editUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) instead of /userAction?method=createUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /userAction?method=editUserUser -> public ActionForward editUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /userAction?method=deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mapping ActionPath to a method in DispatchAction
but then it wont remain a DisptachAction anymore ;-) as control will not reach same class for multiple actions. regards Navjot Singh Navjot Singh wrote: 110% POSSIBLE. retreiving the paramter name and method calls using reflection and are already done. all you need to do is override the implementation and rather than checking for *method* value , check for last part of URI and call the respective method. just change execute() method in DispatchAction. you dont have to do much. just a few lines. regards Navjot Singh Kunal Parikh wrote: Hi! I was wondering if it were possible to drop the parameter attribute in a dispatch action and map an actionPath to a method/methodName ? E.g /createUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /editUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) instead of /userAction?method=createUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /userAction?method=editUserUser -> public ActionForward editUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /userAction?method=deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mapping ActionPath to a method in DispatchAction
110% POSSIBLE. retreiving the paramter name and method calls using reflection and are already done. all you need to do is override the implementation and rather than checking for *method* value , check for last part of URI and call the respective method. just change execute() method in DispatchAction. you dont have to do much. just a few lines. regards Navjot Singh Kunal Parikh wrote: Hi! I was wondering if it were possible to drop the parameter attribute in a dispatch action and map an actionPath to a method/methodName ? E.g /createUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /editUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) instead of /userAction?method=createUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /userAction?method=editUserUser -> public ActionForward editUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /userAction?method=deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mapping ActionPath to a method in DispatchAction
Hi! I was wondering if it were possible to drop the parameter attribute in a dispatch action and map an actionPath to a method/methodName ? E.g /createUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /editUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) instead of /userAction?method=createUser -> public ActionForward createUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /userAction?method=editUserUser -> public ActionForward editUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) /userAction?method=deleteUser -> public ActionForward deleteUser(ActionMapping m,ActionForm f,HttpServletRequest req,HttpServletResponse res ) TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details
It depends upon the architecture you want to follow. There are multiple ways this can be done 1. Create the 2 jsp as independent jsp. Thus the list jsp jsp always fetches from DB when we bring control to that. Clicking add on the list jsp leads to the adddetails jsp which submit data to DB. This is the most commonly used and I have seen this being used successfully in multiple applications 2. Create the 2 jsp as a wizard using struts session scope strategy. This strategy has certain complications and is generally disadvantageous. Thanks, Satish Kataria -Original Message- From: lixin chu [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 4:59 AM To: [EMAIL PROTECTED] Subject: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details Hi, How should I handle this: I have 2 jsp, in a.JSP, I need to display an ArrayList. When users click 'Add', B.JSP is displayed which allows users to fill in the details of a new object. When users click 'Done', I need to return back to A.JSP, display the newly added object, and ArrayList should be updated as well. What do I need to do to support this ? thank you very much li xin __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Overwritting RequestProcessor, how to???
The Tiles plugin automatically changes your request processor to use the one that comes with Tiles. If you need to override the RequestProcessor, make sure you extend TilesRequestProcessor like Niall said. --- Leandro Melo <[EMAIL PROTECTED]> wrote: > Niall, > i actually use tiles, but does it mean that the > requestProcessor i'm using is the Tiles one. > In my struts-config.xml i got this for the > configuration part. > > > > So, i guess i'm using default's RequestProcessor, wich > is struts RequestProcessor, am i right? > > > --- Niall Pemberton > <[EMAIL PROTECTED]> escreveu: > > All you have to do is extend the RequestProcessor > > (or TilesRequestProcessor > > if you use tiles) and then specify it in the > > element of the > > struts-config.xml > > > > > processorClass="myPackage.MyRequestProcessor"/> > > > > > http://struts.apache.org/userGuide/configuration.html#controller_config > > > > I guess whether its a good idea or not depends on > > what you're doing. > > > > Niall > > > > - Original Message - > > From: "Leandro Melo" <[EMAIL PROTECTED]> > > To: "struts jakarta" <[EMAIL PROTECTED]> > > Sent: Sunday, August 15, 2004 6:06 PM > > Subject: Overwritting RequestProcessor, how to??? > > > > > > > Hi, > > > i'd like to overwirte RequestProcessor, but > > actually i > > > don't really know if it's a good idea. > > > > > > Here's the point: > > > I'd like to have one more action if my > > form.validate() > > > method fails on ActionForm. I'd like to do some > > > specific stuff everytime the validate method > > fails. > > > Then, i thought of overwritting the > > RequestProcessor. > > > > > > Is that a good idea, or there's another way to > > > accomplish what i want??? > > > > > > Regards, > > > ltcmelo > > > > > > > > > > > > > > > > > > > > > ___ > > > Yahoo! Acesso Grátis - navegue de graça com > > conexão de qualidade! Acesse: > > http://br.acesso.yahoo.com/ > > > > > > > > > - > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > - > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > = > > > > > > > ___ > Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: > http://br.acesso.yahoo.com/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
submit and listbox
Return Receipt Your submit and listbox document : was Jitender K Chukkavenkata/India/IBM received by: at: 08/16/2004 09:48:30 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
help me for "No form found"
hi all, I get an error, please help me ! Thanks I use tomcat 5.0.27 and struts 1.2.1, the error is : javax.servlet.jsp.JspException: No form found under 'familyInfoForm' in locale 'zh_CN' at org.apache.struts.taglib.html.JavascriptValidatorTag.renderJavascript(JavascriptValidatorTag.java:364) at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:335) at org.apache.jsp.WEB_002dINF.pages.insure.familyInfoForm_jsp._jspx_meth_html_javascript_0(familyInfoForm_jsp.java:2712) at org.apache.jsp.WEB_002dINF.pages.insure.familyInfoForm_jsp._jspService(familyInfoForm_jsp.java:160) If I disabled the follow code ,it will be OK, Any reply would be appreciated. Thanks in advance, Thanks
Modifying Tiles definitions dinamically
Hi, i got a very ordinary problem. I need to provide diferent menus for diferent people that are logged in the application. I don't know what i should do exactly to provide this funcionality, because i don't really know what Tiles allow me to do (i don't know it's potencial). I got the following base tiles definition in my app. One thing i thought is to verify the user permissions at log time, then, depending on the user i'd change the attribute "menu" of my definition to the page menu2.jsp or menu3.jsp, for example. Can (how) i do that??? I also thought on bulding 2 (or 3 or 4) BASE deifinitions and at log time i'd decide which base definition to use. Can i do that (how??)?? I'd appreciate if some show me some reference or just some sample code on how to do that. Thansk, ltcmelo = ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Overwritting RequestProcessor, how to???
Niall, i actually use tiles, but does it mean that the requestProcessor i'm using is the Tiles one. In my struts-config.xml i got this for the configuration part. So, i guess i'm using default's RequestProcessor, wich is struts RequestProcessor, am i right? --- Niall Pemberton <[EMAIL PROTECTED]> escreveu: > All you have to do is extend the RequestProcessor > (or TilesRequestProcessor > if you use tiles) and then specify it in the > element of the > struts-config.xml > > processorClass="myPackage.MyRequestProcessor"/> > > http://struts.apache.org/userGuide/configuration.html#controller_config > > I guess whether its a good idea or not depends on > what you're doing. > > Niall > > - Original Message - > From: "Leandro Melo" <[EMAIL PROTECTED]> > To: "struts jakarta" <[EMAIL PROTECTED]> > Sent: Sunday, August 15, 2004 6:06 PM > Subject: Overwritting RequestProcessor, how to??? > > > > Hi, > > i'd like to overwirte RequestProcessor, but > actually i > > don't really know if it's a good idea. > > > > Here's the point: > > I'd like to have one more action if my > form.validate() > > method fails on ActionForm. I'd like to do some > > specific stuff everytime the validate method > fails. > > Then, i thought of overwritting the > RequestProcessor. > > > > Is that a good idea, or there's another way to > > accomplish what i want??? > > > > Regards, > > ltcmelo > > > > > > > > > > > > > ___ > > Yahoo! Acesso Grátis - navegue de graça com > conexão de qualidade! Acesse: > http://br.acesso.yahoo.com/ > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > = ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Specifying HTML form names
You could add your own attribute to a form tag, so that your javascript could distinguish forms based on the value/presence of this attribute. eg the following has 5 different forms, all with the same name and fields, but I've added a new attribute 'mylabel': function showForms() { var s=''; for (var i=0;i| | Jacob Weber | | | <[EMAIL PROTECTED]| | | .com>| | | Sent by: news| | | <[EMAIL PROTECTED]| | | rg> | | || | || | | 15/08/2004 03:19 | | | AM | | | Please respond to| | | "Struts Users| | | Mailing List"| | || |-+> >--| | | | To: [EMAIL PROTECTED] | | cc: | | Subject: Specifying HTML form names | >--| I have a JSP with two forms, and they both need to go to the same action. But Struts assumes that the "name" property of the HTML form (e.g. ) should be the same as the name of the associated form bean. As a result, I can't use JavaScript to refer to one of the forms, since they both have the same name. Is this a situation where I need to write my own version of ? Why does Struts make this assumption? Things I've already considered: - Using two different actions with different form beans. This doesn't work, since the JSP needs to refer to the form bean by name (for example, in ). If I use two actions that return the same JSP, they need to use the same form bean. - Combining the two forms into one. This doesn't work in my situation, since the forms need to submit different values for the same fields. - Referring to the forms by number in my JavaScript (e.g. document.forms[0]). This doesn't work, since there may be other forms on the page, which would throw off the numbering. Any ideas? Thanks, Jacob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems on disabling inputs
There is also the readonly attribute to html:text. Erik Leandro Melo wrote: I don't get exception Mike, i just get the following on my page (viewing source from the browser). instead of getting this. Then, when the user submits the data, my ActionForm understands that the input "test" is equals(""). So, it returns some action errors. --- Mike Deegan <[EMAIL PROTECTED]> escreveu: Not sure the exact error you are getting, but I had a similar and going from memory ... when using the tag with disable="true" for a property I had to also code a for the property being disabled not sure if this will solve you problem - a dump of the exact exception you are getting may shed more light Regards Mike - Original Message - From: "Leandro Melo" <[EMAIL PROTECTED]> To: "struts jakarta" <[EMAIL PROTECTED]> Sent: Sunday, August 15, 2004 11:21 AM Subject: Problems on disabling inputs Hi, if i try to disable an input like this i get something like this form the browser which, i don't know why causes my ActionForm to not "see" the value of the specific input, and then generate an error. Leandro ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details
Hi, How should I handle this: I have 2 jsp, in a.JSP, I need to display an ArrayList. When users click 'Add', B.JSP is displayed which allows users to fill in the details of a new object. When users click 'Done', I need to return back to A.JSP, display the newly added object, and ArrayList should be updated as well. What do I need to do to support this ? thank you very much li xin __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Read only iterate?
On Saturday 14 August 2004 17:52, Kishore Senji wrote: > Refer: > http://struts.apache.org/faqs/indexedprops.html > > > > > > > Problematic input > > > > > property="integer_value" indexed="true"/> > > > > > > > > Try the one below: > > indexId="ctr"> > Problematic input > > property='<%="items["+ctr+"].integer_value"%>'/> > > > Yes, that works. Thank you. However, I would put that in the general category of a workaround rather than the correct solution. I read the reference you mentioned before making my original attempt. In that reference, the authors themselves feel there is a better solution: " The JSP expression syntax for the property attribute is somewhat messy and easy to get wrong so it's something we want to avoid. One way to make this a little cleaner is to use "indexed tags"' and then go on to talk about "indexed tags" as being superior. I took from that the notion that I should avoid the first solution; that indexed tags would do the same thing. If that's actually true then I'd be delighted to see how to make it work. Nowhere in the discussion do the authors drop the bomb that using indexed tags makes the whole situation read-only and I still think that there must be some way to make it work using indexed tags -- I just haven't yet found it. However, thanks for pointing me at the earlier solution -- it does work, awkward as it is, and that's really important when one has a product to deliver. -- Mike Elliott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Overwritting RequestProcessor, how to???
All you have to do is extend the RequestProcessor (or TilesRequestProcessor if you use tiles) and then specify it in the element of the struts-config.xml http://struts.apache.org/userGuide/configuration.html#controller_config I guess whether its a good idea or not depends on what you're doing. Niall - Original Message - From: "Leandro Melo" <[EMAIL PROTECTED]> To: "struts jakarta" <[EMAIL PROTECTED]> Sent: Sunday, August 15, 2004 6:06 PM Subject: Overwritting RequestProcessor, how to??? > Hi, > i'd like to overwirte RequestProcessor, but actually i > don't really know if it's a good idea. > > Here's the point: > I'd like to have one more action if my form.validate() > method fails on ActionForm. I'd like to do some > specific stuff everytime the validate method fails. > Then, i thought of overwritting the RequestProcessor. > > Is that a good idea, or there's another way to > accomplish what i want??? > > Regards, > ltcmelo > > > > > > ___ > Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems on disabling inputs
I don't get exception Mike, i just get the following on my page (viewing source from the browser). instead of getting this. Then, when the user submits the data, my ActionForm understands that the input "test" is equals(""). So, it returns some action errors. --- Mike Deegan <[EMAIL PROTECTED]> escreveu: > Not sure the exact error you are getting, but I had > a similar and going from > memory ... > when using the tag with disable="true" > for a property I had to > also code a for the property being > disabled > not sure if this will solve you problem - a dump of > the exact exception you > are getting may shed more light > > Regards > Mike > > > - Original Message - > From: "Leandro Melo" <[EMAIL PROTECTED]> > To: "struts jakarta" <[EMAIL PROTECTED]> > Sent: Sunday, August 15, 2004 11:21 AM > Subject: Problems on disabling inputs > > > > Hi, > > if i try to disable an input like this > > > > > > > > i get something like this form the browser > > > > > > > > which, i don't know why causes my ActionForm to > not > > "see" the value of the specific input, and then > > generate an error. > > > > > > > > Leandro > > > > > > > > > > > > > ___ > > Yahoo! Acesso Grátis - navegue de graça com > conexão de qualidade! Acesse: > http://br.acesso.yahoo.com/ > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > = ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems on disabling inputs
This is an HTML-HTTP thing not a Struts thing. Disabled input elements aren't included in the get/post, just like unchecked check boxes. Mike Deegan wrote: Not sure the exact error you are getting, but I had a similar and going from memory ... when using the tag with disable="true" for a property I had to also code a for the property being disabled not sure if this will solve you problem - a dump of the exact exception you are getting may shed more light Regards Mike - Original Message - From: "Leandro Melo" <[EMAIL PROTECTED]> To: "struts jakarta" <[EMAIL PROTECTED]> Sent: Sunday, August 15, 2004 11:21 AM Subject: Problems on disabling inputs Hi, if i try to disable an input like this i get something like this form the browser which, i don't know why causes my ActionForm to not "see" the value of the specific input, and then generate an error. Leandro - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems on disabling inputs
Not sure the exact error you are getting, but I had a similar and going from memory ... when using the tag with disable="true" for a property I had to also code a for the property being disabled not sure if this will solve you problem - a dump of the exact exception you are getting may shed more light Regards Mike - Original Message - From: "Leandro Melo" <[EMAIL PROTECTED]> To: "struts jakarta" <[EMAIL PROTECTED]> Sent: Sunday, August 15, 2004 11:21 AM Subject: Problems on disabling inputs > Hi, > if i try to disable an input like this > > > > i get something like this form the browser > > > > which, i don't know why causes my ActionForm to not > "see" the value of the specific input, and then > generate an error. > > > > Leandro > > > > > > ___ > Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems on disabling inputs
Hi, if i try to disable an input like this i get something like this form the browser which, i don't know why causes my ActionForm to not "see" the value of the specific input, and then generate an error. Leandro ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Overwritting RequestProcessor, how to???
Hi, i'd like to overwirte RequestProcessor, but actually i don't really know if it's a good idea. Here's the point: I'd like to have one more action if my form.validate() method fails on ActionForm. I'd like to do some specific stuff everytime the validate method fails. Then, i thought of overwritting the RequestProcessor. Is that a good idea, or there's another way to accomplish what i want??? Regards, ltcmelo ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]