RE: How to validate in Struts 1.2.7

2005-09-21 Thread Harland, David
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:

MessageResources

2005-09-21 Thread Harland, David
When you create a MessageResources object is it getting the resources from what was stored in memory on startup or directly from the file? 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

RE: html:select tag

2005-09-20 Thread Harland, David
? --RahulJoshi -Original Message- From: rahul [mailto:[EMAIL PROTECTED] Sent: Monday, September 19, 2005 8:43 PM To: Struts Users Mailing List Subject: RE: Radio Button in ActionForm thank you very much It worked! -Original Message- From: Harland, David [mailto:[EMAIL

RE: html:select tag

2005-09-20 Thread Harland, David
with html:options ? --RahulJoshi -Original Message- From: Harland, David [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 20, 2005 6:13 PM To: Struts Users Mailing List Subject: RE: html:select tag Hi, Create an ArrayList object. Iterate through your Hashtable(HashMap is a better option

RE: Radio Button in ActionForm

2005-09-19 Thread Harland, David
Initialise your Action Form set sec equal to 'M' or 'F'. Add the following to your jsp html:radio property=sex name=MyActionForm value=M/ html:radio property=sex name=MyActionForm value=F/ -Original Message- From: rahul [mailto:[EMAIL PROTECTED] Sent: 19 September 2005 13:34 To:

RE: Problem with characters

2005-09-07 Thread Harland, David
Change you encoding to UTF-8. What database are you using? Dave. -Original Message- From: lk [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 09:23 To: user@struts.apache.org Subject: Problem with characters Hi, I have a problem with some characters. My application reads some

RE: Problem with characters

2005-09-07 Thread Harland, David
(Firefox and IE6) decode the pages as UTF-8. BUT: when I enter text using a form (this is configured using the charSet-attribute to html:form to accept ISO-8859-1) IE6 garbles it while Firefox seems to work OK. Any hints? Martin -Ursprüngliche Nachricht- Von: Harland, David [mailto

RE: Error Message Problem (Again)

2005-07-28 Thread Harland, David
Hi, Try the following: Use saveMessages(request, messages) instead of saveErrors(request, errors) And use something like logic:messagesPresent message=true tr tdnbsp;/td tdnbsp;/td tdnbsp;/td /tr html:messages id=message message=true tr tdnbsp;/td td colspan=8

How do you create a Validator rule to compare 3 fields

2005-07-18 Thread Harland, David
I have three checkboxes that can all either be unchecked or only one can be checked. How do I create a Validator rule for this. I don't think it is possible to do this neatly as I think you will always get more than one of the same error message. Can someone please tell me if I am right. Thanks

RE: How do you iterate within an iterate

2005-07-13 Thread Harland, David
Many thanks.. -Original Message- From: Thai Dang Vu [mailto:[EMAIL PROTECTED] Sent: 12 July 2005 17:17 To: user@struts.apache.org Subject: Re: How do you iterate within an iterate I think it can be logic:iterate id=booking name=BOOKINGS scope=request tdbean:write name=booking

How do you have a form with two images do two different things when submitted

2005-06-30 Thread Harland, David
How do you have two images that submit a form but they do two different operations. Thanks Dave. 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

How do you create a ExceptionHandler and error.jsp page

2005-06-29 Thread Harland, David
Hi, I have written an ExceptionHandler below and error.jsp page below but the error page is not displaying the error. Can anyone see why please? Thanks Dave. import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;

How do you make the form remember the form values even if it fails validation

2005-06-17 Thread Harland, David
Hi, How do you make the form remember the form values even if it fails the validation. At the moment I am having to store them in a request attribute before calling validate. Is there an easier way. Thanks Dave. This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this

ActionMessages not being displayed!!!

2005-06-13 Thread Harland, David
I am using the following code in an Action ActionMessages messages = new ActionMessages(); messages.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage(errors.maxbookingsreached)); saveMessages(request,messages); And the following in the page this is forwarding to, but

RE: html:select few doubts

2005-06-09 Thread Harland, David
This is all you need html:select property=testselect html:options collection=COLLECTION property=value labelProperty=label/ /html:select You can store your Collections in either the application/session/request/page scope. Be careful which one you store it in and what names you use as

How do you dynamically create a select with one of the options selected

2005-06-08 Thread Harland, David
How do you dynamically create a select with options for example from a DB and flag one of the options to be selected. The only way I can think of is to write my own tag. Regards Dave. This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are

How do you write a regular expression for allowing single quotes in a word

2005-06-08 Thread Harland, David
How do you write a regular expression for allowing single quotes in a word eg. O'reilly Many thanks Dave. 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

How do you dynamically set one of the options in a select as selected

2005-06-08 Thread Harland, David
I have created an array several namevalue objects and put them in the request object for the html:options to use. How do I flag one of those options to be selected. Many thanks Dave. This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are