Date comparison
To start off, thank you who can help. I have looked through examples, docs, etc. The forum almost helped. The end problem is that I am doing a addLessThan on a datetime db field using the PB and it is failing likely because of a type casting problem. I am using Timestamp in my java code. Using this for my mapping into a DATETIME field in MySql. field-descriptor name=offerEnds column=offerends jdbc-type=TIMESTAMP / Data gets inserted correctly into MySQL or seems to, but when I do crit.addLessThan(offerends, new Timestamp(System.currentTimeMillis()); When I print out the query, I get: Query from class com.model.offer.OfferVO where [offerprice 0.0, isdisabled = false, offerends 2004-01-31 21:59:07.89, offeredProducts.productid = 1000] It is the time aspect on this which is failing. The row should return back data, but is failing to do so. Thank you again for your help. John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Config help
After 2 days of trying to figure it out, it decided to start working. - Original Message - From: [EMAIL PROTECTED] Date: Sunday, December 7, 2003 1:05 am Subject: Config help I am using MappingDispatchAction and am attempting to pre-populate a DynaValidatorForm in a setup action. Without validation, the form does show it prepopulated, but upon enterring data, it gets into my submit action. With Validation it does validate in my submit action and returns errors which I print out. The data again reaches my submit and past my validate, but fails to show back in the redisplayed form in error. I have looked through the forums and docs and know it has been covered. I am seeking an extra eye because I can't seem to figure out what is going wrong. If you don't mind can you take a quick look. I have tried many variations and think it is something simple I am doing wrong. Thank you for any help. Below are my details. John Tools: Post Struts 1.1, Velocity FormTool (updated to work with post struts 1.1). Inside my setup action: // @Test place a piece of data into the form and see if it comes out other side. DynaValidatorForm form = (DynaValidatorForm)baseForm; form.set(CtlConstants.FORM_TITLE, Test Title Data); request.setAttribute(mapping.getName(), form); return mapping.findForward(editpage); Inside my submit action: DynaValidatorForm form = (DynaValidatorForm)baseForm; ActionMessages errors = new ActionMessages(); errors = form.validate(mapping, request); // form values show up here, but not in returned form. if (! errors.isEmpty()) { this.saveErrors(request, errors); request.setAttribute(mapping.getName(), form); return new ActionForward(mapping.getInput()); } Inside my struts-config.xml: action path=/exec/post/wizard/page1/setup type=com.jb.controller.services.jobpost.wizard.Step1Action parameter=setupPage name=/exec/post/wizard/page1/submit/form validate=false scope=request forwardname=editpage redirect=false path=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=failure redirect=false path=/action/pub/systemError / action path=/exec/post/wizard/page1/submit type=com.jb.controller.services.post.wizard.Step1Action parameter=submitPage name=/exec/jobpost/wizard/page1/submit/form input=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm validate=falsescope=request forwardname=thispage redirect=false path=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=nextpage redirect=false path=/action/exec/post/wizard/page2/setup/ forwardname=failure redirect=false path=/action/pub/systemError / --- -- 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]
Config help
I am using MappingDispatchAction and am attempting to pre-populate a DynaValidatorForm in a setup action. Without validation, the form does show it prepopulated, but upon enterring data, it gets into my submit action. With Validation it does validate in my submit action and returns errors which I print out. The data again reaches my submit and past my validate, but fails to show back in the redisplayed form in error. I have looked through the forums and docs and know it has been covered. I am seeking an extra eye because I can't seem to figure out what is going wrong. If you don't mind can you take a quick look. I have tried many variations and think it is something simple I am doing wrong. Thank you for any help. Below are my details. John Tools: Post Struts 1.1, Velocity FormTool (updated to work with post struts 1.1). Inside my setup action: // @Test place a piece of data into the form and see if it comes out other side. DynaValidatorForm form = (DynaValidatorForm)baseForm; form.set(CtlConstants.FORM_TITLE, Test Title Data); request.setAttribute(mapping.getName(), form); return mapping.findForward(editpage); Inside my submit action: DynaValidatorForm form = (DynaValidatorForm)baseForm; ActionMessages errors = new ActionMessages(); errors = form.validate(mapping, request); // form values show up here, but not in returned form. if (! errors.isEmpty()) { this.saveErrors(request, errors); request.setAttribute(mapping.getName(), form); return new ActionForward(mapping.getInput()); } Inside my struts-config.xml: action path=/exec/post/wizard/page1/setup type=com.jb.controller.services.jobpost.wizard.Step1Action parameter=setupPage name=/exec/post/wizard/page1/submit/form validate=false scope=request forwardname=editpage redirect=false path=/WEB-INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=failure redirect=false path=/action/pub/systemError / /action action path=/exec/post/wizard/page1/submit type=com.jb.controller.services.post.wizard.Step1Action parameter=submitPage name=/exec/jobpost/wizard/page1/submit/form input=/WEB-INF/templates/exec/post/wizard/wizardstep1.vm validate=false scope=request forwardname=thispage redirect=false path=/WEB-INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=nextpage redirect=false path=/action/exec/post/wizard/page2/setup/ forwardname=failure redirect=false path=/action/pub/systemError / /action - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Config help
In the first line: Without validation, the form does show it prepopulated was really meant to say: Without validation, the form does NOT show it prepopulated - Original Message - From: [EMAIL PROTECTED] Date: Sunday, December 7, 2003 1:05 am Subject: Config help I am using MappingDispatchAction and am attempting to pre-populate a DynaValidatorForm in a setup action. Without validation, the form does show it prepopulated, but upon enterring data, it gets into my submit action. With Validation it does validate in my submit action and returns errors which I print out. The data again reaches my submit and past my validate, but fails to show back in the redisplayed form in error. I have looked through the forums and docs and know it has been covered. I am seeking an extra eye because I can't seem to figure out what is going wrong. If you don't mind can you take a quick look. I have tried many variations and think it is something simple I am doing wrong. Thank you for any help. Below are my details. John Tools: Post Struts 1.1, Velocity FormTool (updated to work with post struts 1.1). Inside my setup action: // @Test place a piece of data into the form and see if it comes out other side. DynaValidatorForm form = (DynaValidatorForm)baseForm; form.set(CtlConstants.FORM_TITLE, Test Title Data); request.setAttribute(mapping.getName(), form); return mapping.findForward(editpage); Inside my submit action: DynaValidatorForm form = (DynaValidatorForm)baseForm; ActionMessages errors = new ActionMessages(); errors = form.validate(mapping, request); // form values show up here, but not in returned form. if (! errors.isEmpty()) { this.saveErrors(request, errors); request.setAttribute(mapping.getName(), form); return new ActionForward(mapping.getInput()); } Inside my struts-config.xml: action path=/exec/post/wizard/page1/setup type=com.jb.controller.services.jobpost.wizard.Step1Action parameter=setupPage name=/exec/post/wizard/page1/submit/form validate=false scope=request forwardname=editpage redirect=false path=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=failure redirect=false path=/action/pub/systemError / action path=/exec/post/wizard/page1/submit type=com.jb.controller.services.post.wizard.Step1Action parameter=submitPage name=/exec/jobpost/wizard/page1/submit/form input=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm validate=falsescope=request forwardname=thispage redirect=false path=/WEB- INF/templates/exec/post/wizard/wizardstep1.vm/ forwardname=nextpage redirect=false path=/action/exec/post/wizard/page2/setup/ forwardname=failure redirect=false path=/action/pub/systemError / --- -- 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]