How to create Dynamic Form elements using Struts ?
Hi List, Can anyone let me know the way to create the dynamic form elements in the Struts Page? I mean I want to add the selectboxes/textboxes etc on the click of the link. Thanks in advance Amol
RE: Multiple form submit actions
Use the DispatchAction. -Original Message- From: Shiby Maria John [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 21, 2005 12:31 PM To: Struts Users Mailing List Subject: Multiple form submit actions Hi, I have a Struts form where there are more than one submit action. How can I achieve this without using javascrpit? Any ideas?? - 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: submit double click, js and html:submit
U may have to use validToken method provided by struts -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 19, 2005 6:29 PM To: user@struts.apache.org Subject: submit double click, js and html:submit I want to prevent user from double submiting data. Searching the internet i found this js code: input type=submit value=Submit onclick=this.disabled=true;this.form.submit(); / Because i use html:submit my code is: html:submit property=submit value=Some name styleClass=Button style=CURSOR: hand onclick=this.disabled=true;this.form.submit();/ But when i use this code, after clicking on submit button i get error on page message in IE. my question is: how can i prevent user from double clicking submit button and still user html:submit code? Tnx - 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: Re: Validation Issue
Thankx a lot!!! It worked best regds, AMOL YADWADKAR | Software Engineer | M P H A S I S Architecting Value| IT SERVICES 2nd Floor, The Leela Business Park, Andheri Kurla Road, Andheri(E), Mumbai 400059| Tel: 91 22 5677 Extn 5356 | Fax: 91 22 5600| Cell : 9819011934 | www.mphasis.com Information transmitted by this e-mail is proprietary to MphasiS and/ or its Customers and is intended for use only by the individual or entity to which 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 or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records. -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Friday, September 16, 2005 4:37 AM To: user@struts.apache.org Subject: Re: Validation Issue Amol Yadwadkar wrote: Hi List, I am using Validation Framework. field property=clientTaxId depends=required,mask arg0 key=loanAppForm.clientTaxId/ arg1 name=mask key=prompt.taxid / var var-namemask/var-name var-value${taxid}/var-value /var /field In the above when mask rule fails it picks up the message against the errors.invalid key in the properties file rather than the specified key as prompt.taxid in validation.xml Can anyone pls suggest me my mistake ? The arg* attributes are for passing in values for placeholders in the default error messages. If you want to specify a different error message, you want the 'msg' attribute instead: msg name=mask key=prompt.taxid/ L. - 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]
Validation Issue
Hi List, I am using Validation Framework. field property=clientTaxId depends=required,mask arg0 key=loanAppForm.clientTaxId/ arg1 name=mask key=prompt.taxid / var var-namemask/var-name var-value${taxid}/var-value /var /field In the above when mask rule fails it picks up the message against the errors.invalid key in the properties file rather than the specified key as prompt.taxid in validation.xml Can anyone pls suggest me my mistake ? Thankx Best regds, Amol
Reset for DynaActionForm.
Hi List, How shall we reset the DynaActionForm as we do reset while sing Actionform ? Thankx best regds, AMOL YADWADKAR | Software Engineer | M P H A S I S Architecting Value| IT SERVICES 2nd Floor, The Leela Business Park, Andheri Kurla Road, Andheri(E), Mumbai 400059| Tel: 91 22 5677 Extn 5356 | Fax: 91 22 5600| Cell : 9819011934 | www.mphasis.com BLOCKED::http://www.mphasis.com Information transmitted by this e-mail is proprietary to MphasiS and/ or its Customers and is intended for use only by the individual or entity to which 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 or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] BLOCKED::mailto:[EMAIL PROTECTED] and delete this mail from your records.
How to write logic:iterate for the Collection of HashMap.
Hello List, I need to display the results stored in the Hashmap. How can I achieve it by using logic:iterate I know the way to do it for List type data. Can anyone help me in this ? Thankx n regds, Amol
RE: DynaValidatorForm problem
Hi List, I got my mistake it was the wrong package given for the Class DynaValidatorForm Amol -Original Message- From: Amol Yadwadkar [mailto:[EMAIL PROTECTED] Sent: Friday, August 05, 2005 11:13 AM To: user@struts.apache.org Subject: DynaValidatorForm problem Hello List, I am using the DynaValidatorForm but at the initialization it gives these errors Snippet of struts-config.xml : form-bean name=loanAppForm type=org.apache.struts.action.DynaValidatorForm form-property name=branchCity type=java.lang.String initial=Mumbai/ form-property name=branchState type=java.lang.String initial=NY/ form-property name=branchZipCode type=java.lang.String initial=94086/ form-property name=branchCitiOfficer type=java.lang.String / /form-bean action path=/buissinessnameLink type=com.mphasis.indigo.action.PrimaryInformationAction parameter=type name=loanAppForm forward name=newApplicant path=/ProcessApplication/PopUp_Applicant_PrimeInfo_Readonly.jsp/ forward name=nextonprimary path=/ProcessApplication/PopUp_Applicant_PrimeInfoLoanDetails_Readonly. jsp/ !-- Agent mapping -- forward name=newApplicantAgent path=/HighTouch/PopUp_NewApplicant.jsp/ forward name=nextonprimaryAgent path=/HighTouch/PopUp_LoanDetails.jsp/ !-- Agent mapping -- !-- PopUp_Applicant_ReviewScoringData.jsp -- /action Can any one suggest me the solution ? Thankx Amol Error Stack is as follows :- javax.servlet.jsp.JspException: Exception creating bean of class org.apache.struts.action.DynaValidatorForm: {1} at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:463) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:433) at jsp_servlet._hightouch.__popup_newapplicant._jspService(__popup_newappli cant.java:192) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se rvletStubImpl.java:1006) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:463) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:315) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatche rImpl.java:322) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:1056) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestPr ocessor.java:388) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 231) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se rvletStubImpl.java:1006) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:315) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r un(WebAppServletContext.java:6718) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu bject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121 ) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl etContext.java:3764) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl. java:2644) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Onclick of html:link
Hi List, I have a form where all the action are provided by link. I am using DynaActionform so when I click on html:link I do not get the Dynaform populated for the next page But If I use use html:submit then it happens as expected. Can any one have solution for the above issue. Thankx best regds, AMOL
Html:link with DynaActionForm
Hi List, I have a form where all the action are provided by link. I am using DynaActionform so when I click on html:link I do not get the Dynaform populated for the next page But If I use use html:submit then it happens as expected. Can any one have solution for the above issue. Thankx best regds, AMOL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need help in declaring resource file
Hi Swapnil, Is ur resources folder is under classes Directory ? If not Pls try putting it. Also pls let me know which version of Struts are u using ? Is it 1.2 ?? Thankx Best regds, Amol -Original Message- From: Swapnil Patil [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 11:33 AM To: Struts Users Mailing List Subject: Need help in declaring resource file Hi, I am trying a sample struts application. My struts-config.xml is like this- struts-config form-beansform-bean name=logonForm type=app.LogonForm/ /form-beans global-forwards forward name=logon path=/pages/logon.jsp/ /global-forwards action path=/LogonSubmit type=app.LogonAction name=logonForm scope=request validate=true input=/pages/logon.jsp forward name=success path=/pages/welcome.jsp/ /action /action-mappings !-- message configuration -- message-resources parameter=resources.MessageResources / /struts-config I am getting exception on server like Parse Error at line 54 column 65: Element type message-resources must be declared. org.xml.sax.SAXParseException: Element type message-resources must be declared. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error HandlerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.jav a:173) Parse Error at line 59 column 17: The content of element type struts-config must match (data-sources?,form-beans?,global-forwards?,action-mappings?). org.xml.sax.SAXParseException: The content of element type struts-config must match (data-sources?,form-beans?,global-forwards?,action-mappings?). at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error HandlerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.jav a:173) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.jav a:371) Can anybody help me about it. Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - 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: Need help in declaring resource file
Hi Swapnil, You hadn't started action-mappings entry in ur struts-config.xml Try this snippet struts-config form-beansform-bean name=logonForm type=app.LogonForm/ /form-beans global-forwards forward name=logon path=/pages/logon.jsp/ /global-forwards action-mappings action path=/LogonSubmit type=app.LogonAction name=logonForm scope=request validate=true input=/pages/logon.jsp forward name=success path=/pages/welcome.jsp/ /action /action-mappings !-- message configuration -- message-resources parameter=resources.MessageResources / /struts-config -Original Message- From: Swapnil Patil [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 11:55 AM To: Struts Users Mailing List Subject: RE: Need help in declaring resource file Hi Amol, resource file is under the hierachy as shown(I am using Tomcat server) \webapps\register\WEB-INF\classes\resources\MessageResource.properties register is context. Still i am getting an exception version of struts is struts_1_0_2. --- Amol Yadwadkar [EMAIL PROTECTED] wrote: Hi Swapnil, Is ur resources folder is under classes Directory ? If not Pls try putting it. Also pls let me know which version of Struts are u using ? Is it 1.2 ?? Thankx Best regds, Amol -Original Message- From: Swapnil Patil [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 11:33 AM To: Struts Users Mailing List Subject: Need help in declaring resource file Hi, I am trying a sample struts application. My struts-config.xml is like this- struts-config form-beansform-bean name=logonForm type=app.LogonForm/ /form-beans global-forwards forward name=logon path=/pages/logon.jsp/ /global-forwards action path=/LogonSubmit type=app.LogonAction name=logonForm scope=request validate=true input=/pages/logon.jsp forward name=success path=/pages/welcome.jsp/ /action /action-mappings !-- message configuration -- message-resources parameter=resources.MessageResources / /struts-config I am getting exception on server like Parse Error at line 54 column 65: Element type message-resources must be declared. org.xml.sax.SAXParseException: Element type message-resources must be declared. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error HandlerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.jav a:173) Parse Error at line 59 column 17: The content of element type struts-config must match (data-sources?,form-beans?,global-forwards?,action-mappings?). org.xml.sax.SAXParseException: The content of element type struts-config must match (data-sources?,form-beans?,global-forwards?,action-mappings?). at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Error HandlerWrapper.java:232) at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.jav a:173) at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.jav a:371) Can anybody help me about it. Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - 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] Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs - 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: Re: Dynamic from Elements Generation
Hi Laurie, The Screen details are as follows :- When the page loads by default it shows one Check Box ,Text Box and Select Box in one row. 1 On the top of the page we have a Select Box which has number count ranging from 1 to 20. 2 On selction of the number one shall get that many number of rows with the above form elements. My approach :- I had encorporated the above by using logic:iterate and the count is deciding the number of iteration ... which is fine but the retrival of the dynamic generated data is not correct. Thankx Best regds, Amol -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Wednesday, July 20, 2005 12:54 AM To: user@struts.apache.org Subject: Re: Dynamic from Elements Generation Amol Yadwadkar wrote: Hi List, I want to generate Dynamic Form elements in Struts. I had achieved by doing logic:iterate but the issue in that is I am not getting the dynamic values while retrieval or after the submission of the form. Can anyone suggest me the better way of getting the dynamic form elements in Struts. Thankx in advance !!! Best regds, Amol Can you provide a little more detail? Relevant parts from your JSP, struts-config.xml, form bean and action implementations, etc. would help see what you're doing wrong. L. -- Laurie, Open Source advocate, Java geek and novice blogger: http://www.holoweb.net/laurie - 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]
Dynamic from Elements Generation
Hi List, I want to generate Dynamic Form elements in Struts. I had achieved by doing logic:iterate but the issue in that is I am not getting the dynamic values while retrieval or after the submission of the form. Can anyone suggest me the better way of getting the dynamic form elements in Struts. Thankx in advance !!! Best regds, Amol - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to set an ActionForm to null
Hi, I havn't tried this but just try this in the execute method :-- public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) { ... ... mapping.setAttribute(null); } Hope this may help you!!! --Amol -Original Message- From: pls [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 10:03 AM To: [EMAIL PROTECTED] Subject: How to set an ActionForm to null hi there, i am trying to set an actionform to null after inserting it's properties into a DB. then, control is forwarded to a different action and the info is read from the DB back into the actionform for display by a JSP. the only part that is giving me trouble is with explicitly setting my actionform MBForm to null. After several form submissions and a DB update, the first Action attempts to clear the values in MBForm: request.getSession().setAttribute(MBForm, null); after this, control is forwarded to the second Action which handles the display. it checks to see if MBForm is null and, if it is, it fills MBForm from a DB. in between these two actions, the controller servlet is automatically refilling the MBForm with the values that I just nullified.. the only bean property that stays empty is myHash which represents several groups of multiboxes. i believe this is a result of the MBForm reset() method which contains the following: myHash.put(multiBoxCategories, new Integer[0]); //resets several groups of multiboxes setting other properties to null in the reset() method is not the solution as it wipes the value out after every (but somehow it doesn't do the same thing to the multiboxes?!?) let me know if this enough background for you to help me diagnose the problem.. any discussion of reset() or is welcome.. thanks - 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: How to set an ActionForm to null
Has your ActionMappings at Struts-config.xml contains the name of the form which you are using ? -Original Message- From: pls [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 10:31 AM To: [EMAIL PROTECTED] Subject: Re: How to set an ActionForm to null thanks for the suggestion Amol, but that returns an IllegalStateException.. thanks for trying anyways. Amol Yadwadkar [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I havn't tried this but just try this in the execute method :-- public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) { ... ... mapping.setAttribute(null); } Hope this may help you!!! --Amol -Original Message- From: pls [mailto:[EMAIL PROTECTED] Sent: Friday, May 14, 2004 10:03 AM To: [EMAIL PROTECTED] Subject: How to set an ActionForm to null hi there, i am trying to set an actionform to null after inserting it's properties into a DB. then, control is forwarded to a different action and the info is read from the DB back into the actionform for display by a JSP. the only part that is giving me trouble is with explicitly setting my actionform MBForm to null. After several form submissions and a DB update, the first Action attempts to clear the values in MBForm: request.getSession().setAttribute(MBForm, null); after this, control is forwarded to the second Action which handles the display. it checks to see if MBForm is null and, if it is, it fills MBForm from a DB. in between these two actions, the controller servlet is automatically refilling the MBForm with the values that I just nullified.. the only bean property that stays empty is myHash which represents several groups of multiboxes. i believe this is a result of the MBForm reset() method which contains the following: myHash.put(multiBoxCategories, new Integer[0]); //resets several groups of multiboxes setting other properties to null in the reset() method is not the solution as it wipes the value out after every (but somehow it doesn't do the same thing to the multiboxes?!?) let me know if this enough background for you to help me diagnose the problem.. any discussion of reset() or is welcome.. thanks - 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]
Problems with data-source Tag in web.xml
Hello List, I am using Struts 1.1 and I want to get connected to SQL SERVER 2000.I am using data-source tag from web.xml where I am providing the driverclassname,url,username and password as the properties to this Tag. But I am getting an error of com.microsoft. . . . . .SQLServerDriver is not intilised Can any one pass me the reqired codes of lines for data-source in web.xml It will be the greatest Help !!! Thankx best regds, Amol - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]