Re: Question about "Form Validation Using XML" example

2013-10-04 Thread Antonio Sánchez
Same behavior in private mode. I believe it has to do with Prepare (preparable and exclude-paras use Preparable) and interceptors stack, but I'm not sure. Still a mystery for me, because the code is almost identical. El 02/10/2013 11:46 p.m., Lukasz Lenart escribió: Maybe your browser is fil

Re: Question about "Form Validation Using XML" example

2013-10-02 Thread Lukasz Lenart
understanding how Struts works here. I would > appreciate if you help me with this. > > Thank you. > > > > Example is here: > > http://struts.apache.org/release/2.3.x/docs/form-validation-using-xml.html > > Code for checkout here: > > http://svn.apache.org

Question about "Form Validation Using XML" example

2013-10-02 Thread Antonio Sánchez
e is than I'm not understanding how Struts works here. I would appreciate if you help me with this. Thank you. Example is here: http://struts.apache.org/release/2.3.x/docs/form-validation-using-xml.html Code for checkout here: http://svn.apache.org/repos/asf/struts/sandbox/trunk/s

Persistence backed form validation

2011-09-02 Thread Marcus Bond
Hi, does anyone know of a validation method in struts that can use your JPA (or other usage agnostic) annotations to validate the values on form fields? For example, if I have specified a max length on an entity property and a mandatory option on another then when updating / creating that entity vi

Re: jquery + struts2 + form validation

2011-03-04 Thread Dave Newton
On Fri, Mar 4, 2011 at 10:44 AM, Emi Lu wrote: > check_action() > { >      PrintWriter out          = res.getWriter(); >      res.setContentType("text/html"); >      if(error) >      { >         out.println("Error info"); Ew. > The part gives me headache is that how to submit hundreds of tags in

jquery + struts2 + form validation

2011-03-04 Thread Emi Lu
Good morning, A question about struts2 + jquery form validation: in jsp: = ... ... lots of tags If check_action returns false, action1 will never be called! JAVA action private InputStream inputStream; check_action() { check tag1 against DB; //whether

Re: Xml based form validation not working

2010-04-19 Thread Lukasz Lenart
2010/4/19 Kartik Kumar : >     class="gov.nasa.spacebook.ActionItemTrackingAction" > method="fetchByCriteria"> XML file must have exactly the same name as action Class and method name, so ActionItemTrackingAction-fetchByCriteria-validation.xml and must be in the same package as action class. Re

Re: Struts2 form validation gets indefinite loops in web browsers

2009-09-17 Thread Dale Newfield
Jipu Jiang wrote: So if user input something wrong, I want to show the original form.jsp page with all the parameters extracted from the database along with error messages. So I need to go to the prepareAction first to gets these parameters, and then display them in form.jsp page. So make sure

Struts2 form validation gets indefinite loops in web browsers

2009-09-17 Thread Jipu Jiang
Struts2 form validation gets indefinite loops in web browsers Continue on the last email: So if user input something wrong, I want to show the original form.jsp page with all the parameters extracted from the database along with error messages. So I need to go to the prepareAction first to gets

RE: form validation gets indefinite loops in web browsers

2009-09-17 Thread Jipu Jiang
2009 17:55 To: Struts Users Mailing List Subject: Re: form validation gets indefinite loops in web browsers Jipu Jiang wrote: >prepare Why are you redirecting? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.a

Re: form validation gets indefinite loops in web browsers

2009-09-16 Thread Dale Newfield
Jipu Jiang wrote: prepare Why are you redirecting? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

form validation gets indefinite loops in web browsers

2009-09-16 Thread Jipu Jiang
Hello everyone, Could anyone help me on an issue here? Here is the problem. I have a form in JSP to submit. But the parameters in this form is not static, they are from a database. So I have an action to be called first before enter the JSP page. It goes like this in the struts.xml: f

RE: struts2 form validation theme cann't work with IE6.0?

2009-06-24 Thread FreshAir
vishnu.vyasan wrote: > > > > Not sure, But check whether the Javascript is enabled in IE. > > > > -Original Message- > From: FreshAir [mailto:lichen...@yahoo.com.cn] > Sent: 24 June 2009 11:52 > To: user@struts.apache.org > Subject: struts2 fo

RE: struts2 form validation theme cann't work with IE6.0?

2009-06-24 Thread Vishnu Vyasan Nelliparmbil
Not sure, But check whether the Javascript is enabled in IE. -Original Message- From: FreshAir [mailto:lichen...@yahoo.com.cn] Sent: 24 June 2009 11:52 To: user@struts.apache.org Subject: struts2 form validation theme cann't work with IE6.0? Hi, I was trying to use struts2 (

struts2 form validation theme cann't work with IE6.0?

2009-06-24 Thread FreshAir
ith IE? We have to use this theme since it properly maintain our layout on the page. Any suggestion would be appreciated, thanks in adavance! -- View this message in context: http://www.nabble.com/struts2-form-validation-theme-cann%27t-work-with-IE6.0--tp24180936p24180936.html Sent from the Str

Re: Visible form validation missing after upgrade from 2.0.11 to 2.1.6

2009-04-01 Thread Henrik Brautaset Aronsen
On 31-03-09 16:15, Henrik Brautaset Aronsen wrote: I've done some more digging: I can see the error messages by using [1], but why aren't they automatically attached to the like they were in Struts 2.0.x? I managed to solve my problem. I believe it's a bug, and I've created it as WW-3069

Re: Visible form validation missing after upgrade from 2.0.11 to 2.1.6

2009-03-31 Thread Henrik Brautaset Aronsen
On 31-03-09 17:48, Henrik Brautaset Aronsen wrote: On 31-03-09 17:22, Musachy Barroso wrote: yeah you need the assignment. Put a breakpoint in ActionSupport.getFieldErrors() and see if it is getting called. Thanks for your answer. I put a checkpoint in there, and getFieldErrors() is definit

Re: Visible form validation missing after upgrade from 2.0.11 to 2.1.6

2009-03-31 Thread Henrik Brautaset Aronsen
On 31-03-09 17:22, Musachy Barroso wrote: yeah you need the assignment. Put a breakpoint in ActionSupport.getFieldErrors() and see if it is getting called. Thanks for your answer. I put a checkpoint in there, and getFieldErrors() is definitely called (about five times per field, it seem

Re: Visible form validation missing after upgrade from 2.0.11 to 2.1.6

2009-03-31 Thread Musachy Barroso
yeah you need the assignment. Put a breakpoint in ActionSupport.getFieldErrors() and see if it is getting called. musachy On Tue, Mar 31, 2009 at 11:08 AM, Henrik Brautaset Aronsen wrote: > hasFieldErrors -- "Hey you! Would you help me to carry the stone?" Pink Floyd ---

Re: Visible form validation missing after upgrade from 2.0.11 to 2.1.6

2009-03-31 Thread Henrik Brautaset Aronsen
On 31-03-09 16:15, Henrik Brautaset Aronsen wrote: On 31-03-09 15:12, Henrik Brautaset Aronsen wrote: The form validation error messages are missing after I upgraded from 2.0.11 to 2.1.6, and I can't figure out why. When I submit an invalid form, the form just comes back without the vi

Re: Visible form validation missing after upgrade from 2.0.11 to 2.1.6

2009-03-31 Thread Henrik Brautaset Aronsen
On 31-03-09 15:12, Henrik Brautaset Aronsen wrote: The form validation error messages are missing after I upgraded from 2.0.11 to 2.1.6, and I can't figure out why. When I submit an invalid form, the form just comes back without the visible error messages. ... Th

Visible form validation missing after upgrade from 2.0.11 to 2.1.6

2009-03-31 Thread Henrik Brautaset Aronsen
Hi. The form validation error messages are missing after I upgraded from 2.0.11 to 2.1.6, and I can't figure out why. When I submit an invalid form, the form just comes back without the visible error messages. The form: @Validation public class MySupportForm { private S

Re: Form validation: how can khow in jsp that my action validation failed?

2009-02-27 Thread hernan gonzalez
at 3:25 PM, boraldo wrote: > > I need output special info in JSP if validation failed. How can I do it? > ActionSupport has method hasActionErrors. I need smth like that for JSP. > -- > View this message in context: > http://www.nabble.com/Form-validation%3A-how-can-khow-in-

Form validation: how can khow in jsp that my action validation failed?

2009-02-27 Thread boraldo
I need output special info in JSP if validation failed. How can I do it? ActionSupport has method hasActionErrors. I need smth like that for JSP. -- View this message in context: http://www.nabble.com/Form-validation%3A-how-can-khow-in-jsp-that-my-action-validation-failed--tp22250234p22250234

[S2] Form validation error

2009-01-22 Thread Håkan Andersson
Hi I have a small problem with form validation, when required="true" is set on a textfield the validation don't work, I am getting a dialog stating that "An exception occurred: NS_ERROR_DOM_NOT_FOUND_ERR. Error message: Node was not found", If I remove the required="

Re: Help using Ajax form validation

2008-04-10 Thread Musachy Barroso
ed by Dojo. I'm > >> having issues finding out how to port dojo into my existing project. > >> Thanks for the reference points, I'm gonna check those out now. > >> > >> Shane > >> > >> -Original Message- > >> From: Mus

Re: Help using Ajax form validation

2008-04-10 Thread goelshek
>> having issues finding out how to port dojo into my existing project. >> Thanks for the reference points, I'm gonna check those out now. >> >> Shane >> >> -Original Message- >> From: Musachy Barroso [mailto:[EMAIL PROTECTED] >> Sent: Tuesd

Re: Problem using client side form validation feature. Friends, please help!!!

2008-01-09 Thread Laurie Harper
This is normal. From the documentation for the html:javascript tag [1] "... The dynamicJavascript and staticJavascript attributes default to true, but if dynamicJavascript is set to true and staticJavascript is set to false then only the dynamic JavaScript will be rendered. If dynamicJavascri

Re: Problem using client side form validation feature. Friends, please help!!!

2008-01-09 Thread sai reddy
Why does struts generate unnecessary javascript in the HTML page?? Is there any way to stop struts from generating the extra javascript?? Ingo Villnow wrote: I think it's quite normal that the whole javascript code is generated in the HTML output when you use client-side validation or are my

Re: Problem using client side form validation feature. Friends, please help!!!

2008-01-09 Thread sai reddy
Why does struts generate unnecessary javascript in the HTML page?? Is there any way to stop struts from generating the extra javascript?? Ingo Villnow wrote: I think it's quite normal that the whole javascript code is generated in the HTML output when you use client-side validation or are my

Re: Problem using client side form validation feature. Friends, please help!!!

2008-01-09 Thread Ingo Villnow
I think it's quite normal that the whole javascript code is generated in the HTML output when you use client-side validation or are my thoughts wrong? sai reddy schrieb: I'm using struts 1.2.7 version. I wanted to validate a form client side. I used tag with 'formName' attribute set to the

Problem using client side form validation feature. Friends, please help!!!

2008-01-09 Thread sai reddy
I'm using struts 1.2.7 version. I wanted to validate a form client side. I used tag with 'formName' attribute set to the form-bean's logical name in struts-config.xml. Inside validation.xml file, i set "depends" attribute's value as "required" ( i just wanted these form fields to be non white

XHTML Form validation problems... for ever!

2008-01-05 Thread Manos Batsis
I'm using commons-validator 1.3.1 with Struts 1.3.8 and 1.3.9. In short, the jcv_retrieveFormName function returns nothing, so other functions that try to use it end up with errors looking up for variables (well functions) like "_required" when they should look for formnameOrId_required. I'v

Re: Wildcard in package.properties for form validation (S2)

2007-09-26 Thread Cory D. Wiles
[EMAIL PROTECTED]> wrote: > > > Does anyone have a possible solution for using wild > > cards in error messages > > for form validation? > > > > In my package.properties I have: > > arc.screen.required.error.message = {0} is a > > required field &

Re: Wildcard in package.properties for form validation (S2)

2007-09-26 Thread Dave Newton
http://struts.apache.org/2.x/docs/localizing-output.html --- "Cory D. Wiles" <[EMAIL PROTECTED]> wrote: > Does anyone have a possible solution for using wild > cards in error messages > for form validation? > > In my package.properties I have: > arc.screen.

Wildcard in package.properties for form validation (S2)

2007-09-26 Thread Cory D. Wiles
Does anyone have a possible solution for using wild cards in error messages for form validation? In my package.properties I have: arc.screen.required.error.message = {0} is a required field How does my validation need to be formatted to accept a parameter for the message? http

RE: Help using Ajax form validation

2007-06-26 Thread Deepak Kumar
Hi, Check this http://www.roseindia.net/struts/struts2/struts-2-client-side-validation-exam ple.shtml Thanks -Original Message- From: King, William S. [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 26, 2007 6:26 PM To: user@struts.apache.org Subject: Help using Ajax form validation

Re: Help using Ajax form validation

2007-06-26 Thread Musachy Barroso
my existing project. Thanks for the reference points, I'm gonna check those out now. Shane -Original Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 26, 2007 9:34 AM To: Struts Users Mailing List Subject: Re: Help using Ajax form validation I think you have mor

RE: Help using Ajax form validation

2007-06-26 Thread King, William S.
g List Subject: Re: Help using Ajax form validation I think you have more than one question :), start by checking out the tutorials: http://struts.apache.org/2.x/docs/tutorials.html and take a look at "Starting with Struts" book: http://www.infoq.com/minibooks/starting-struts

Re: Help using Ajax form validation

2007-06-26 Thread Musachy Barroso
se Dojo in my application...it's a web app using portles, JSPs, Struts2, Ajax. I see in documentation that to utilize the Ajax form validation I need to install the Dojo toolkit. I've downloaded the zip file, but it doesn't look like bringing the .jar file in to my eclipse project wi

Help using Ajax form validation

2007-06-26 Thread King, William S.
I'm BRAND NEW to Struts2 & Ajax. Can anyone point me in the right direction to use Dojo in my application...it's a web app using portles, JSPs, Struts2, Ajax. I see in documentation that to utilize the Ajax form validation I need to install the Dojo toolkit. I've downloaded t

Re: [S1] Form validation woes...

2007-05-04 Thread Dave Newton
--- Niall Pemberton <[EMAIL PROTECTED]> wrote: > [...] except some guys made me go out drinking beer > till late last night here at ApacheCon Those darn guys! ;) d. We won't tell. Get more on shows you

Re: [S1] Form validation woes...

2007-05-04 Thread Niall Pemberton
neither the parent nor > child > > forms are declared in struts-config I'm not sure I > can > > do this. > > AFAIK the only link to the struts-config.xml is the > ActionMapping > passed to the validate method - which is used in the > getValidationKey() method

Re: [S1] Form validation woes...

2007-05-04 Thread Dave Newton
ther the parent nor > child > > forms are declared in struts-config I'm not sure I > can > > do this. > > AFAIK the only link to the struts-config.xml is the > ActionMapping > passed to the validate method - which is used in the > getValidationKey() method to deter

Re: [S1] Form validation woes... (SOLVED)

2007-05-04 Thread Niall Pemberton
he nested > ActionForms and would prefer to put it in > validation.xml, but since neither the parent nor > child > forms are declared in struts-config I'm not sure I > can > do this. > > My naive implementation (define the sub-form > validation in validation.

Re: [S1] Form validation woes...

2007-05-04 Thread Niall Pemberton
ruts-config.xml is the ActionMapping passed to the validate method - which is used in the getValidationKey() method to determine the "form name" defined in your validation.xml My naive implementation (define the sub-form validation in validation.xml and call subForm.valida

Re: [S1] Form validation woes... (SOLVED)

2007-05-03 Thread Dave Newton
arent nor > child > forms are declared in struts-config I'm not sure I > can > do this. > > My naive implementation (define the sub-form > validation in validation.xml and call > subForm.validate(mapping, request) throws an NPE > from > inside ValidatorForm.validat

[S1] Form validation woes...

2007-05-03 Thread Dave Newton
d to do some validaton on one of the nested ActionForms and would prefer to put it in validation.xml, but since neither the parent nor child forms are declared in struts-config I'm not sure I can do this. My naive implementation (define the sub-form validation in validation.xml and call sub

Harsh: List backed form validation

2007-02-08 Thread Chaudhary, Harsh
Could anyone point me to a resource which explains how to validate a list backed form using the validator framework. Thanks, Harsh.

Re: newbie action,form,validation design problem

2006-10-05 Thread Laurie Harper
't need to change my action and clone forms just to control the form validation. Can anyone please help spot the problem in this design Thanks, Note: I can see a 'page' attribute on the validator, but I don't think this quite fits my design Well, without seeing your design

newbie action,form,validation design problem

2006-10-04 Thread Strachan, Paul
't need to change my action and clone forms just to control the form validation. Can anyone please help spot the problem in this design Thanks, Note: I can see a 'page' attribute on the validator, but I don't t

Re: Form Validation

2006-08-23 Thread Scott Van Wart
Chetan Pandey wrote: Is their a way to specify multiple inputs. Nope. A wise man once told me that validate="true" is there only for convenience. So the workaround is to do something like 'validate="false"', omit the input= tag, and add forwards like, public void create( ActionM

Form Validation

2006-08-22 Thread Chetan Pandey
Hi All: I have one Dispatch Action class with two methods 'create' and 'edit'. Before Form is sent over it has to be validated. I have the following in struts-config.xml But the thing is Line input="property.create.page" makes validation possible for

Re: Sturts form validation

2006-08-02 Thread Hanmay Udgiri
hi curently i am doing like this only?? but there any other way to call the validate mehtod of all the forms On 8/2/06, Monkeyden <[EMAIL PROTECTED]> wrote: If I understand you correctly If you have references to the "subforms" within an "outter form", just call each subform's validate

Re: Sturts form validation

2006-08-02 Thread Monkeyden
If I understand you correctly If you have references to the "subforms" within an "outter form", just call each subform's validate() method in the outter forms validate() method. Couldn't tell you how you'll get Struts to auto-populate those subforms though. MainActionForm{ validate(...){ myS

Sturts form validation

2006-08-02 Thread Hanmay Udgiri
Hi I have a form which consists of around another 5 forms object. And each form has its own validation.How to call the validate method of the each forms?? -- Thanks and Regards Hanmayya Udgiri

Struts form validation

2006-08-01 Thread Hanmay Udgiri
Hi I have a action form bean class.The action form consists of around another 5 forms. Each form consists of its own validation.How to call the form validate method. One method call errors = myform2.validate(); errors = myform3.validate(); errors = myform4.validate(); errors = myform5.validate();

Re: Form validation not happening

2006-07-04 Thread Vinicius Carvalho
s calling validate, my validate method on my class (gave up on validation using xml) does not even get called... Any ideas? Regards On 7/3/06, Vinicius Carvalho wrote: > Hello there! I'm trying to use form validation (It was working, but > somehow, I messed something and it quit workin

Re: Form validation not happening

2006-07-03 Thread Paul Benedict
t, enabled debug output and even though on the log it says that the requestprocessor is calling validate, my validate method on my class (gave up on validation using xml) does not even get called... Any ideas? Regards On 7/3/06, Vinicius Carvalho wrote: > Hello there! I'm trying to use

Re: Form validation not happening

2006-07-03 Thread Vinicius Carvalho
AIL PROTECTED]> wrote: Hello there! I'm trying to use form validation (It was working, but somehow, I messed something and it quit working). Here are my files: struts

Re: [STRUTS] Resource bundle and form validation

2006-07-03 Thread Olivier Godineau
ation file. Olivier -- View this message in context: http://www.nabble.com/-STRUTS--Resource-bundle-and-form-validation-tf1884718.html#a5156387 Sent from the Struts - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROT

Re: [STRUTS] Resource bundle and form validation

2006-07-03 Thread Niall Pemberton
te from the field "field". Extract of the file validation.xml : Does exists a solution at this problem of behavior between server and client or is it a bug from struts? Regards Olivier Godineau -- View this message in conte

Form validation not happening

2006-07-03 Thread Vinicius Carvalho
Hello there! I'm trying to use form validation (It was working, but somehow, I messed something and it quit working). Here are my files: struts-confi

[STRUTS] Resource bundle and form validation

2006-07-03 Thread Olivier Godineau
havior between server and client or is it a bug from struts? Regards Olivier Godineau -- View this message in context: http://www.nabble.com/-STRUTS--Resource-bundle-and-form-validation-tf1884718.html#a5152197 Sent from the Struts -

Form validation with invalid token

2006-04-25 Thread MiSt
Why form is being validate when request token is invalid? How can I disable form validation when token is invalid? I have large form (scope session) with very complicated validation which relies on session attribute, when user try save form after session timeout, form is being validate which

Re: To use form validation in conjunction with validation.xml

2006-01-21 Thread Raghu Kanchustambham
Thanks Rick! super.validate(mapping, request); works just fine for me. I am able to now use both the validation.xml as well as the ones coded in my actionform's validate method. :-) ~raghu~ On 1/21/06, Rick Reumann <[EMAIL PROTECTED]> wrote: > How are you certain the validation.xml isn't being c

Re: To use form validation in conjunction with validation.xml

2006-01-20 Thread Rick Reumann
How are you certain the validation.xml isn't being called? Log the ActionErrors stuff in the try block after the call to validator.validate() Actually I think the easiest is to just validate what you need manually and then I think you should just be able to do: super.validate(mapping, request);

Re: To use form validation in conjunction with validation.xml

2006-01-20 Thread Raghu Kanchustambham
Thanks Rick! You spotted it correct...It now executes the validate function of the form :-) Now I move onto second step. I cut paste the code that you sent in the action form's validate function. Now the problem is that validation.xml is not having any effect. Just to paste back the exact code I

Re: To use form validation in conjunction with validation.xml

2006-01-20 Thread Rick Reumann
On 1/20/06, Raghu Kanchustambham <[EMAIL PROTECTED]> wrote: > Let me repaste what I think might be relevant for you to take a look at it: > > DynaActionForm code: [ Note: This is extending DynaValidatorForm ] > --- > > public class StudentEnquiryDynaActionForm exten

Re: To use form validation in conjunction with validation.xml

2006-01-20 Thread Raghu Kanchustambham
Let me repaste what I think might be relevant for you to take a look at it: DynaActionForm code: [ Note: This is extending DynaValidatorForm ] --- public class StudentEnquiryDynaActionForm extends DynaValidatorForm { public ActionErrors validate(ActionMapping

Re: To use form validation in conjunction with validation.xml

2006-01-20 Thread Rick Reumann
What does your action mapping look like? Do you have validate=true set for the form? Mind you, I'm not a fan of using automatic validation:) I prefer to call validate manually from my Action class. I explain my reasons here http://www.learntechnology.net/validate-manually.do On 1/20/06, Raghu K

Re: To use form validation in conjunction with validation.xml

2006-01-20 Thread Raghu Kanchustambham
Thanks Rick for the response. My first issue Rick is that my validate function in the form is not getting called at all. I have simply put a "System.out.println" statement there to verify that it is getting called. What you have given is definitely useful for me in the second step :-) But I need t

Re: To use form validation in conjunction with validation.xml

2006-01-20 Thread Rick Reumann
Raghu Kanchustambham wrote the following on 1/20/2006 9:22 AM: Hi, When I want to retain validation.xml for validation of most of my fields on the form. However, the rules for one particular field is too complex to be done with just the validation.xml. I intend to check for it in the validation f

To use form validation in conjunction with validation.xml

2006-01-20 Thread Raghu Kanchustambham
Hi, When I want to retain validation.xml for validation of most of my fields on the form. However, the rules for one particular field is too complex to be done with just the validation.xml. I intend to check for it in the validation form action. What I see is that the action form's validate functio

Multipart Form Validation

2005-09-29 Thread Brian Russell
Is there a reason I am losing my request parameters when returning validation errors to a multipart form page? I have a simple struts form. It has a few text fields and a file field. The enctype is multipart/form-data on my form. I validate in the actionform's validate method. If the text fiel

Re: Best practice for formbean scope and handling form validation errors

2005-02-04 Thread Jeff Beal
Adam Lipscombe wrote: In this instance the problem is this: Form1 has a logic:iterate tag that iterates over a List held in myActionForm. The List is setup by the initAction.do action. How do I preserve the List between actionform instances? (It's not referenced in the JSP other than the logic:iter

RE: Best practice for formbean scope and handling form validation errors

2005-02-04 Thread Adam Lipscombe
e JSP other than the logic:iterate tag) Tia -Adam -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jeff Beal Sent: 04 February 2005 17:14 To: user@struts.apache.org Subject: Re: Best practice for formbean scope and handling form validation errors Adam Lipscombe wrote:

Re: Best practice for formbean scope and handling form validation errors

2005-02-04 Thread Jeff Beal
Adam Lipscombe wrote: But, if the scope of the "myActionForm" formbean is "request" a new instance of the formbean is constructed when Form1.jsp is re-displayed. Hence none of the data that it originally held in it is present and the form fails. The formBean was originally populated by /initAction

Best practice for formbean scope and handling form validation errors

2005-02-04 Thread Adam Lipscombe
Folks, I have 2 actions which look (sort of) like this: If the Form1.jsp is submitted the "/processAction.do" gets called. Validation occurs in either the "myActionForm" actionform or the "myAction" action. If the validation fails a struts ActionErrors object is populated and Form

Re: Dynamic html input tag generation and form validation

2005-01-06 Thread Hubert Rabago
;[EMAIL PROTECTED]> wrote: > Hi, > > Based on some database coutn I have to render a > certain dynamic number of html:text tags and render it > on the html page. And based on the values entered in > the html:text(which have been generated) I need to do > form validation and

Dynamic html input tag generation and form validation

2005-01-06 Thread meena r
Hi, Based on some database coutn I have to render a certain dynamic number of html:text tags and render it on the html page. And based on the values entered in the html:text(which have been generated) I need to do form validation and render the page back to the user in case of errors Is there

Re: Struts Form Validation Question

2004-12-22 Thread Eddie Bush
CTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Monday, December 20, 2004 12:12 AM > Subject: Re: Struts Form Validation Question > > > ^([a-zA-Z]+['-\s])*$ > > > > That's top of my head ... and my head is tired :-( but

Re: Struts Form Validation Question

2004-12-22 Thread send2rajesh
Thanks for your help Eddie! Regex worked perfect. I had given up hope on getting right regex. Thanks Again! - Original Message - From: "Eddie Bush" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Monday, December 20, 2004 1

Re: Struts Form Validation Question

2004-12-20 Thread Eddie Bush
** > > Original Message Follows > From: <[EMAIL PROTECTED]> > Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Subject: Struts Form Validation Question > Date: Sun, 19 Dec 2

RE: Struts Form Validation Question

2004-12-20 Thread Ruben Cepeda
EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: Struts Form Validation Question Date: Sun, 19 Dec 2004 23:36:48 -0500 Hi, I am using struts validator plugin. I have form field which requires following validation: "Full Name can contain only letters, dashes (-), apsotrophes(') and

Re: Struts Form Validation Question

2004-12-19 Thread Eddie Bush
^([a-zA-Z]+['-\s])*$ That's top of my head ... and my head is tired :-( but maybe it's helpful. You need to separate the repeating things from the non-repeating things, and allow the two of them to be chained multiple times. Having such complete validation of a name seems error-prone at best tho

Struts Form Validation Question

2004-12-19 Thread send2rajesh
Hi, I am using struts validator plugin. I have form field which requires following validation: "Full Name can contain only letters, dashes (-), apsotrophes(') and single spaces" Here is the regex I am using for this validation : ^[a-zA-Z'-\s]*$ The only problem with this regex is that it allows use

Re: Nested form validation

2004-12-10 Thread Ben
Thanks, I am doing just that. Just a quick question, how do I use the property name as the error key in the validate() method? I have this but it uses the form name as the key, not the name of the property currently validating. public ActionErrors validate(ActionMapping mapping, HttpServletReque

Re: Nested form validation

2004-12-10 Thread Hubert Rabago
I would think so, but you'd have to call Validator yourself. Take a look at how the ValidatorForm#validate() calls it, and base your nested.validate() code on that. After the call, append the errors from your main form and those in your nested form. On Fri, 10 Dec 2004 10:41:36 +1100, Ben <[EMAI

Re: Nested form validation

2004-12-09 Thread Matt Bathje
Ben wrote: I meant this: UserForm () { String name; AddressForm address = new AddressForm(); } AddressForm () { String city; String zipcode; String country; validate(...) { // validate the address } } UserAction () { UserForm userForm = (UserForm) form; ActionErrors errors = userForm.

Re: Nested form validation

2004-12-09 Thread Ben
I meant this: UserForm () { String name; AddressForm address = new AddressForm(); } AddressForm () { String city; String zipcode; String country; validate(...) { // validate the address } } UserAction () { UserForm userForm = (UserForm) form; ActionErrors errors = userForm.valida

Re: Nested form validation

2004-12-09 Thread Hubert Rabago
Why not call nested.validate() inside NormalForm#validate(), then add the appropriate ActionMessage objects in the resulting ActionErrors? On Fri, 10 Dec 2004 08:57:17 +1100, Ben <[EMAIL PROTECTED]> wrote: > Hi > > Within my normal form there is a nested form. The nested form has > custom valida

Re: Nested form validation

2004-12-09 Thread Matt Bathje
Are you talking something like If so, then its most likely not possible. Furthermore, it is not standard HTML, and not guaranteed to work on any browser - whatever you are doing with nested forms needs to be rethought so as not to use them. If that is not what you are talking abo

Nested form validation

2004-12-09 Thread Ben
Hi Within my normal form there is a nested form. The nested form has custom validation. The validate attribute of the action is set to false. My question is how do I validate the normal form and automatically validate the nested form with my custom validation method? E.g. NormalForm () { NestedF

Re: Form validation

2004-12-08 Thread Niall Pemberton
repareName() method. Niall - Original Message - From: "Donie Kelly" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, December 08, 2004 5:35 PM Subject: RE: Form validation > Hi Jim > > Tried that but I have

Re: Form validation

2004-12-08 Thread Wendy Smoak
From: "Donie Kelly" <[EMAIL PROTECTED]> > Tried that but I have Javascript validation turned on for the page. It's > kicking in before the submit. Is there a way to disable the javascript > validation when the cancel button is pressed. In your case, it sounds to me like the cancel/reset buttons do

RE: Form validation

2004-12-08 Thread Jim Barrows
> -Original Message- > From: Donie Kelly [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 08, 2004 10:35 AM > To: Struts Users Mailing List > Subject: RE: Form validation > > > Hi Jim > > Tried that but I have Javascript validation turned on for

RE: Form validation

2004-12-08 Thread Donie Kelly
t: 08 December 2004 17:36 To: Struts Users Mailing List Subject: RE: Form validation > -Original Message- > From: Donie Kelly [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 08, 2004 10:22 AM > To: Struts Users Mailing List > Subject: RE: Form validation > > &g

RE: Form validation

2004-12-08 Thread Jim Barrows
> -Original Message- > From: Donie Kelly [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 08, 2004 10:22 AM > To: Struts Users Mailing List > Subject: RE: Form validation > > > Thanks Jim, that works for the initial validation. Thank you. > > However

Re: Form validation

2004-12-08 Thread Wendy Smoak
From: "Donie Kelly" <[EMAIL PROTECTED]> > I have a form that uses the standard form validation based on the > validation.xml file. It all works fine except for when I'm pre-populating > the form on first showing. The validation is kicking in before the data is >

  1   2   >