Re: How to validate in Struts 1.2.7
On 9/21/05, Francisco Antonio Vieira Souza <[EMAIL PROTECTED]> wrote: > Ok, thanks but those examples were developed with Struts 1.1, and I am > afraid something has changed in Struts 1.2.7 Not much. Download MailReader Demo application and check out how username and password are validated. By the way, I probably have some conflict between validator and Struts versions, I am able to use Validator on one machine, but it throws exception on another machine. So, you may want to first make sure that MailReader works with your set of Struts and validator libraries, then test your own code. Michael. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to validate in Struts 1.2.7
Ok, thanks but those examples were developed with Struts 1.1, and I am afraid something has changed in Struts 1.2.7 Harland, David escreveu: Go to this address and download the sample application code. http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764544373,descCd-download_code.html In the chapter 12 directory is a lot of examples of how to use the struts validator correctly. Regards Dave. -Original Message- From: Francisco Antonio Vieira Souza [mailto:[EMAIL PROTECTED] Sent: 21 September 2005 10:17 To: Struts Users Mailing List Subject: How to validate in Struts 1.2.7 Considering that nobody saw my big previous message about this subject. I ask you all, does anyone could provide me any example of validation in Struts 1.2.7? (since until now I had no success) ___ Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e muito mais. Instale agora! www.yahoo.com.br/messenger/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 quoting the name of the sender and the email address to which it has been sent and then delete it. Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments. DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership registered in England and Wales (registered number OC307847) which provides services from offices in England, Belgium, Germany and the People's Republic of China. A list of members is open for inspection at its registered office and principal place of business 3 Noble Street, London EC2V 7EE. Partner denotes member of a limited liability partnership. DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a member of DLA Piper Rudnick Gray Cary, a global legal services organisation, the members of which are separate and distinct legal entities. For further information, please refer to www.dlapiper.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e muito mais. Instale agora! www.yahoo.com.br/messenger/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to validate in Struts 1.2.7
Go to this address and download the sample application code. http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764544373,descCd-download_code.html In the chapter 12 directory is a lot of examples of how to use the struts validator correctly. Regards Dave. -Original Message- From: Francisco Antonio Vieira Souza [mailto:[EMAIL PROTECTED] Sent: 21 September 2005 10:17 To: Struts Users Mailing List Subject: How to validate in Struts 1.2.7 Considering that nobody saw my big previous message about this subject. I ask you all, does anyone could provide me any example of validation in Struts 1.2.7? (since until now I had no success) ___ Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e muito mais. Instale agora! www.yahoo.com.br/messenger/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 quoting the name of the sender and the email address to which it has been sent and then delete it. Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments. DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership registered in England and Wales (registered number OC307847) which provides services from offices in England, Belgium, Germany and the People's Republic of China. A list of members is open for inspection at its registered office and principal place of business 3 Noble Street, London EC2V 7EE. Partner denotes member of a limited liability partnership. DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a member of DLA Piper Rudnick Gray Cary, a global legal services organisation, the members of which are separate and distinct legal entities. For further information, please refer to www.dlapiper.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to validate in Struts 1.2.7
Thanks a lot my friend, but consider using DynaForm, how could I do that? David Delbecq escreveu: This will help you :) don't forget to add validate=true in your struts-config.xml public class MyForm extends ActionForm { public static int MAX =100; private Integer value; public Integer getValue() { return value; } public void setValue(Integer value) { this.value = value; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest args) { ActionErrors errors = new ActionErrors(); if (getValue().intValue()<0) errors.add("value",new ActionMessage("value.MustBePositive")); if (getValue().intValue()>=MAX) errors.add("value",new ActionMessage("value.MustBeBelowMax")); return errors; } } Francisco Antonio Vieira Souza a écrit : Considering that nobody saw my big previous message about this subject. I ask you all, does anyone could provide me any example of validation in Struts 1.2.7? (since until now I had no success) ___ Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e muito mais. Instale agora! www.yahoo.com.br/messenger/ - 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] ___ Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e muito mais. Instale agora! www.yahoo.com.br/messenger/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to validate in Struts 1.2.7
This will help you :) don't forget to add validate=true in your struts-config.xml public class MyForm extends ActionForm { public static int MAX =100; private Integer value; public Integer getValue() { return value; } public void setValue(Integer value) { this.value = value; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest args) { ActionErrors errors = new ActionErrors(); if (getValue().intValue()<0) errors.add("value",new ActionMessage("value.MustBePositive")); if (getValue().intValue()>=MAX) errors.add("value",new ActionMessage("value.MustBeBelowMax")); return errors; } } Francisco Antonio Vieira Souza a écrit : > Considering that nobody saw my big previous message about this subject. > I ask you all, does anyone could provide me any example of validation > in Struts 1.2.7? (since until now I had no success) > > > > > > ___ Novo Yahoo! > Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e muito > mais. Instale agora! www.yahoo.com.br/messenger/ > > - > 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]