Altering querystring between requests
Say we have a request parameter that tracks the requested size offset of a ResultSet (eg search engine results the next or page number links). Before struts I used to just do a simple regex replace of this parameter in the search string. Obviously I don't want any url logic in the business tier. I use a subclassed DynaActionForm, I thought I could add a method that built the query string from the Map, based on the old Map and a new passed in parameter name value pair. Then a method for retrieval for jstl of the required 'get()' form I could then use this in the jsp ${myForm.newQueryString} Anyone know of the typical approach, I'm probably missing something simpler. Also does anyone have a seperate tier ie: view, *viewLogic*, controller, model. I just hate putting all the view logic stuff in jsp. -- Mike W - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Altering querystring between requests
- Original Message - From: Mike Whittaker [EMAIL PROTECTED] To: Struts List [EMAIL PROTECTED] Sent: Sunday, August 17, 2003 11:05 AM Subject: Altering querystring between requests Say we have a request parameter that tracks the requested size offset of a ResultSet (eg search engine results the next or page number links). Anyone know of the typical approach, I'm probably missing something simpler. My approach : I have page number as a request parameter, a and show the results according to this parameter. To move between pages I have direct link to the same page with new page parameter. I don`t use ActionForward, because for me it doesn`t make sense. Jacek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: struts sequence diagrams
I am trying to make Sequence diagrams for typical add customer, delete customer, delete customer . Can you give me some guidance for struts1.1. Best REGARDS, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. Visit Us at http://www.polaris.co.in - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: struts sequence diagrams
This cud be a good starting point http://rollerjm.free.fr/pro/StrutsExample.htm regds, Rakesh Ayilliath -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, August 17, 2003 3:57 PM To: [EMAIL PROTECTED] Subject: FW: struts sequence diagrams I am trying to make Sequence diagrams for typical add customer, delete customer, delete customer . Can you give me some guidance for struts1.1. Best REGARDS, [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:link can't access DAF getMap()
Okay I've RTFM. html:link seems it should do the job with its populating from a map abilities. html:link page=/blah.do name=myForm property=map TEST /html:link However, I give it my DynaActionForm (with its getMap() method) and the property 'map' and I get: javax.servlet.ServletException: No getter method for property map of bean myForm which is really wierd, because at the same time I can do: c:out value=${myForm.map['aParam']} / I think it is looking for a form-property called 'map'. How do I access this method through html:link ? -- Mike W - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem in validation requiredif in struts 1.1 that worked fine in Struts 1.1 RC1
Hello Dera All, I am resending this request as I could not ascertain whether it is delivered to user group or not -Udaya Dear All, Validation requiredif worked fine in my project when using Struts 1.1 RC1 I upgraded or using now struts 1.1. suddenly the requiredif validation is not working. So much of my validation stopped working. The error is as follows. Please help me. Thank you very much in advance. Caused by: java.lang.NullPointerException at org.apache.struts.validator.FieldChecks.validateRequiredIf(FieldChecks.java:200) ... 43 more 12:01:23,995 ERROR [Validator] reflection: null java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:435) at org.apache.commons.validator.Validator.validateField(Validator.java:512) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: getDataSource compile Error
I think perhaps there was a change in the getDataSource method somewhere along the way.. ServletContext context = servlet.getServletContext(); DataSource ds = (DataSource) context.getAttribute(yourkey); I doubt that you've the same version of struts on you live and your dev server, else what works on one would work on both. I suspect that you've an older version of struts running on your dev server. Cheers Mark On Sunday, August 17, 2003, at 06:08 AM, Lynda Brown wrote: Anyone have any ideas why getDataSource(request) would not be able to compile. I am using j2sdk1.4.1_03, struts1.1, and jwsdp1.2. I have one computer with this set up and runs with no problems, and when I tried to duplicate the enviornment on another computer I get thecannot resolve symbol compile error. Struts seems to be set up okay, and all of the example war files run fine. I was jsut looking for some ideas. Thanks, Lynda Brown - Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
DynaValidatorForm
Hello all: I am iterating over a list of products and for each iteration I need to render a form bean with a single text field in which a user must enter a number in order to add the product to a shopping cart. my form bean definition is as follows: form-bean name=addToCartForm type=org.apache.struts.validator.DynaValidatorForm form-property name=productId type=java.lang.String/ form-property name=quantity type=java.lang.String initial=1/ /form-bean What ends up happening in my iteration in the JSP is that every form bean will of course have the same name. So what ends up happening is that every form bean in the page is essentially the same object. So whenever any validation fails on the page, all the form beans will end up having the same value when I what I really what is for each form bean to be independent of any other form. What I need is a way to alias each form bean for each product with a different name. I have tried adding each individual form bean in the struts-config, but what happens is that I end up getting a null when I try to output the form bean with: html-form name='productForm${product.productId}' type='org.apache.struts.validator.DynaValidatorForm' action='/someAction'/ ...rest of form bean. As you will notice, the name of the form bean depends on the current product id in the iteration. I'm not quite sure if this is the correct way to go, but I would appreciate any comments someone might have. Thanks in advance __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:link can't access DAF getMap()
This might work html:link name=myform.map or html:link name=myform property=map.property or html:link name-myform property=map('property') in which case what's wrong with html:link name=myForm property=property You've been doing this with struts tags.. c:out value=${myForm.map} / Hope this helps Mark On Sunday, August 17, 2003, at 02:33 PM, Mike Whittaker wrote: Okay I've RTFM. html:link seems it should do the job with its populating from a map abilities. html:link page=/blah.do name=myForm property=map TEST /html:link However, I give it my DynaActionForm (with its getMap() method) and the property 'map' and I get: javax.servlet.ServletException: No getter method for property map of bean myForm which is really wierd, because at the same time I can do: c:out value=${myForm.map['aParam']} / I think it is looking for a form-property called 'map'. How do I access this method through html:link ? -- Mike W - 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: DynaValidatorForm
You need the indexed attribute on you form properties html:text property=productId indexed=true / with render to input type=text name=productId[0] value= Keyword: indexed properties. Cheers Mark On Sunday, August 17, 2003, at 03:00 PM, Juan Alvarado wrote: Hello all: I am iterating over a list of products and for each iteration I need to render a form bean with a single text field in which a user must enter a number in order to add the product to a shopping cart. my form bean definition is as follows: form-bean name=addToCartForm type=org.apache.struts.validator.DynaValidatorForm form-property name=productId type=java.lang.String/ form-property name=quantity type=java.lang.String initial=1/ /form-bean What ends up happening in my iteration in the JSP is that every form bean will of course have the same name. So what ends up happening is that every form bean in the page is essentially the same object. So whenever any validation fails on the page, all the form beans will end up having the same value when I what I really what is for each form bean to be independent of any other form. What I need is a way to alias each form bean for each product with a different name. I have tried adding each individual form bean in the struts-config, but what happens is that I end up getting a null when I try to output the form bean with: html-form name='productForm${product.productId}' type='org.apache.struts.validator.DynaValidatorForm' action='/someAction'/ ...rest of form bean. As you will notice, the name of the form bean depends on the current product id in the iteration. I'm not quite sure if this is the correct way to go, but I would appreciate any comments someone might have. Thanks in advance __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - 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]
requiredif - Is this correct or wrong ? -Help me
Hello Dear All, Please help me to find fault in hte following code for requiredif validation and identical(password) comparision that worked fine in Struts 1.1 RC1 but giving java.lang.NullPointerException with Struts 1.1 final release at org.apache.struts.validator.FieldChecks.validateRequiredIf(FieldChecks.java:200) Please help me. Thanks -Udaya form name=myaccountEmailForm field property=newpassword depends=requiredif,identical arg0 key=form.password.new/ arg1 key=form.password.confirm/ var var-namefield[0]/var-name var-valuecurrentPage/var-value /var var var-namefield-test[0]/var-name var-valueEQUAL/var-value /var var var-namefield-value[0]/var-name var-value2/var-value /var var var-namesecondProperty/var-name var-valueconfirmpassword/var-value /var /field /form validator name=identical classname=com.register.utils.ValidateUtil method=validateIdentical methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, javax.servlet.http.HttpServletRequest depends=requiredif msg=errors.identical/ validator name=requiredif classname=org.apache.struts.validator.FieldChecks method=validateRequiredIf methodParams=java.lang.Object, org.apache.commons.validator.ValidatorAction, org.apache.commons.validator.Field, org.apache.struts.action.ActionErrors, org.apache.commons.validator.Validator, javax.servlet.http.HttpServletRequest msg=errors.required /validator public static boolean validateIdentical(Object bean, ValidatorAction va, Field field, ActionErrors errors, HttpServletRequest request) { String value = ValidatorUtil.getValueAsString(bean, field.getProperty()); String sProperty2 = field.getVarValue(secondProperty); String value2 = ValidatorUtil.getValueAsString(bean, sProperty2); if (!GenericValidator.isBlankOrNull(value)) { try { if (!value.equals(value2)) { errors.add(field.getKey(), Resources.getActionError(request, va, field)); return false; } } catch (Exception e) { errors.add(field.getKey(), Resources.getActionError(request, va, field)); return false; } } return true; } Caused by: java.lang.NullPointerException at org.apache.struts.validator.FieldChecks.validateRequiredIf(FieldChecks.java:200) ... 43 more 12:01:23,995 ERROR [Validator] reflection: null java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.validator.Validator.validateFieldForRule(Validator.java:435) at org.apache.commons.validator.Validator.validateField(Validator.java:512) - 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: html:link can't access DAF getMap()
This might work html:link name=myform.map Cannot find bean myForm.map in any scope or html:link name=myform property=map.property I want the java.util.Map for property attribute of html:link infact, I'll probably want a different method of subclassed DAF that gives a modification of the Map. I just want to render a link similar to the previous request, changing one params value. or html:link name-myform property=map('property') ditto in which case what's wrong with html:link name=myForm property=property ditto -- Mike W - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaValidatorForm
form-property name=product type=java.util.ArrayList / ArrayList prodList = new ArrayList(); prodList.add(new com.sparrow.beans.Product()); theForm.set(product, prodList); [not using form-property type=com.sparrow.beans.Product[] as i have this working with array list, but i could be mistaken for my reasons] html:text name=product property=id indexed=true / renders to... input type=text name=product[0].id value= Cheers Mark On Sunday, August 17, 2003, at 03:07 PM, Mark Lowe wrote: You need the indexed attribute on you form properties html:text property=productId indexed=true / with render to input type=text name=productId[0] value= Keyword: indexed properties. Cheers Mark On Sunday, August 17, 2003, at 03:00 PM, Juan Alvarado wrote: Hello all: I am iterating over a list of products and for each iteration I need to render a form bean with a single text field in which a user must enter a number in order to add the product to a shopping cart. my form bean definition is as follows: form-bean name=addToCartForm type=org.apache.struts.validator.DynaValidatorForm form-property name=productId type=java.lang.String/ form-property name=quantity type=java.lang.String initial=1/ /form-bean What ends up happening in my iteration in the JSP is that every form bean will of course have the same name. So what ends up happening is that every form bean in the page is essentially the same object. So whenever any validation fails on the page, all the form beans will end up having the same value when I what I really what is for each form bean to be independent of any other form. What I need is a way to alias each form bean for each product with a different name. I have tried adding each individual form bean in the struts-config, but what happens is that I end up getting a null when I try to output the form bean with: html-form name='productForm${product.productId}' type='org.apache.struts.validator.DynaValidatorForm' action='/someAction'/ ...rest of form bean. As you will notice, the name of the form bean depends on the current product id in the iteration. I'm not quite sure if this is the correct way to go, but I would appreciate any comments someone might have. Thanks in advance __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - 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]
[OT] BaseBean portal
Does know anybody anything about the portal from www.baseBean.com Perhaps they would care to comment on it ? _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] BaseBean portal
To you? I thought you knew everything already, if there's an example to copy and paste that is.. I think its vic's site. He's one of the commiters and done some stuff with iBatis and struts I think.. Why are you still looking for other folks to do you work? On Sunday, August 17, 2003, at 03:33 PM, message message wrote: Does know anybody anything about the portal from www.baseBean.com Perhaps they would care to comment on it ? _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - 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]
DynaValidatorForm and DynaValidatorActionForm
What is the difference between DynaValidatorForm and DynaValidatorActionForm ? What would be the reasons for using one over the other? (And have I missed something obvious in the documentation here?) Thanks for any help! -- Louise Pryor http://www.louisepryor.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [JDBC] patch: add a finalizer to AbstractJdbc1Statement
On 17/08/2003 15:00 Oliver Jowett wrote: This patch adds a finalizer to AbstractJdbc1Statement that closes the statement. Without this, when server-side preparation is in use statements that are executed then discarded without an explicit close() will leak resources on the backend while that connection remains open, as a DEALLOCATE never gets executed. Not a good solution IMHO. Relying on GC to clean up resource leaks is a poor solution. And it you simply System.exit() the JVM, GC is not called at all. -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +--+-+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:link can't access DAF getMap()
Is myForm scoped to the page? Cheers Mark On Sunday, August 17, 2003, at 03:21 PM, Mike Whittaker wrote: This might work html:link name=myform.map Cannot find bean myForm.map in any scope or html:link name=myform property=map.property I want the java.util.Map for property attribute of html:link infact, I'll probably want a different method of subclassed DAF that gives a modification of the Map. I just want to render a link similar to the previous request, changing one params value. or html:link name-myform property=map('property') ditto in which case what's wrong with html:link name=myForm property=property ditto -- Mike W - 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: html:link can't access DAF getMap()
sorry mike i meant mapped to the action On Sunday, August 17, 2003, at 03:57 PM, Mark Lowe wrote: Is myForm scoped to the page? Cheers Mark On Sunday, August 17, 2003, at 03:21 PM, Mike Whittaker wrote: This might work html:link name=myform.map Cannot find bean myForm.map in any scope or html:link name=myform property=map.property I want the java.util.Map for property attribute of html:link infact, I'll probably want a different method of subclassed DAF that gives a modification of the Map. I just want to render a link similar to the previous request, changing one params value. or html:link name-myform property=map('property') ditto in which case what's wrong with html:link name=myForm property=property ditto -- Mike W - 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]
RE: Problem in validation requiredif in struts 1.1 that worked fine in Struts 1.1 RC1
The format of the variable names changed before Struts 1.1 final. In your validator, try replacing your var-names field-test[0] and field-value[0] with fieldTest[0] and fieldTest[0], respectively. You can see this format in the example at http://jakarta.apache.org/struts/userGuide/dev_validator.html -Greg Ludington - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem in validation requiredif in struts 1.1 that worked fine in Struts 1.1 RC1
Thank you very much, Greg Ludington That must be the reason of failure. But can you advise me whether the validator dtd will be automatically upgraded/comes with Struts1.1 final or I have to change/configure it or not necessary to bother about it i.e there is no relation to it. Please clarify. Thank you very much -Udaya Allu -Original Message- From: Greg Ludington [mailto:[EMAIL PROTECTED] Sent: Sunday, August 17, 2003 11:25 AM To: Udaya Allu; [EMAIL PROTECTED] Subject: RE: Problem in validation requiredif in struts 1.1 that worked fine in Struts 1.1 RC1 The format of the variable names changed before Struts 1.1 final. In your validator, try replacing your var-names field-test[0] and field-value[0] with fieldTest[0] and fieldTest[0], respectively. You can see this format in the example at http://jakarta.apache.org/struts/userGuide/dev_validator.html -Greg Ludington - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bean:message to fmt:message
I have a very small question: I have message keys that uses '.' like for instance 'myform.hello'. I read something but I am not sure, does fmt:message support this kind of keys or do I have to remove those '.' from my keys? Thanks, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bean:message to fmt:message
Yes it does. - Original Message - From: Erez Efrati [EMAIL PROTECTED] Newsgroups: Struts Sent: Sunday, August 17, 2003 9:57 AM Subject: Bean:message to fmt:message I have a very small question: I have message keys that uses '.' like for instance 'myform.hello'. I read something but I am not sure, does fmt:message support this kind of keys or do I have to remove those '.' from my keys? Thanks, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Bean:message to fmt:message
A big relief.. thanks, just to think about converting them all... Erez -Original Message- From: Dan Tran [mailto:[EMAIL PROTECTED] Sent: Sunday, August 17, 2003 6:08 PM To: Struts Users Mailing List Subject: Re: Bean:message to fmt:message Yes it does. - Original Message - From: Erez Efrati [EMAIL PROTECTED] Newsgroups: Struts Sent: Sunday, August 17, 2003 9:57 AM Subject: Bean:message to fmt:message I have a very small question: I have message keys that uses '.' like for instance 'myform.hello'. I read something but I am not sure, does fmt:message support this kind of keys or do I have to remove those '.' from my keys? Thanks, Erez - 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: [OT] BaseBean portal
You haven't looked at it but couldn't resist making comments about me. Do I know know everything. I use search engines for what I don't know. From: Mark Lowe [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: [OT] BaseBean portal Date: Sun, 17 Aug 2003 15:54:19 +0100 To you? I thought you knew everything already, if there's an example to copy and paste that is.. I think its vic's site. He's one of the commiters and done some stuff with iBatis and struts I think.. Why are you still looking for other folks to do you work? On Sunday, August 17, 2003, at 03:33 PM, message message wrote: Does know anybody anything about the portal from www.baseBean.com Perhaps they would care to comment on it ? _ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - 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] _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:link can't access DAF getMap()
sorry mike i meant mapped to the action On Sunday, August 17, 2003, at 03:57 PM, Mark Lowe wrote: Is myForm scoped to the page? Well myForm is in that action mappings name attribute and indeed the error: No getter method for property map of bean myForm given for: html:link page=/CragResults.do name=myForm property=map TEST /html:link indicate the bean is accessible just 'map' is not! -- Mike W - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:link can't access DAF getMap()
sorry mike i meant mapped to the action On Sunday, August 17, 2003, at 03:57 PM, Mark Lowe wrote: Is myForm scoped to the page? In fact I'm pretty sure it is impossible to get at getMap() due to the under the covers cleverness that allows a DynaBean to be used in a typical JavaBean role - ie get(myParam) of a DynaBean is available to a stuts accessor eg myForm.myParam is equivalent to myForm.get(myParam). So when I try and access getMap() with property=map it sees it is a DynaBean and converts it to get(map). So the solution? either a custom method is DAF that delivers what I want and access it with jstl or another approach to getting the previous url that allows me to alter a parameter value. -- Mike W - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:link can't access DAF getMap()
I'm not 100% not what your doing so i could be talking nonsense.. If the formBean is available to the page i cant see why you cant access its properties. A simple way of doing this would be to do it in the referring action. Map myFormMap = myForm.getMap(); request.setAttribute(myMap,myFormMap); then html:link name=myMap to display all the key=value pairs as parameters or specify the property as the key. Cheers Mark On Sunday, August 17, 2003, at 05:57 PM, Mike Whittaker wrote: sorry mike i meant mapped to the action On Sunday, August 17, 2003, at 03:57 PM, Mark Lowe wrote: Is myForm scoped to the page? In fact I'm pretty sure it is impossible to get at getMap() due to the under the covers cleverness that allows a DynaBean to be used in a typical JavaBean role - ie get(myParam) of a DynaBean is available to a stuts accessor eg myForm.myParam is equivalent to myForm.get(myParam). So when I try and access getMap() with property=map it sees it is a DynaBean and converts it to get(map). So the solution? either a custom method is DAF that delivers what I want and access it with jstl or another approach to getting the previous url that allows me to alter a parameter value. -- Mike W - 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: html:link can't access DAF getMap()
I'm not 100% not what your doing so i could be talking nonsense.. If the formBean is available to the page i cant see why you cant access its properties. A simple way of doing this would be to do it in the referring action. Map myFormMap = myForm.getMap(); request.setAttribute(myMap,myFormMap); then html:link name=myMap Yes, I can do that, thanks for jogging my gramaphone brain! Pity you can't access directly, perhaps they should have kept DAF param access as myForm.map['myParam'] Then you could still get the Map complete with myForm.map I'm sure there is a good reason they didn't. Cheers, Mike W. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: browse for a directory
Kelly, This link may be of interest to you. I haven't tried it and don't want to give my customers that kind of power, yet. :) http://www.vonloesch.de/jspbrowser.html Regards, David -Original Message- From: Kelly Clauson [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2003 10:06 AM To: [EMAIL PROTECTED] Subject: browse for a directory I'd like to let users write a collection of files to the directory of their choosing. Is there a form tag that allows browsing for a directory? The html:file tag lets you browse to a file but not a directory. Thanks, Kelly - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaValidatorForm and DynaValidatorActionForm
AFAIK the DynaValidatorForm is associated with a form-bean, and the DynaValidatorActionForm is associated with an action-form. To be honest I am not quite sure what that means, but as luck would have it I just read it yesterday in the o'reilly book :) -Original Message- From: Louise Pryor [mailto:[EMAIL PROTECTED] Sent: Sunday, August 17, 2003 10:54 AM To: Struts Users Mailing List Subject: DynaValidatorForm and DynaValidatorActionForm What is the difference between DynaValidatorForm and DynaValidatorActionForm ? What would be the reasons for using one over the other? (And have I missed something obvious in the documentation here?) Thanks for any help! -- Louise Pryor http://www.louisepryor.com - 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: PropertyMessageResources - have I outgrown it?
Thank you, this example is exactly what I was looking for. On 8/16/03 16:41, James Mitchell [EMAIL PROTECTED] wrote: You might also have a look at OJB. There is a DBMessageResources which allows you to swap out your properties files for a database table. The underlying data access is handled via OJB. This extension fully supports multiple keyed bundles and modules. It is open source and you can find it here: http://sourceforge.net/project/showfiles.php?group_id=49385release_id=15497 2 -- James Mitchell Software Engineer / Struts Evangelist http://www.struts-atlanta.org 770-822-3359 AIM:jmitchtx - Original Message - From: Sgarlata Matt [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 15, 2003 6:56 PM Subject: Re: PropertyMessageResources - have I outgrown it? You have definitely outgrown PropertyMessageResources ;-) You would be much better off with some sort of object-to-relational mapping tool. I use Torque, but I have heard a lot of talk about Hibernate on this list. Good luck, Matt - Original Message - From: Sasha Borodin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 15, 2003 6:38 PM Subject: PropertyMessageResources - have I outgrown it? Howdy, I'd like to pose a design question to the web-developers using Struts, concerning the functionality and proper usage of MessageResources. This is a really cool out of the box feature - I love the ease with which one can maintain libraries of messages, and the seamless integration of these resources with html:message tags. However, I've come across some functional requirements that I can's seem to negotiate without doing additional coding: 1. Getting message for a given key is great. But I'd like to be able to extract collections of keys - this way I can use these lists as not only lookup tables, but also the control lists - one place to maintain values/options for pull-down lists and other similar applications. Looking through the JavaDocs for MessageResources and PropertyMessageResources, I don't see this functionality; the implementing HashMap is protected, so I'd have to subclass; is using a custom sub-class of MessageResources supported in Struts (still being able to declare in struts-config, etc.)? 1. In other projects I'll eventually be migrating to Struts, the key/value pairs for numerous lists are stored in a database. Is there an existing variant of MessageResources, which can be declared in struts-config, which can be configured to extract messages out of a database (similar to DataSource realms in Tomcat)? In the future I'm foreseeing more and more customization needs (ex. Sorting and extracting the collection of keys, extracting a sub-set of the sorted keys, etc.). Giving the direction that I'm headed in, is MessageResources still an appropriate choice? Or should I move to some custom data structures, and settle for the less specialized bean-like access to them? Any other suggestions? Thanks in advance, -Sasha - 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]
RE: DynaValidatorForm and DynaValidatorActionForm
Speaking of ValidationActionForms (and derivatives), when you use a DynaValidatorActionForm or a ValidatorActionForm, how do you use it in an html:javascript/ tag? I tried using it as html:javascript formName=/logon/ and it gave me a weird Javascript function declared: function validate/logon(form) Regards, David -Original Message- From: Bill Chmura [mailto:[EMAIL PROTECTED] Sent: Sunday, August 17, 2003 2:04 PM To: 'Struts Users Mailing List'; 'Louise Pryor' Subject: RE: DynaValidatorForm and DynaValidatorActionForm AFAIK the DynaValidatorForm is associated with a form-bean, and the DynaValidatorActionForm is associated with an action-form. To be honest I am not quite sure what that means, but as luck would have it I just read it yesterday in the o'reilly book :) -Original Message- From: Louise Pryor [mailto:[EMAIL PROTECTED] Sent: Sunday, August 17, 2003 10:54 AM To: Struts Users Mailing List Subject: DynaValidatorForm and DynaValidatorActionForm What is the difference between DynaValidatorForm and DynaValidatorActionForm ? What would be the reasons for using one over the other? (And have I missed something obvious in the documentation here?) Thanks for any help! -- Louise Pryor http://www.louisepryor.com - 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]
Re: static javascript
Hi Erez, have you tried calling up the staticJavascript.jsp page? Perhaps it's just not there, or the version is out of date. Adam On 08/16/2003 10:51 PM Erez Efrati wrote: I am doing the following: but I don't get the static script in my pages. What am I doing wrong? JSP: html-el:javascript formName=signupForm dynamicJavascript=true staticJavascript=false page=1 / script language=Javascript1.1 src=html:rewrite page='/common/staticJavascript.jsp'/ / The staticJavascript.jsp: (copied from Struts example) --- %@ page language=java % %-- set document type to Javascript (addresses a bug in Netscape according to a web resource --% %@ page contentType=application/x-javascript % %@ taglib uri=/tags/struts-html prefix=html % html:javascript dynamicJavascript=false staticJavascript=true/ Thanks, Erez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DynaValidatorForm and DynaValidatorActionForm
When you configure your forms to be DynaValidatorForms, then struts will choose to use the form you defined in validation.xml with the same name as the action mapping's name attribute. This should also correspond to a form definition in the struts-config form-beans section. With DynaActionValidatorForms, struts looks for a form definition in validation.xml with the name the same as the path attribute of your action mapping. i.e. with DynaValidatorForms you always get the same validation done on a particular struts-config-defined formbean. With DynaValidatorActionForms any particular validation definition in validation.xml is executed for a particular URL, the path in the action mapping. David, try using the method attribute: html:javascript formName=/sectionUpdate method=validateForm / On 08/17/2003 08:25 PM David Friedman wrote: Speaking of ValidationActionForms (and derivatives), when you use a DynaValidatorActionForm or a ValidatorActionForm, how do you use it in an html:javascript/ tag? I tried using it as html:javascript formName=/logon/ and it gave me a weird Javascript function declared: function validate/logon(form) Regards, David -Original Message- From: Bill Chmura [mailto:[EMAIL PROTECTED] Sent: Sunday, August 17, 2003 2:04 PM To: 'Struts Users Mailing List'; 'Louise Pryor' Subject: RE: DynaValidatorForm and DynaValidatorActionForm AFAIK the DynaValidatorForm is associated with a form-bean, and the DynaValidatorActionForm is associated with an action-form. To be honest I am not quite sure what that means, but as luck would have it I just read it yesterday in the o'reilly book :) -Original Message- From: Louise Pryor [mailto:[EMAIL PROTECTED] Sent: Sunday, August 17, 2003 10:54 AM To: Struts Users Mailing List Subject: DynaValidatorForm and DynaValidatorActionForm What is the difference between DynaValidatorForm and DynaValidatorActionForm ? What would be the reasons for using one over the other? (And have I missed something obvious in the documentation here?) Thanks for any help! -- Louise Pryor http://www.louisepryor.com - 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] -- struts 1.1 + tomcat 4.1.27 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaValidatorForm and DynaValidatorActionForm
Andy, Your solution worked perfectly: html:javascript formName=/sectionUpdate method=validateForm / I spent most of my time in the wrong place: the Validator User Guide. Even though I skimmed the HTML tablib reference page, I didn't notice the method segment. My other problem was blank validations caused by a 'page=1' parameter in my html:javascript tag. I'd forgotten to remove it when I'd switched away from multipage validation back to one-page validation. Regards, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Objects in HashMap
I have a ShoppingCart class which contains a property of type HashMap which contains the key and a LineItem object as the value. LineItem contains a productKey, Product and quantity properties. What I want to accomplish is that for each iteration to expose the Product inside LineItem object as a page scoped variable. logic:iterate name='shopping.cart' id='lineItem' property='cart' table width=100% border=1 tr td c:out value=${lineItem.value.product.productNameES}/ /td /tr /table /logic:iterate What I want to do is something like: bean:define id='theProduct' name='lineItem' property='product'/ at the beginning of each iteration. This does not work. I get a message saying that it could not find a getter property for property product inside LineItem. The property is there with the appropriate getter/setter. Any help on this would be greatly appreciated. Thanks __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
strtuts-html-tld not found error
I am having trouble going through the Struts tutorial on Javaboutique which can be found here: http://javaboutique.internet.com/tutorials/Struts/ The error I am getting says: org.apache.jasper.JasperException: File /WEB-INF/struts-html-tld not found Then it lists a bunch of other stuff. The struts-html.tld (among other tld files) is in: install-dir\webapps\myproject\WEB-INF I am sure I am just missing some config info. Any clues? Thanks. Andrew Pierce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: strtuts-html-tld not found error
I found this problem. It helps to put struts-html.tld in your jsp, not struts-html-tld. Sorry for the dumb question. --amp; I am having trouble going through the Struts tutorial on Javaboutique which can be found here: http://javaboutique.internet.com/tutorials/Struts/ The error I am getting says: org.apache.jasper.JasperException: File /WEB-INF/struts-html-tld not found Then it lists a bunch of other stuff. The struts-html.tld (among other tld files) is in: install-dir\webapps\myproject\WEB-INF I am sure I am just missing some config info. Any clues? Thanks. Andrew Pierce - 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]
test
test _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying a single error message for multiple properties
Just starting to use Struts in anger I have found an inflexibility in the Struts error model that I need to get around. Basically I want to be able to raise a single ActionError for 2 properties. e.g. a password field and a confirm password field exist if they don't match then I want to display one message saying Password and confirmation password don't match I also want to highlight both fields. To highlight both fields I would ideally raise a single error for each property. Sadly the model doesn't seem to support multiple properties for a single error. It seems that my choices will be to create a dodgy convention when raising messages and have a special tag lib for displaying them. Has anyone found a nice way of doing this. It must a problem everyone has faced because surely most web apps have cross field validation and want to have a single error message that relates to the fields involved in the cross validation. e.g. field B cannot be foo when field A is bar. Cheers James ***Confidentiality and Privilege Notice*** This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Qantas Airways Limited ABN 16 009 661 901 Visit Qantas online at http://www.qantas.com.au
Re: Displaying a single error message for multiple properties
What you want to acheive is not impossible. In your action form you just need to handle this in your validate method. It's pretty simple : if(!password.equals(username)) { //Add whatever action error here, //and it will be returned to the input page. } There's no need for you to write special taglibs to do this, as there is already a html:error tag that does this. James JKE95 Kerridge wrote: Basically I want to be able to raise a single ActionError for 2 properties. e.g. a password field and a confirm password field exist if they don't match then I want to display one message saying Password and confirmation password don't match I also want to highlight both fields. To highlight both fields I would ideally raise a single error for each property. Sadly the model doesn't seem to support multiple properties for a single error. It seems that my choices will be to create a dodgy convention when raising messages and have a special tag lib for displaying them. Has anyone found a nice way of doing this. It must a problem everyone has faced because surely most web apps have cross field validation and want to have a single error message that relates to the fields involved in the cross validation. e.g. field B cannot be foo when field A is bar. Cheers James ***Confidentiality and Privilege Notice*** This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Qantas Airways Limited ABN 16 009 661 901 Visit Qantas online at http://www.qantas.com.au - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying a single error message for multiple properties
Kwok, thanks for the reply. My problem is not as simple as that. What I want to do is display a single error which relates to 2 different fields. In the view I wish to highlight both of the fields that are in error and display only 1 error message that relates to both. Not just 1. As this must be a standard requirement I was wondering how others have implemented this and whether there is a 'standard' approach that might be followed/copied. Cheers James From: Kwok Peng Tuck [EMAIL PROTECTED] on 18/08/2003 10:06 ZE8 Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Displaying a single error message for multiple properties What you want to acheive is not impossible. In your action form you just need to handle this in your validate method. It's pretty simple : if(!password.equals(username)) { //Add whatever action error here, //and it will be returned to the input page. } There's no need for you to write special taglibs to do this, as there is already a html:error tag that does this. James JKE95 Kerridge wrote: Basically I want to be able to raise a single ActionError for 2 properties. e.g. a password field and a confirm password field exist if they don't match then I want to display one message saying Password and confirmation password don't match I also want to highlight both fields. To highlight both fields I would ideally raise a single error for each property. Sadly the model doesn't seem to support multiple properties for a single error. It seems that my choices will be to create a dodgy convention when raising messages and have a special tag lib for displaying them. Has anyone found a nice way of doing this. It must a problem everyone has faced because surely most web apps have cross field validation and want to have a single error message that relates to the fields involved in the cross validation. e.g. field B cannot be foo when field A is bar. Cheers James ***Confidentiality and Privilege Notice*** This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Qantas Airways Limited ABN 16 009 661 901 Visit Qantas online at http://www.qantas.com.au - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ***Confidentiality and Privilege Notice*** This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Qantas Airways Limited ABN 16 009 661 901 Visit Qantas online at http://www.qantas.com.au
Re: Displaying a single error message for multiple properties
You seem to have missed the point about my response. In this section : if(!password.equals(username)) { //Add whatever action error here, //and it will be returned to the input page. } The action error that you create will contain the message you want. Just select or create the message that you need. It will be returned to the page. You of course need to define the text in the message resource properties first. I understand that this is only a code snippet and may only serve to confuse you, if this is the case have a look at some of the samples(source, specifically classes which extend ActionForm) that come with of Struts. James JKE95 Kerridge wrote: Kwok, thanks for the reply. My problem is not as simple as that. What I want to do is display a single error which relates to 2 different fields. In the view I wish to highlight both of the fields that are in error and display only 1 error message that relates to both. Not just 1. As this must be a standard requirement I was wondering how others have implemented this and whether there is a 'standard' approach that might be followed/copied. Cheers James From: Kwok Peng Tuck [EMAIL PROTECTED] on 18/08/2003 10:06 ZE8 Please respond to Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Displaying a single error message for multiple properties What you want to acheive is not impossible. In your action form you just need to handle this in your validate method. It's pretty simple : if(!password.equals(username)) { //Add whatever action error here, //and it will be returned to the input page. } There's no need for you to write special taglibs to do this, as there is already a html:error tag that does this. James JKE95 Kerridge wrote: Basically I want to be able to raise a single ActionError for 2 properties. e.g. a password field and a confirm password field exist if they don't match then I want to display one message saying Password and confirmation password don't match I also want to highlight both fields. To highlight both fields I would ideally raise a single error for each property. Sadly the model doesn't seem to support multiple properties for a single error. It seems that my choices will be to create a dodgy convention when raising messages and have a special tag lib for displaying them. Has anyone found a nice way of doing this. It must a problem everyone has faced because surely most web apps have cross field validation and want to have a single error message that relates to the fields involved in the cross validation. e.g. field B cannot be foo when field A is bar. Cheers James ***Confidentiality and Privilege Notice*** This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Qantas Airways Limited ABN 16 009 661 901 Visit Qantas online at http://www.qantas.com.au - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ***Confidentiality and Privilege Notice*** This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Qantas Airways Limited ABN 16 009 661 901 Visit Qantas online at http://www.qantas.com.au - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying a single error message for multiple properties
Kwok, thanks for bearing with me. I think I getting it. So your example is saying. I can compare the 2 properties. Then I can raise 1 action error for it. That's seems fine. Then I get to the input page and I display the one error somewhere which can be donn with just html:errors/ if I want (though I will use logic:messages tags). Then I want to redisplay the property fields on the screen differently (i.e. orange label text) because they are in error. So I can use logic:messagesPresent property=username or logic:messagesPresent property=password depending on which property I raised the error against to test whether I should highlight the field. So with this strategy if an error exists for the username (or password field) I end up highlighting both fields in error. Which is fine, if all I want to validate is that they are equal but I may wish to validate separately that both fields are filled in. In this case only one of the fields may be blank and I may want to only highlight one of the fields not both. So my solution in this case may be to either raise an error against a special property name i.e. username,password when raising one message for multiple fields and then handling the test for errors using a specialized tag lib perhaps. However, I worry that this approach goes against conventions for using the error model. I would not have this issue if I could add an action error against multiple properties. Anyway thanks for your help. I shall continue to ponder the most elegant way of encoding data into either the property key or the message itself. Or just raise 2 error messages exactly the same for each of the 2 fields and dedupe the message when displaying it. Anyone see issues with these approaches. James ***Confidentiality and Privilege Notice*** This email is intended only to be read or used by the addressee. It is confidential and may contain legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. Qantas Airways Limited ABN 16 009 661 901 Visit Qantas online at http://www.qantas.com.au
[Validator] The Validator Wiki needs you !
There is now a Commons Validator Wiki ! Beware this is only a shell to start collecting tips, FAQs, and examples for using validator. You can make a much needed contribution ! http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorProjectPages This is also great opportunity to delete all those old emails you have been saving ! Come on, there must be hundreds, and put them on the web ! Then they are instantly available from any web browser: * At work, Your Desk Your Co-worker's Desk * At home * At a remote site * Even from that better paying job you have been waiting for ! No emailing yourself hundreds of emails, just give your Notice ! ;-) We really do need you ! -- Robert Leland [EMAIL PROTECTED] -- Java, J2EE, Struts, Web Application Development 804 N. Kenmore Street +01-703-525-3580 Arlington VA 22201 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Should extend any struts components ?
While developing the J2EE application using struts, should I extend the ActionServlet, RequestProcessor etc... classes to make them my project specific? If yes, which components and what are the advantages one can get? -Original Message- From: Robert Leland [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 9:39 AM To: [EMAIL PROTECTED] Subject: [Validator] The Validator Wiki needs you ! There is now a Commons Validator Wiki ! Beware this is only a shell to start collecting tips, FAQs, and examples for using validator. You can make a much needed contribution ! http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorProjectPages This is also great opportunity to delete all those old emails you have been saving ! Come on, there must be hundreds, and put them on the web ! Then they are instantly available from any web browser: * At work, Your Desk Your Co-worker's Desk * At home * At a remote site * Even from that better paying job you have been waiting for ! No emailing yourself hundreds of emails, just give your Notice ! ;-) We really do need you ! -- Robert Leland [EMAIL PROTECTED] -- Java, J2EE, Struts, Web Application Development 804 N. Kenmore Street +01-703-525-3580 Arlington VA 22201 - 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: Should extend any struts components ?
Hi, There are various extension points including the one you have listed them. The pros and cons, and reasons to extend is mentioned in the Oreilly book. You can read that chapter(Forgot the chapter). Cheers Ashwani Kalra http://www.geocities.com/ashwani_kalra -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 10:40 AM To: Struts Users Mailing List Subject: Should extend any struts components ? While developing the J2EE application using struts, should I extend the ActionServlet, RequestProcessor etc... classes to make them my project specific? If yes, which components and what are the advantages one can get? -Original Message- From: Robert Leland [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 9:39 AM To: [EMAIL PROTECTED] Subject: [Validator] The Validator Wiki needs you ! There is now a Commons Validator Wiki ! Beware this is only a shell to start collecting tips, FAQs, and examples for using validator. You can make a much needed contribution ! http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorProjectPages This is also great opportunity to delete all those old emails you have been saving ! Come on, there must be hundreds, and put them on the web ! Then they are instantly available from any web browser: * At work, Your Desk Your Co-worker's Desk * At home * At a remote site * Even from that better paying job you have been waiting for ! No emailing yourself hundreds of emails, just give your Notice ! ;-) We really do need you ! -- Robert Leland [EMAIL PROTECTED] -- Java, J2EE, Struts, Web Application Development 804 N. Kenmore Street +01-703-525-3580 Arlington VA 22201 - 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] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Remote and local EJB
Is there any struts support or any one has idea on following problem? I am developing an application in which I require to develop an EJB with local and remote interface. Local or remote EJB should be invoked depending on the request. How one can identify this? Any framework which support this local and remote EJB development and access? -Original Message- From: Robert Leland [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 9:39 AM To: [EMAIL PROTECTED] Subject: [Validator] The Validator Wiki needs you ! There is now a Commons Validator Wiki ! Beware this is only a shell to start collecting tips, FAQs, and examples for using validator. You can make a much needed contribution ! http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorProjectPages This is also great opportunity to delete all those old emails you have been saving ! Come on, there must be hundreds, and put them on the web ! Then they are instantly available from any web browser: * At work, Your Desk Your Co-worker's Desk * At home * At a remote site * Even from that better paying job you have been waiting for ! No emailing yourself hundreds of emails, just give your Notice ! ;-) We really do need you ! -- Robert Leland [EMAIL PROTECTED] -- Java, J2EE, Struts, Web Application Development 804 N. Kenmore Street +01-703-525-3580 Arlington VA 22201 - 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]