Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Frank Schaare
Hi, just read this article on husted.com and it seems to be good advice. When the user submits a page, passes validation without errors, is there a chance to validate business logic in the action ? Therefor i need to - make my validation, - get an errors object, - store the error, - put

RE: Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Pady Srinivasan
PROTECTED] -Original Message- From: Frank Schaare [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 3:35 PM To: Struts Users Mailing List Subject: Submit Once, Validate Twice -- but how ? Hi, just read this article on husted.com and it seems to be good advice. When the user submits

Re: Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Frank Schaare
Hi, thank you, that helps. Now i still need to know how to access the input page (set in action mapping with the input=sample.jsp tag)... I don't have sample code but are you looking for something like this: // in Action execute... ActionErrors errors = new ActionErrors(); // add errors...

RE: Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Joe Germuska
At 3:58 PM -0500 3/24/04, Pady Srinivasan wrote: I don't have sample code but are you looking for something like this: // in Action execute... ActionErrors errors = new ActionErrors(); // add errors... ... // set in request request.setAttribute(org.apache.struts.action.ERROR, errors); // forward

Re: Submit Once, Validate Twice -- but how ?

2004-03-24 Thread Haroon Rafique
On Today at 9:58pm, FS=Frank Schaare [EMAIL PROTECTED] wrote: FS Hi, FS FS thank you, that helps. FS FS Now i still need to know how to access the input page (set in action FS mapping with the input=sample.jsp tag)... Hopefully you will see Joe's response in the same thread, which has the

Can coarse grained ActionForms validate?

2004-03-19 Thread Chan, Jim
fields to validate because the same form serve multiple actions. Also, if I use the ActionForm class to validate the client data, the ActionForm has to be responsible for re-initializing that page with backend information if validation fails. Therefore, even if I change to very fine-grained

RE: Can coarse grained ActionForms validate?

2004-03-19 Thread Irving, Dave
PROTECTED] Sent: 19 March 2004 17:42 To: 'Struts Users Mailing List' Subject: Can coarse grained ActionForms validate? Hi, I am using coarse grained action forms that are re-used by various action classes. Each of these action classes serve a different page and retrieves information from

Re: Can coarse grained ActionForms validate?

2004-03-19 Thread Blake Whitmore
I am using coarse grained forms, I have now way of knowing which fields to validate because the same form serve multiple actions. Also, if I use the ActionForm class to validate the client data, the ActionForm has to be responsible for re-initializing that page with backend information

RE: Can coarse grained ActionForms validate?

2004-03-19 Thread Chan, Jim
initialization code to use when validation fails. -Original Message- From: Blake Whitmore [mailto:[EMAIL PROTECTED] Sent: Friday, March 19, 2004 9:50 AM To: Struts Users Mailing List Subject: Re: Can coarse grained ActionForms validate? Hi Jim, You can specify multiple form bean mappings

RE: Can coarse grained ActionForms validate?

2004-03-19 Thread Blake Whitmore
validate? Hi Jim, You can specify multiple form bean mappings per action form. For insance: form-bean name=registrationForm type=com.pkg.MyFormBean/ form-bean name=otherForm type=com.pkg.MyFormBean/ Then, in your validation.xml, you can have different rules

Validate and Global Errors

2004-03-18 Thread Frers Michael
Hello i have a little question in the MessageTag i can specify an attribute called name to say where he can find the errors or messages in request. Lets say the value is DOIT now how can i make that if i use validate in my FormBean, the ActionErrors are saved under DOIT instead

How to validate selects

2004-03-17 Thread Frank Schaare
Hi all, i´m doing some selects like this: html:select property=foo html:option key=please select value=null/ html:optionsCollection name=foo property=bar/ /html:select Now, i have to validate, that the user has made his choice, which means that the 'foo' property is notNull. Does anyone

RE: How to validate selects

2004-03-17 Thread Brendan Richards
: Frank Schaare [mailto:[EMAIL PROTECTED] Sent: 17 March 2004 17:31 To: Struts Users Mailing List Subject: How to validate selects Hi all, i´m doing some selects like this: html:select property=foo html:option key=please select value=null/ html:optionsCollection name=foo property=bar

DispatchAction and validate

2004-03-02 Thread Frers Michael
Hello i want to use DispatchAction now my questions is can i use in one action the struts-config entry validate=true and in the other action validate=false Thx for any hints Michael

RE: DispatchAction and validate

2004-03-02 Thread Robert Taylor
Yes. The DispatchAction will only invoke the method defined in the request under the name defined in the parameter attribute of your action mapping. So if I had update() and restore() as methods in a DispatchAction, and I only wanted to validate on the update, then I would only define validate

RE: DispatchAction and validate

2004-03-02 Thread as as
] wrote: Yes. The DispatchAction will only invoke the method defined in the request under the name defined in the parameter attribute of your action mapping. So if I had update() and restore() as methods in a DispatchAction, and I only wanted to validate on the update, then I would only define

RE: DispatchAction and validate

2004-03-02 Thread Robert Taylor
and validate do I need an updated .xdt file for this? y xdoclet generated Struts-config.xml is not having the action mappings for the actiin class of mine, extending Dispatch Action. It shows it fine for classes extending Action class though. Thanks n advance for the help, Sam Robert

html:options with validate

2004-02-17 Thread Sniadach, Tomasz
hi , i have an ActionForm with countries in html:options , there are some other fields, that i have to validate. So, when i submit and errors occur, the field selected in countries is set to default. Is there a way to mark the selected field? The other fields (text fields) are not cleared

validate indexed property with DynaValidatorActionForm

2004-02-10 Thread Nathan Maves
Can this be done? I have an Array of my customer objects as the indexed property. Nathan Maves Sun Microsystems - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Re-populating form after validate fails

2004-02-05 Thread Paul Barry
I finally figured this out. It was a stupid mistake. I had html:text property=username value= /. The value= overrides what was in the bean. Once I removed this, problem solved. Paul Barry wrote: If validate fails, your action won't even be processed. You can't use any of the forwards

RE: Re-populating form after validate fails

2004-02-05 Thread Mainguy, Mike
be asdasdf. And if you have html=foo and bean=bar then it should be bar. -Original Message- From: Paul Barry [mailto:[EMAIL PROTECTED] Sent: Thursday, February 05, 2004 8:24 AM To: [EMAIL PROTECTED] Subject: Re: Re-populating form after validate fails I finally figured this out

Re: Re-populating form after validate fails

2004-02-04 Thread Rick Reumann
Paul Barry wrote: action path=/myaccount/login type=myapp.struts.actions.ForwardAction scope=request name=LoginForm validate=false parameter=/WEB-INF/jsp/myaccount/login.jsp / action path=/myaccount/loginAction type=myapp.struts.actions.LoginAction scope=request name

Re: Re-populating form after validate fails

2004-02-04 Thread Paul Barry
If validate fails, your action won't even be processed. You can't use any of the forwards that you may set up for your action, because your action never executes, you can't do a mapping.findForward(failure). Once validate fails, it forwards to the input. The struts example has validate=false

validate at least one field

2004-02-03 Thread Alvaro Martinez
I would like to validate a form that contains several fields where at least one of them should be filled (don't mind what of them) How can I implement this with validator.xml? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED

Re-populating form after validate fails

2004-02-03 Thread Paul Barry
type=myapp.struts.actions.ForwardAction scope=request name=LoginForm validate=false parameter=/WEB-INF/jsp/myaccount/login.jsp / action path=/myaccount/loginAction type=myapp.struts.actions.LoginAction scope=request name=LoginForm validate=true input=/myaccount/login.do / So

Re: Re-populating form after validate fails

2004-02-03 Thread hgosper
and hit Save. In the Form's validate method you fill an ActionErrors object. Then in the SaveAction you will have something like: // If a message is required, save the specified key(s) // into the request for use by the struts:errors tag. if (!errors.isEmpty

Re: Re-populating form after validate fails

2004-02-03 Thread Paul Barry
I can't test this right now, but if I have an ActionMapping with validate=true and no input, won't that result in an error when validate fails? My understanding is that if validate fails, the request processor forwards the request to the input

Re: Re-populating form after validate fails

2004-02-03 Thread hgosper
oops, you could be right. I left that out when I was genericising my action tag... just trying to make it more generic. However, my point is still that when validate fails then the errors will not be empty... that is where your action tells struts to forward as: forward

All values null after Validate

2004-01-15 Thread Søren Blidorf
Hi. I am using struts and I am doing a form validate. When the user types in more than on thing and one of them fails validation, all the values is returned blank. Is there anyway to keep the values when validate error? BR Soren

AW: All values null after Validate

2004-01-15 Thread Oliver Thiel
Nachricht- Von: Søren Blidorf [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 15. Januar 2004 11:16 An: [EMAIL PROTECTED] Betreff: All values null after Validate Hi. I am using struts and I am doing a form validate. When the user types in more than on thing and one of them fails validation

AW: All values null after Validate

2004-01-15 Thread Otto, Frank
Hi Oliver, You can use html:text property=username/ in [extends ActionForm] too. Regards, Frank -Ursprüngliche Nachricht- Von: Oliver Thiel [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 15. Januar 2004 11:21 An: 'Struts Users Mailing List' Betreff: AW: All values null after Validate

SV: All values null after Validate

2004-01-15 Thread Søren Blidorf
That's great. Thanks both I'll try that right away Soren -Oprindelig meddelelse- Fra: Otto, Frank [mailto:[EMAIL PROTECTED] Sendt: 15. januar 2004 11:35 Til: 'Struts Users Mailing List' Emne: AW: All values null after Validate Hi Oliver, You can use html:text property=username

SV: All values null after Validate

2004-01-15 Thread Søren Blidorf
Til: 'Struts Users Mailing List' Emne: AW: All values null after Validate Hi Oliver, You can use html:text property=username/ in [extends ActionForm] too. Regards, Frank -Ursprüngliche Nachricht- Von: Oliver Thiel [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 15. Januar 2004 11:21

Re: Howto answer: Validate two input forms (PDA and 1024x768) for same Action

2004-01-03 Thread Iain Sanderson
Answered my own question. action path=/SchedChoiceActions type= com.medtrix.orview.orstat.schedule.SchedChoiceActions name= SchedChoiceForm validate=true scope=request parameter=livemethod input=/schedule/schedchoices.jsp / and action path=/PdaSchedChoiceActions type

Howto please: Validate two input forms (PDA and 1024x768) for same Action

2004-01-02 Thread Iain Sanderson
I'm evolving a large STRUTS medical application to place some of it's functionality on 802.11b-enabled Pocket PC devices using Mobile IE, reformatting views to the 240x320 pixel resolution for these devices. My method is to test the request header for this resolution and Forward the response on

html array validate

2003-12-22 Thread vico
Hello, (B in my html, i have a array object, (Blike this: (Binput type="text" name="custom" (Binput type="text" name="custom" (B,and when i submit, how to validate it. (Bi want use javascript check,how to w

Re: Validate method in action form

2003-12-18 Thread Ted Husted
. vasudevrao gupta wrote: I have a single action form bean for multiple JSP pages. Validation of fields for JSP1 is different from validation of fields in JSP2. How should I write the validate() method in the form so that depending on the action, appropriate validation of fields is done. Regards

Which framework's validate if preferred? Struts - JSTL

2003-12-01 Thread ZYD
Dear all, Struts and JSTL both have validator framework, which one is preferred if I'm using struts and JSTL in one web application? Thanks. bruce

help: how to validate a Integer type data. that equals blank...

2003-11-28 Thread Ricky
hello, sorry to trouble you of my problem. i hope for the best solution of my problem. i am using DynaValidatorForm to validate my form, and i have form-name, a form property configurate like this: form-property name=author_id type=java.lang.Integer / and in my jsp is : html:select

validation.xml and validate() method

2003-11-24 Thread Honza Spurn
Hi there, as I can see, when I implement the validate() method in the ActionForm, it means, that validation throught validation.xml file (inner struts validation) stops to work. ??? Am I right ??? This seems to me so... Am I doing something wrong? How can I walk throught both validation

Re: validation.xml and validate() method

2003-11-24 Thread Dirk Markert
Hello Sporak, call super.validate(). *** HS Hi there, HS as I can see, when I implement the validate() method in the ActionForm, it HS means, that validation throught validation.xml file (inner struts HS validation) stops to work

Re: validation.xml and validate() method

2003-11-24 Thread Sergey Smirnov
Your form-bean should expand org.apacher.struts.validator.ValidatorForm, not just ActionForm, and your validate() should call validate() from super class (ValidatorForm) to have validation.xml involved. Honza Spurný [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi there, as I can

what is the right way to test whether execute() is called after validate()?

2003-11-18 Thread Janice
I'm sorry if this is too basic, I'm still really green. I'm validating a form. This form is used for adding and editing widgets. I use the same actionHandler, where I test a request parameter and set up the form accordingly. It builds my form object and either resets it for an add, or

Validate Uploads,

2003-11-07 Thread Sunny
Hi friends, I'm a newbie to struts. While uploading a file, I want to validate, whether the user has selected the file or not. i mean i want to handle situation when user submits the form with out selecting any file. in my validation.xml, i've made field's property as depends = required

Re: Validate Uploads,

2003-11-07 Thread Jeff Kyser
that... -jeff On Friday, November 7, 2003, at 08:24 AM, Sunny wrote: Hi friends, I'm a newbie to struts. While uploading a file, I want to validate, whether the user has selected the file or not. i mean i want to handle situation when user submits the form with out selecting any file

Re: Validate Uploads,

2003-11-07 Thread Rajat Pandit
jscript seems to be better idea (IMHO). ps: maybe my ignorance (read lazyness) for reading more about it is the factor. Sunny wrote: Hi friends, I'm a newbie to struts. While uploading a file, I want to validate, whether the user has selected the file or not. i mean i want to handle

validate method

2003-10-31 Thread Khandelwal, Rahul
Hi All, For some reason, I have to do some form field validation in my Action class. And, if the validation fails, I have to return the control to the same(input) page to display the error msg (using html:errors/). I have previously done it in the validate method in the Form bean, but don't know

Re: validate method

2003-10-31 Thread Ben Anderson
] To: [EMAIL PROTECTED] Subject: validate method Date: Fri, 31 Oct 2003 15:47:37 +0530 Hi All, For some reason, I have to do some form field validation in my Action class. And, if the validation fails, I have to return the control to the same(input) page to display the error msg (using html:errors/). I

RE: How to validate html:radio is selected on a JSP page?

2003-10-26 Thread Rajat Pandit
Lets hope for someone to reply to this! :D -Original Message- From: ZYD [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 10:50 AM To: Struts Users Mailing List Subject: Re: How to validate html:radio is selected on a JSP page? Yes, that works. But that's not decent like you

Re: How to validate html:radio is selected on a JSP page?

2003-10-26 Thread ZYD
: How to validate html:radio is selected on a JSP page? Lets hope for someone to reply to this! :D -Original Message- From: ZYD [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 10:50 AM To: Struts Users Mailing List Subject: Re: How to validate html:radio is selected

How to validate html:radio is selected on a JSP page?

2003-10-25 Thread ZYD
Hi friends, How to make sure a radiobox is selected on a JSP page using validator? I cannot use: field property=prjType depends=required arg0 key=newProject.label.prjType/ /field Thanks -bruce

RE: How to validate html:radio is selected on a JSP page?

2003-10-25 Thread Rajat Pandit
I couldn't find a workaround for that so far. I use the validate() method of the actionform. Pretty lame! Eh! -Original Message- From: ZYD [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 10:33 AM To: Struts Users Mailing List Subject: How to validate html:radio is selected

Re: How to validate html:radio is selected on a JSP page?

2003-10-25 Thread ZYD
Subject: RE: How to validate html:radio is selected on a JSP page? I couldn't find a workaround for that so far. I use the validate() method of the actionform. Pretty lame! Eh! -Original Message- From: ZYD [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 10:33 AM To: Struts

Multiple error pages from validate method

2003-10-24 Thread VKeswani
Hello, I am using one ActionForm bean for multiple pages..say for add.jsp and edit.jsp.But when I validate and I get an error I want the user to go to different error pages instead of one just specified in struts-config file as input parameter? Can somebody help??

Re: Multiple error pages from validate method

2003-10-24 Thread Geeta Ramani
Here's one hacky way of doing this: Set a request attribute, something like goToErrorPage2 right after you validate. On the top of the error page if that attribute goToErrorPage2 is nonnull, then forward to the second error page else simply render the normal error page.. [EMAIL PROTECTED] wrote

Re: Multiple error pages from validate method

2003-10-24 Thread VKeswani
from validate method Here's one hacky way of doing this: Set a request attribute, something like goToErrorPage2 right after you validate. On the top of the error page if that attribute goToErrorPage2 is nonnull, then forward to the second error page else simply render the normal error page

RE: Multiple error pages from validate method

2003-10-24 Thread Chen, Gin
Here's another way that I can think of: I'm assuming you will have 2 actions (one for add and one for edit) or a single action that uses a lookupdispatch add/edit handling. In either case don't have validate=true in your struts-config but rather do the validation from your action method: public

RE: Multiple error pages from validate method

2003-10-24 Thread VKeswani
Thanks Tim.This too makes good sense..thanks Chen, Gin [EMAIL PROTECTED] 10/24/2003 02:45 PM Please respond to Struts Users Mailing List To: 'Struts Users Mailing List' [EMAIL PROTECTED] cc: Subject:RE: Multiple error pages from validate method Here's

Re: Multiple error pages from validate method

2003-10-24 Thread Geeta Ramani
have validate=true in your struts-config but rather do the validation from your action method: public ActionForward addAction() { ActionErrors errors = myBean.validate(...); if( errors != null !errors.isEmpty()) { return aMapping.findForward(ERROR_PAGE_ADD

Re: Multiple error pages from validate method

2003-10-24 Thread Max Cooper
Subject: Multiple error pages from validate method Hello, I am using one ActionForm bean for multiple pages..say for add.jsp and edit.jsp.But when I validate and I get an error I want the user to go to different error pages instead of one just specified in struts-config file as input parameter

Reset() and validate() using DynaActionForm

2003-10-21 Thread Shishir K. Singh
Hello, I am trying to use DynaActionForm. However, I would like to have the reset() and validate() functionality using DynaActionForm. Any pointers as to how to get around this without going back to ActionForm. TIA Shishir

RE: Reset() and validate() using DynaActionForm

2003-10-21 Thread Chen, Gin
RTFM: http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_act ion_form_classes If need be, you can extend the DynaActionForm to add custom validate and reset methods you might need. Simply specify your subclass in the struts-config instead. However, you cannot mix

DynaValidatorActionForm does not validate data

2003-10-20 Thread icorcos
Hi All, There was a known bug regarding the DynaValidatorActionForm class not working with the Validator framework. This bug was reported as bug 10432 in bugzilla (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10432). From my understanding, this bug was supposed to be fixed before the

Correction: DynaValidatorForm.validate() does not seemt o validate Integers when called from DispatchAction [Re: Problem validating form manually in DispatchAction]

2003-10-10 Thread Elie Medeiros
In reference to the problem below, it actually seems that the DynaValidatorForm.validate() method does validate Strings, but not Integers any clues appreciated Elie Hi there, am having a problem validating a form manually using the DynaValidatorForm.validate() function. For some reason

problem with forwarding to input from the method validate

2003-10-10 Thread Raphaël di Cicco
Hi, I'm working with Struts 1.1 and tiles. It seems like the validate() can't forward to my tiles page when an ActionErrors occurs. Here is my struts-config.xml file : action path=/EditDossCEAction type=com.atosorigin.agrippa.web.communs.doss.EditDossCEAction scope=request name=EditDossCEForm

Re: Validate values in collection?

2003-09-26 Thread Timo Neumann
Natalie D Rassmann wrote: Hi Natalie and everybody, do you know if I can do a requiredif check against a second property in the same bean? something like: form name=FundForm field property=value indexedListProperty=funds depends=integer,requiredif arg0 key=global.value/ var

Re: Validate values in a collection

2003-09-26 Thread Rassmann, Natalie D
to validate an indexed property and a non-indexed property. The getProperty method in the common-beanutils kept getting an error when trying to use reflection to find the second property (the one that was not no part of the collection). In other words, I was trying to compare an item in an ArrayList

Validate values in collection?

2003-09-25 Thread Timo Neumann
Hi all, is it possible to use the validator framework to check values of beans that are stored in a collection in a DynaValidatorForm? TIA, Timo -- FF Computer AnwendungenTel: +49 89 51727-352 und Unternehmensberatung GmbH Fax: +49 89 51727-111 Westendstr. 195 Mail:

Re: Validate values in collection?

2003-09-25 Thread Natalie D Rassmann
yes Timo Neumann wrote: Hi all, is it possible to use the validator framework to check values of beans that are stored in a collection in a DynaValidatorForm? TIA, Timo -- FF Computer AnwendungenTel: +49 89 51727-352 und Unternehmensberatung GmbH Fax: +49 89 51727-111

Re: Validate values in collection?

2003-09-25 Thread Timo Neumann
Natalie D Rassmann wrote: yes how? Timo Neumann wrote: Hi all, is it possible to use the validator framework to check values of beans that are stored in a collection in a DynaValidatorForm? TIA, Timo -- FF Computer AnwendungenTel: +49 89 51727-352 und Unternehmensberatung GmbH Fax:

Re: Validate values in collection?

2003-09-25 Thread Natalie D Rassmann
Like you would any other type of form. Do you know how to set up the validator framework? If not try this link below: http://jakarta.apache.org/struts/userGuide/dev_validator.html Timo Neumann wrote: Natalie D Rassmann wrote: yes how? Timo Neumann wrote: Hi all, is it

Re: Validate values in collection?

2003-09-25 Thread Timo Neumann
Natalie D Rassmann wrote: So this works if forms is a collection of beans with a property value? form name=FundForm field property=forms.value depends=integer arg0 key=global.value/ /field /form Like you would any other type of form. Do you know how to set up

Re: Validate values in collection?

2003-09-25 Thread Natalie D Rassmann
It depends on if it is indexed or not. Here is an example that I have... field property=prepTime indexedListProperty=prepTime depends=float,isFloatNegative page=3 arg0 key=label.revRec.mtgMetricPrepTime/ /field I am using a multi-page for that is why I have the page

RE: Validate values in collection?

2003-09-25 Thread Nimish Chourey , Tidel Park - Chennai
You can always extend DynaValidatorForm and overwrite the validate method . -Original Message- From: Timo Neumann [mailto:[EMAIL PROTECTED] Sent: Thursday, September 25, 2003 6:06 PM To: Struts Users Mailing List Subject: Re: Validate values in collection? Natalie D Rassmann wrote

Re: Validate values in collection?

2003-09-25 Thread Timo Neumann
Natalie D Rassmann wrote: Hi Natalie, now I got it. Thanks a lot. Timo It depends on if it is indexed or not. Here is an example that I have... field property=prepTime indexedListProperty=prepTime depends=float,isFloatNegative page=3 arg0

setting an ActionErrors object for a form outside a validate method...

2003-09-20 Thread alan
My Action class does some processing that involves going to the database. This work could throw a SQLException and I want that to generate an error message for the user. However I don't want to do this work in the validate method, only to have to do it again in the execute method (besides

RE: setting an ActionErrors object for a form outside a validate method...

2003-09-20 Thread Charles Canning
a validate method... My Action class does some processing that involves going to the database. This work could throw a SQLException and I want that to generate an error message for the user. However I don't want to do this work in the validate method, only to have to do it again in the execute

RE: setting an ActionErrors object for a form outside a validate method...

2003-09-20 Thread alan
Thank you. saveErrors() had eluded me. -Original Message- From: Charles Canning [mailto:[EMAIL PROTECTED] Sent: Saturday, September 20, 2003 11:52 AM To: 'Struts Users Mailing List' Subject: RE: setting an ActionErrors object for a form outside a validate method... Hi Alan, Here

ActionForm validate() - How to get ServletContext from HttpSessio n in J2EE 1.2

2003-09-15 Thread Chang, Henrique
: In my ActionForm validate() method I need to access an object saved to the Application context; however, I can only get access to the Application context by means of : request.getSession().getServletContext().getAttribute(myAttributeName); Since the ActionForm validate

Re: ActionForm validate() - How to get ServletContext from HttpSessio n in J2EE 1.2

2003-09-15 Thread Craig R. McClanahan
On Mon, 15 Sep 2003, Chang, Henrique wrote: Date: Mon, 15 Sep 2003 11:32:38 -0400 From: Chang, Henrique [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: ActionForm validate() - How to get ServletContext from

Validate and DispatchAction

2003-09-10 Thread Natalie D Rassmann
Hi - I am trying to get the validator framework to work with dispatchAction. When I turn validation on, it seems as though I don't go to the action first. (in my action I make several options lists which need to be displayed as part of the form). I must be doing something wrong but I don't know

Avoid Validate After Submit

2003-09-05 Thread Andre Michel
Hello ... I'd like to have two submit buttons on a page. Pressing no. 1 should run through validation, pressing no. 2 should avoid this. How am I able to this in a good way? I'm using Struts 1.01 thus validate method is in the form bean. Any hints would be welcomed, Andre Michel

RE: Avoid Validate After Submit

2003-09-05 Thread Mark Galbreath
You can't unless you move the validation to the Action class. Mark -Original Message- From: Andre Michel [mailto:[EMAIL PROTECTED] Sent: Friday, September 05, 2003 8:36 AM To: [EMAIL PROTECTED] Subject: Avoid Validate After Submit Hello ... I'd like to have two submit buttons

RE: Avoid Validate After Submit

2003-09-05 Thread Pady Srinivasan
I don't know if this works in 1.01 but I tried in 1.1. You can use the HttpServletRequest passed into the validate method to find out which button was pressed ( getParameter(Button2) ), and return an empty ActionErrors. Thanks -- pady [EMAIL PROTECTED] -Original Message- From

RE: Avoid Validate After Submit

2003-09-05 Thread Kurt Post
and cancel buttons make sure they are html:cancel buttons. This insures that the JavaScript validator will not validate the form. I'll include ExtendedActionBase.java below. Hope this helps, Kurt --- /* * ExtendedActionForm.java * * Created on July 11, 2003, 10:39 AM

Re: ANYONE Know How To Validate Nested Form Beans?

2003-09-02 Thread Mark Lowe
Okay Sorry i took a while i forgot about it. So we've a nested user bean as a form property //struts config form-property name=user type=com.sparrow.UserBean / //in validator field property=user.email depends=required,email .. //jsp html:text property=user.email / Cheers Mark On Monday,

ANYONE Know How To Validate Nested Form Beans?

2003-09-01 Thread Terry Brick
(nested props and all). However, the validator just totally ignores the nested beans. What do I need to do in my validations.xml to get it to validate nested form beans? I've tried the following (totally made it up)... field property=my_collection_property indexedListProperty=form_bean_name

Re: ANYONE Know How To Validate Nested Form Beans?

2003-09-01 Thread Mark Lowe
in my validations.xml to get it to validate nested form beans? I've tried the following (totally made it up)... field property=my_collection_property indexedListProperty=form_bean_name .. and that form_bean_name is the name of another form entry in my validation.xml. Anybody know where I'm going wrong

RE: displaying collections after a validate() error

2003-09-01 Thread Robert Taylor
messages will be displayed. 2. Populate your collection in the form.reset() HTH, robert -Original Message- From: Graham Stark [mailto:[EMAIL PROTECTED] Sent: Sunday, August 31, 2003 5:12 PM To: Struts Users Mailing List Subject: displaying collections after a validate() error Hi

Re: ANYONE Know How To Validate Nested Form Beans?

2003-09-01 Thread Terry Brick
Thank you much for your response. Two things 1) Sorry, I left out a big piece of detail. I'm interested in doing this validation only on the server side (no javascript). Yet I still can't get it to work. Are you saying that I'm doing it correctly as show here? field

RE: ANYONE Know How To Validate Nested Form Beans?

2003-09-01 Thread Richard Mixon
Terry, Thanks for asking the question - I've asked a similar question in the past. I did not realize that validator has some collection support, I may look further into that. I used a different approach by putting together a little glue code in my main form bean's validate method. For example, I

Re: ANYONE Know How To Validate Nested Form Beans?

2003-09-01 Thread Mark Lowe
Thats strange I'll have to check how i was getting them working. I'll have a look over where i've got it working (I don't think there were any hacks in there but its possible). Cheers Mark On Monday, September 1, 2003, at 04:28 PM, Terry Brick wrote: Thank you much for your response. Two

RE: ANYONE Know How To Validate Nested Form Beans?

2003-09-01 Thread Terry Brick
Well it seems to be a mystery still whether it does or does not. Sounds like Mark has done it but he's checking to see if it was custom or using built in functionality. I guess it was just an assumption on my part that it DID have it built in because it seems pretty fundamental/basic to me...

displaying collections after a validate() error

2003-08-31 Thread Graham Stark
=${domain.roleDescription}//td [] Whilst single valued fields are displayed like: html:textarea property=notes cols=15 All seems well, and everything displays fine. However, the ActionForm has a validate() method, which send the user back at the form, which displays some error messages. When

javascript not working after validate

2003-08-28 Thread ryan
I have some javascript functions on my form that stop working when the validate method for the form returns ActionErrors. Has anyone run into this problem before? This occurs in both IE and mozilla Thanks Ryan - To unsubscribe

How to get Messages Resources from the validate method?

2003-08-24 Thread [EMAIL PROTECTED]
In order to avoid using the deprecated getResources method from the ActionServlet, I would like to know how to get access to the module message resources bundles configured in the struts-config.xml from the ActionForm validate method. Thanks. Antonio Gonzalez

Why would I want to use the ActionForm validate() method

2003-08-19 Thread Madhu Nair
Hi, Why would I want to use the Struts ActionForm validate() method when I can achieve the same functionality using Javascript? Regards , Madhu - Madhu Nair Member of Technical Staff, Persistent Systems Private Limited, Pune 411016 INDIA. Tel: +91-20

Re: Why would I want to use the ActionForm validate() method

2003-08-19 Thread vellosa
What happens of the user disables javascript in their browser? from:Madhu Nair [EMAIL PROTECTED] date:Tue, 19 Aug 2003 07:05:01 to: [EMAIL PROTECTED] subject: Re: Why would I want to use the ActionForm validate() method Hi, Why would I want to use the Struts

RE: Why would I want to use the ActionForm validate() method

2003-08-19 Thread Madhu Nair
Hi, Why would I want to use the Struts ActionForm validate() method when I can achieve the same functionality using Javascript? I assume that the user would never disable javascript. Regards , Madhu - To unsubscribe, e

Re: Why would I want to use the ActionForm validate() method

2003-08-19 Thread Vipin Bhatia
platforms - Original Message - From: Madhu Nair [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 12:03 PM Subject: RE: Why would I want to use the ActionForm validate() method Hi, Why would I want to use the Struts ActionForm validate() method when I

  1   2   3   4   5   >