Failed Validation Prolbem
Hello, I have been puzzled by this problem for a while. I inherited a Struts application which regularly sets collections as request attributes and accesses them in jsps. I tried to add Validation to this app using Validator framework and let the jsp be reloaded if something goes wrong. Two things I can't figure out how to handle are: 1. I can only set one jsp for the input property of action mapping and I don't want to use an action here. 2. The request scope attribute is lost after reloading. Do I have to change the scope to session for all of them? Thank you and any help is very much appreciated! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cancel button doesn't cancel server side validation
Thanks for your reply. That property is required by LookupDispatchAction. The action is defined as the following: action path=/submit202 type=SubmitFormAction parameter=action name=202Form scope=request validate=true input=/sitemplates/form202.jsp forward name=refresh path=/templates/form202.jsp/ /action If I don't have that property, I got errors like: Request[/submit202] does not contain handler parameter named 'action'. This may be caused by whitespace in the label text. Thanks Bqiao On Mon, 21 Mar 2005 10:18:57 -0800, K.C. Baltz [EMAIL PROTECTED] wrote: I've never needed a property attribute with the html:cancel control. Perhaps that's the problem? Make sure you have a cancel() method in your DispatchAction K.C. Bing Qiao wrote: Hi, I am using Struts Validator for a LookupDispatchAction. I'm using both client and server sides validation. The problem is I can only disable the client side validation by using html:cancel tag. html:cancel styleClass=button style=width: 100px property=action bean:message key=sibutton.cancel/ /html:cancel I doubt if the property is the problem but can't be sure. Besides it is required by LookupDispatchAction. Is there limitation for this tag to be used for LookupDispatchAction? Thanks a lot! Bqiao - 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]
Cancel button doesn't cancel server side validation
Hi, I am using Struts Validator for a LookupDispatchAction. I'm using both client and server sides validation. The problem is I can only disable the client side validation by using html:cancel tag. html:cancel styleClass=button style=width: 100px property=action bean:message key=sibutton.cancel/ /html:cancel I doubt if the property is the problem but can't be sure. Besides it is required by LookupDispatchAction. Is there limitation for this tag to be used for LookupDispatchAction? Thanks a lot! Bqiao - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Disable struts server side validation
Hi, Thanks for your reply. I felt it not a good design to disable server side validation as well. The struts application (intranet application) I am adding validation to was not properly designed. A lot of jsps need beans passed from actions to display correctly. Since those beans are defined as request attributes, they will be lost when validation fails and the jsp is reloaded. So to use server side validation I have to do preparation for loading all those jsps in custom validator classes. At the beginning I started learning struts, I was thinking if the struts validator could reload the submission page correctly and automatically, keeping all objects and states needed. I am very new to struts, so forgive me if that is a stupid idea. But thank you very much for your reply! Bqiao On Thu, 17 Mar 2005 14:26:22 -0500, Joe Hertz [EMAIL PROTECTED] wrote: Why do you want to trust the browser validation to be authoritative...? What happens if the client disables javascript or uses a browser you didn't anticipate? Who's to say the http request was generated by a browser at all?? I often only have back-end validation, but never do I use client-side alone. The only exception I've given in on is an Are You Sure? popup. -Original Message- From: Bing Qiao [mailto:[EMAIL PROTECTED] Sent: Thursday, March 17, 2005 12:46 PM To: user@struts.apache.org Subject: Disable struts server side validation Hi, I've got a questions about struts validator. When defining custom validation rules, is it possible to only define the client side javascript without building classes? Many thanks Bqiao - 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]
Disable struts server side validation
Hi, I've got a questions about struts validator. When defining custom validation rules, is it possible to only define the client side javascript without building classes? Many thanks Bqiao - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to change input property of Action tag in Custom Validator Class
Hello, I build a custom Validator class for a DynaActionForm. The action tag looks like: action path=/submitpay type=SubmitPayFormAction parameter=action name=paymentForm scope=request input=/paymentForm.jsp When the validation fails the request will be directed to paymentForm.jsp. I wonder if it's possible to direct the request to different pages in my custom validator class. This might be done by setting the input to an intermediate action or jsp, which is however not preferable in my case. In a word, is there a way to tell struts not to use the path defined in input but another one in Validator class? Thank you very much! Bqiao - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pass a collection from struts action to javascript validation
Hi, I'm trying to use custom validator on client side. One problem I can't figure out is how to pass a collection or array of strings to a jsp and how to access it from javascript code for the custom validation rules. I thought about using hidden objects. But I'm really new in both javascript and jsp, so I would appreciate your help should somebody show me some code snippets. Another problem is that I found javascript code for the validator rules like the following: form[oDate[x][0]].value where can I find a reference manual or something that explains the details of this form and other objects. I don't know what they really belong to, javascript, html or jsp? Thank you very much for your help! Bing - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying mulitpage results
hi Peter, Have you tried displaytag before? On Sat, 19 Feb 2005 11:11:27 +0100, Peter Neu [EMAIL PROTECTED] wrote: Hello everybody, in my struts application I used to display a table of query results on one page. Now the results are becoming way too much to display them on one page. What is the best way to implement a mulitpage result view? The problem is I have multi-step workflow and I don't want to confuse the user too much. Best Regards, Peter - 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: Displaying mulitpage results
As far as I know, you may do the paging using logic:iterate. But then you need to build the traversing and sorting functions youself. Regards bq On Sat, 19 Feb 2005 11:51:13 +0100, Peter Neu [EMAIL PROTECTED] wrote: Ok, I will check this out. This a non-struts-project right? Is there also an option only using struts? Bing Qiao schrieb: hi Peter, Have you tried displaytag before? On Sat, 19 Feb 2005 11:11:27 +0100, Peter Neu [EMAIL PROTECTED] wrote: Hello everybody, in my struts application I used to display a table of query results on one page. Now the results are becoming way too much to display them on one page. What is the best way to implement a mulitpage result view? The problem is I have multi-step workflow and I don't want to confuse the user too much. Best Regards, Peter - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]