Re: Setting object from param tag fails in Struts 2.2.1
I did some experimenting with this by removing the lazy load and putting the actual object directly on a property in the action class. This had no effect. So then I created a catch-all method setKeywordList(Object obj) to see what was being passed in. The actual data being passed in is a single element String array. The only element in the array is a string keywordl...@1f75664 ie. the Struts param tag is calling toString() on the object and passing the resulting string inside an array to the action class. I would say this is a regression bug from 2.0.x, yes? Raj. On 16/11/2010 9:18 PM, Raj Nagappan wrote: Hi, The parameter is definitely an object, if I replace the JSP below with h1s:property value=photoSet.keywordListLazyLoad//h1 h1s:property value=photoSet.keywordListLazyLoad.id//h1 I get keywordl...@3bcdf1, 15 which is correct. Furthermore if I add a setKeywordList(String[] param) method or setKeywordList(String param) method into the action class, it never invokes those new methods but still throws exactly the same exception. The only other thing I can think of is that it's trying to set the cglib proxy object on the action class and is complaining about that. We are using cglib-nodep-2.2 to lazy load the KeywordList, and it worked perfectly fine in Struts 2.0. (Sorry if this appears multiple times, I keep getting a spam rejection notice.) Raj. On 6:59 AM, Li Ying wrote: [Ljava.lang.String; means a String array. Looks like you are trying to copy a List from one action to another. By somehow, struts2 is looking for a set method which take a String array as it's parameter. 2010/11/15 Raj Nagappanr...@velocitylabs.com: Hi, we recently upgraded from Struts 2.0.14 to 2.2.1 and I notice that the following JSP code to inject an object property from one action into another action has stopped working: s:if test=hotoSet.keywordListLazyLoad != null s:action namespace=search name=KeywordList executeResult=true ignoreContextParams=rue s:param name=eywordList value=photoSet.keywordListLazyLoad/ /s:action /s:if So it checks that the object is not null and then tries to set it on the parameter keywordList. This worked perfectly fine in 2.0.x, but in 2.2 on the server side we get: java.lang.NoSuchMethodException: KeywordListAction.setKeywordList([Ljava.lang.String;) Â Â at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1226) Â Â at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1474) Â Â at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85) Â Â at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162) And the resulting error displayed on the web page is: Exception name: No result defined for action KeywordListAction and result input No result defined for action KeywordListAction and result input at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:375) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept (AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept Is this a bug or do I need to do something differently for 2.2? Raj. - To unsubscribe, e-mail:user-unsubscr...@struts.apache.org For additional commands, e-mail:user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Another stupid question re: Interceptors
Hi all, then You have to state it: (pseudo code!) @Result(name='input', value='identify-success.jsp') in VerifyAction. But when it comes to action and result configuration best thing to do is: http://poulwiel.blogspot.com/2009/09/config-browser-plugin-in-struts2.html Best greetings, Paweł Wielgus. 2010/11/16 Greg Akins angryg...@gmail.com Maybe I'm doing something really stupid here. I have two pages / actions (IdentifyAction - identify-*.jsp - VerifyAction - verify-*.jsp) When a user completes the fields on identify-sucess.jsp and submits the form to VerifyAction.. the validate() method on VerifyAction fails. I want the user to be returned to identify-success.jsp to fix the appropriate fields. Am I doing this wrong? On Tue, Nov 16, 2010 at 4:17 PM, Gena Ganebnyi gganeb...@nebulent.com wrote: Why not to name your original page page-input.jsp? On Tue, Nov 16, 2010 at 10:31 PM, Greg Akins angryg...@gmail.com wrote: Does that mean that I can't use the Convention plugin if I want the Validation Interceptor to behave like I'm expecting? It seems like the information I've read so far implies that the Validator Interceptor will allow the submitting page to appear with the information filled in and the error messages displaying where appropriate. But if I follow the Convention plugin and use it's action/results then I don't get the same behavior. Am I missing something, or is this correct. On Tue, Nov 16, 2010 at 3:06 PM, Gena Ganebnyi gganeb...@nebulent.com wrote: When validation fails, intercept returns INPUT on behalf of the action. That is why convention plugin takes you to page-input.jsp On Nov 16, 2010 9:06 PM, Greg Akins angryg...@gmail.com wrote: I'm trying to get validation working.. should be pretty simple. It looks like if my validation fails Struts should auto-magically take me back to the originating jsp. Instead Struts keeps wanting to find a page-INPUT.jsp to match the INPUT return type. I'm using the convention plugin and using annotations, rather than validator.xml, for validations. Struts 2.2.1. There is no struts.xml file in the project (everything is through annotations.). Any hints? -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Another stupid question re: Interceptors
I suggest you to do these things in the following way: (1)put 2 method in IdentifyAction. The first [execute] method returns [input], show the input page to user. (2)In the Identify-input.jsp, submit fields to [IdentifyAction] itself, but another method: [verify] (3)when validation fails, the result will be [input] automatically, which means, the input page will be shown again. (4)when validation validation passes, your method [verify] will be executed. You can implement your business logic in it. If the verification fails, you can return a result [input], and back to the input page again. If the verification pass, you can return another result, and forward(or redirect) to the next action; or you can return a result [success], show the Identify-success.jsp page. (5)another thing need to notice is, method [execute] should be marked by [skipvalidation] annotation - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Another stupid question re: Interceptors
On Wed, Nov 17, 2010 at 8:14 AM, Li Ying liying.cn.2...@gmail.com wrote: I suggest you to do these things in the following way: This is where I think I messed things up. My identifyAction didn't have setters/getters for the fields because the verifyAction captured the results of that input. Consequently, when I redirected to IdentifyAction to get the identify-success.jsp, the values COULDN'T be available. (Doh!!) You're suggestion below sounds much more reasonable though. Thanks for everyone's help and patience. (1)put 2 method in IdentifyAction. The first [execute] method returns [input], show the input page to user. (2)In the Identify-input.jsp, submit fields to [IdentifyAction] itself, but another method: [verify] (3)when validation fails, the result will be [input] automatically, which means, the input page will be shown again. (4)when validation validation passes, your method [verify] will be executed. You can implement your business logic in it. If the verification fails, you can return a result [input], and back to the input page again. If the verification pass, you can return another result, and forward(or redirect) to the next action; or you can return a result [success], show the Identify-success.jsp page. (5)another thing need to notice is, method [execute] should be marked by [skipvalidation] annotation -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Spring context for package
Josep -- I believe this is what you are looking for. http://blog.springsource.com/2007/06/11/using-a-shared-parent-application-context-in-a-multi-war-spring-application/ Peace, Scott 2010/11/17 Josep María Formentí Serra jmforme...@aia.es Thanks Dave and Chris, Chris, that it's nice, we are going to modify it in our project. But our real problem is that we have two independent modules (and struts package for each one) and many spring beans have the same name. Then we have to change bean names when we detect a conflict. I think it will be better have a separated spring context for module (or struts package). I think that one solution is use an struts interceptor to get the spring beans (something like com.opensymphony.xwork2.spring.interceptor.ActionAutowiringInterceptor) but my knowledge about that it's very poor. Josep Maria 2010/11/12 Chris Pratt thechrispr...@gmail.com If you are talking about per Java package, not that I know of. If you mean per Struts package, same thing. But if you mean per jar file, there is a way. If you set your contextConfigLocation to something like WEB-INF/applicationContext.xml,classpath*:pluginContext.xml then Spring will load your Application wide context from the WEB-INF directory (or you can make that WEB-INF/classes if you want), then it will load each pluginContext.xml file it finds on the CLASSPATH. Since the root directory of each jar file in the WEB-INF/lib directory is considered to be on the CLASSPATH, it will automatically include those beans, kind of like the start of a Plug-In architecture. You can so a similar thing with the struts-plugin.xml support built into Struts 2 to make a pretty robust Plug-in system in your application. (*Chris*) 2010/11/12 Josep María Formentí Serra jmforme...@aia.es Hi, We are working in a new project using struts2 + spring + hibernate. We have many packages defined in struts.xml, one for module. We have configured spring using this guide: http://struts.apache.org/2.0.14/docs/spring-plugin.html, where you define one spring context (using the context param: contextConfigLocation). Is it possible to define a different spring context for each struts package? Thanks in advance, Josep Maria -- --- -- - - - Grupo AIA - http://www.aia.es Josep Mª Formentí Serra jmforme...@aia.ptv.es Telf.: +34 93 504 49 00 Fax.: +34 93 580 21 88 --- -- - - - _ ___ __ _ _ _ _ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- --- -- - - - Grupo AIA - http://www.aia.es Josep Mª Formentí Serra jmforme...@aia.ptv.es Telf.: +34 93 504 49 00 Fax.: +34 93 580 21 88 --- -- - - - _ ___ __ _ _ _ _ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
Re: Setting object from param tag fails in Struts 2.2.1
I don't think this is a bug. Because the basic idea of WEB app is: everything is passed as String. Actually, there is a special layer in struts2 for data conversion. Your action may take int/long/boolean/date or something else as it's parameters, but all the original request parameters are String, and they are converted to appropriate data type by struts2 automatically. See: http://struts.apache.org/2.2.1/docs/type-conversion.html So, if param tag convert your parameter into String, I don't think this acting is incorrect, because the Action which receive this parameter should take the responsibility to convert it from String to something it need. In your case, your are calling an action from some action else. But think about calling it from the client side (for example: in browser), how could you pass an object instance as parameter? The only thing you can pass is String. So, my suggestion is: (1)Don't use an object instance as the parameter. Use the object id (can be int, string, and so on) instead. And in the action, load the object by id If you worry about the performance issue caused by object loading, you can use cache. OR (2)If your action will be accessed from other actions only, but never be called from the client side. Then you can delete the parameter from the action. Use request (or session) attribute instead. Before calling the action, put the object into request (or session) attribute. And in the action, load it from request (or session) attribute. 2010/11/17 Raj Nagappan r...@velocitylabs.com: I did some experimenting with this by removing the lazy load and putting the actual object directly on a property in the action class. This had no effect. So then I created a catch-all method setKeywordList(Object obj) to see what was being passed in. The actual data being passed in is a single element String array. The only element in the array is a string keywordl...@1f75664 ie. the Struts param tag is calling toString() on the object and passing the resulting string inside an array to the action class. I would say this is a regression bug from 2.0.x, yes? Raj. On 16/11/2010 9:18 PM, Raj Nagappan wrote: Hi, The parameter is definitely an object, if I replace the JSP below with h1s:property value=photoSet.keywordListLazyLoad//h1 h1s:property value=photoSet.keywordListLazyLoad.id//h1 I get keywordl...@3bcdf1, 15 which is correct. Furthermore if I add a setKeywordList(String[] param) method or setKeywordList(String param) method into the action class, it never invokes those new methods but still throws exactly the same exception. The only other thing I can think of is that it's trying to set the cglib proxy object on the action class and is complaining about that. We are using cglib-nodep-2.2 to lazy load the KeywordList, and it worked perfectly fine in Struts 2.0. (Sorry if this appears multiple times, I keep getting a spam rejection notice.) Raj. On 6:59 AM, Li Ying wrote: [Ljava.lang.String; means a String array. Looks like you are trying to copy a List from one action to another. By somehow, struts2 is looking for a set method which take a String array as it's parameter. 2010/11/15 Raj Nagappanr...@velocitylabs.com: Hi, we recently upgraded from Struts 2.0.14 to 2.2.1 and I notice that the following JSP code to inject an object property from one action into another action has stopped working: s:if test=hotoSet.keywordListLazyLoad != null s:action namespace=search name=KeywordList executeResult=true ignoreContextParams=rue s:param name=eywordList value=photoSet.keywordListLazyLoad/ /s:action /s:if So it checks that the object is not null and then tries to set it on the parameter keywordList. This worked perfectly fine in 2.0.x, but in 2.2 on the server side we get: java.lang.NoSuchMethodException: KeywordListAction.setKeywordList([Ljava.lang.String;) Â Â at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1226) Â Â at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1474) Â Â at ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.java:85) Â Â at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162) And the resulting error displayed on the web page is: Exception name: No result defined for action KeywordListAction and result input No result defined for action KeywordListAction and result input at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:375) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept (AnnotationValidationInterceptor.java:68) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept Is this a bug or do I need to do something differently for
Re: Label problem in struts2
Try with, $getText('Label.Name') Emil On Tue, Nov 16, 2010 at 8:45 PM, stanl...@gmail.com wrote: Can we see the rest of your JSP? My hunch is, you are also using a textfield that is bringing the label in as well. On Tue, Nov 16, 2010 at 6:32 AM, Prabhubalaji Ragavan prabhubalaji.raga...@gmail.com wrote: Hi I am using the below code to label, which is using a resource bundle. When the application starts up, the label appears twice. JSP code --- s:label key=Label.Name / Resource bundle - Label.Name = Legal Name Output --- Legal Name Legal Name Please help Thanks Prabhu Ragavan
OGNL map key reading
Dear all, - s:property value=currentPageHotelList[#stat.index].room0/ //this works , i want room0 make dynamic ( like room0 to room4) s:iterator begin=0 end=5 s:set var=roomindex value='room'+top/s:set //this gives room0 ,room1 ,room2 etc... s:property value=currentPageHotelList[#stat.index].%{#roomindex}/ // this %{#roomindex} doesnt work - please help me to get the roomindex variable executed there to read my map If possible thank you so much, Emil
Re: OGNL map key reading
so currentPageHotelList[#stat.index] gives a Map? if ur using an iterator u can just do s:iterator value=list var=map -- of course u can use top as well but l like giving it a name s:property value=map[#roomindex]/ /s:iterator On Wed, Nov 17, 2010 at 4:13 PM, Emil Dombagolla dombago...@gmail.comwrote: Dear all, - s:property value=currentPageHotelList[#stat.index].room0/ //this works , i want room0 make dynamic ( like room0 to room4) s:iterator begin=0 end=5 s:set var=roomindex value='room'+top/s:set //this gives room0 ,room1 ,room2 etc... s:property value=currentPageHotelList[#stat.index].%{#roomindex}/ // this %{#roomindex} doesnt work - please help me to get the roomindex variable executed there to read my map If possible thank you so much, Emil
Re: Setting object from param tag fails in Struts 2.2.1
2010/11/17 Raj Nagappan r...@velocitylabs.com I would say this is a regression bug from 2.0.x, yes? I guess you're right. Take a look at https://issues.apache.org/jira/browse/WW-1960 Could you open an issue, referencing the one above? I'm sure someone helps you. In the meanwhile could you try to change action's behavior? s:action namespace=/search name=KeywordList executeResult=true ignoreContextParams=true %--REMOVE THIS LINE s:param name=keywordList value=photoSet.keywordListLazyLoad/--% /s:action and create a new method inside your KeywordList action called set KeywordListLazyLoad() -- Maurizio Cucchiara
Struts2, convention plugin, websphere 6.1
I've been working on implementing Struts 2.1.8 on WebSphere 6.1 and I'm having trouble with the convention plugin and annotation-based configuration. It appears that none of my struts configs are being scanned and/or processed from the annotations. Here's what I know: 1) Struts2 and WebSphere is an ugly partnership. There are lots of outstanding issues, so I'm wondering if this particular one has been solved and if there's anything I can do. 2) I know WebSphere is scanning other annotations, since my spring/hibernate annotations are working as expected. 3) Config browser tells me that my annotated packages/namespaces have no actions defined. When I load the action configs into .xml files instead, the actions are correctly loaded and working. 4) I tried tossing in some extra struts convention constants just to prod things, but no help: struts.convention.action.disableScanning = false struts.convention.action.packages = com.mycompany.myapp.action 5) This app with all its annotations is working perfectly in Tomcat, just not in WebSphere. 6) I have log4j set to DEBUG and I don't see any information about actions being defined by the convention plugin - it's as if it isn't even executing. I have a workaround - the xml config works - but would prefer to use annotations if I can. Anyone else run into this and solved it? thanks, - Aaron -- Aaron Brown : aa...@thebrownproject.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Filed Error message withput bullets.
Hi, I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. Thanks in Advance. Satheesh Kannan A B ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ---
Re: Filed Error message withput bullets.
Did you try to redefine css property like list-style-type? 2010/11/17 Satheesh Kannan A B satheesh.kan...@hcl.com Hi, I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. Thanks in Advance. Satheesh Kannan A B ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- -- Maurizio Cucchiara
Re: Filed Error message withput bullets.
You can either update the standard theme template, create your own theme template, or use CSS to style the bullet points to look any way you would like. (*Chris*) On Wed, Nov 17, 2010 at 9:05 AM, Satheesh Kannan A B satheesh.kan...@hcl.com wrote: Hi, I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. Thanks in Advance. Satheesh Kannan A B ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ---
Re: Struts2, convention plugin, websphere 6.1
Without further information it'll be difficult to help; is devMode turned on? Do you have DEBUG set for *everything*, or just s2 packages, or xwork, or...? It shouldn't matter, but do you have the WebFear filter compatibility flag set (or don't need it due to patch level)? Dave On Wed, Nov 17, 2010 at 11:56 AM, Aaron Brown aa...@thebrownproject.com wrote: I've been working on implementing Struts 2.1.8 on WebSphere 6.1 and I'm having trouble with the convention plugin and annotation-based configuration. It appears that none of my struts configs are being scanned and/or processed from the annotations. Here's what I know: 1) Struts2 and WebSphere is an ugly partnership. There are lots of outstanding issues, so I'm wondering if this particular one has been solved and if there's anything I can do. 2) I know WebSphere is scanning other annotations, since my spring/hibernate annotations are working as expected. 3) Config browser tells me that my annotated packages/namespaces have no actions defined. When I load the action configs into .xml files instead, the actions are correctly loaded and working. 4) I tried tossing in some extra struts convention constants just to prod things, but no help: struts.convention.action.disableScanning = false struts.convention.action.packages = com.mycompany.myapp.action 5) This app with all its annotations is working perfectly in Tomcat, just not in WebSphere. 6) I have log4j set to DEBUG and I don't see any information about actions being defined by the convention plugin - it's as if it isn't even executing. I have a workaround - the xml config works - but would prefer to use annotations if I can. Anyone else run into this and solved it? thanks, - Aaron -- Aaron Brown : aa...@thebrownproject.com - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Filed Error message withput bullets.
On Wed, Nov 17, 2010 at 12:05 PM, Satheesh Kannan A B wrote: I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. What version of Struts? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Filed Error message withput bullets.
Struts version 2.1.8. Thanks and Regards, Satheesh Kannan A B -Original Message- From: Dave Newton [mailto:davelnew...@gmail.com] Sent: Wednesday, November 17, 2010 10:49 PM To: Struts Users Mailing List Subject: Re: Filed Error message withput bullets. On Wed, Nov 17, 2010 at 12:05 PM, Satheesh Kannan A B wrote: I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. What version of Struts? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Filed Error message withput bullets.
Sorry, I assumed it was Struts 2. I didn't remember Struts 1 automatically putting the errors in lists, did it? (*Chris*) On Wed, Nov 17, 2010 at 9:18 AM, Dave Newton davelnew...@gmail.com wrote: On Wed, Nov 17, 2010 at 12:05 PM, Satheesh Kannan A B wrote: I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. What version of Struts? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Filed Error message without bullets.
I need help on same problem . I am using 1.3.8. Anjib On 11/17/2010 12:18 PM, Dave Newton wrote: On Wed, Nov 17, 2010 at 12:05 PM, Satheesh Kannan A B wrote: I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. What version of Struts? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Filed Error message withput bullets.
Hi, I have configured in struts.properties as theme=simple. I don't know where to define list-style-type. Please provide me some examples. Thanks and Regards, Satheesh Kannan A B -Original Message- From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] Sent: Wednesday, November 17, 2010 10:45 PM To: Struts Users Mailing List Subject: Re: Filed Error message withput bullets. Did you try to redefine css property like list-style-type? 2010/11/17 Satheesh Kannan A B satheesh.kan...@hcl.com Hi, I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. Thanks in Advance. Satheesh Kannan A B ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Filed Error message withput bullets.
take a look at http://struts.apache.org/2.2.1/docs/struts-2-themes.html 2010/11/17 Satheesh Kannan A B satheesh.kan...@hcl.com Hi, I have configured in struts.properties as theme=simple. I don't know where to define list-style-type. Please provide me some examples. Thanks and Regards, Satheesh Kannan A B -Original Message- From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] Sent: Wednesday, November 17, 2010 10:45 PM To: Struts Users Mailing List Subject: Re: Filed Error message withput bullets. Did you try to redefine css property like list-style-type? 2010/11/17 Satheesh Kannan A B satheesh.kan...@hcl.com Hi, I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. Thanks in Advance. Satheesh Kannan A B ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara
Re: Filed Error message withput bullets.
Maybe try http://lmgtfy.com/?q=CSS+Style+UL (*Chris*) On Wed, Nov 17, 2010 at 9:21 AM, Satheesh Kannan A B satheesh.kan...@hcl.com wrote: Hi, I have configured in struts.properties as theme=simple. I don't know where to define list-style-type. Please provide me some examples. Thanks and Regards, Satheesh Kannan A B -Original Message- From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] Sent: Wednesday, November 17, 2010 10:45 PM To: Struts Users Mailing List Subject: Re: Filed Error message withput bullets. Did you try to redefine css property like list-style-type? 2010/11/17 Satheesh Kannan A B satheesh.kan...@hcl.com Hi, I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. Thanks in Advance. Satheesh Kannan A B ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Filed Error message withput bullets.
more specifically http://struts.apache.org/2.2.1/docs/struts-2-themes.html#Struts2Themes-SpecifyingTheCSSUsedByTheStruts2Tag You should also consider to switch to css or xhtml theme template in order to see display message below fields 2010/11/17 Maurizio Cucchiara maurizio.cucchi...@gmail.com take a look at http://struts.apache.org/2.2.1/docs/struts-2-themes.html 2010/11/17 Satheesh Kannan A B satheesh.kan...@hcl.com Hi, I have configured in struts.properties as theme=simple. I don't know where to define list-style-type. Please provide me some examples. Thanks and Regards, Satheesh Kannan A B -Original Message- From: Maurizio Cucchiara [mailto:maurizio.cucchi...@gmail.com] Sent: Wednesday, November 17, 2010 10:45 PM To: Struts Users Mailing List Subject: Re: Filed Error message withput bullets. Did you try to redefine css property like list-style-type? 2010/11/17 Satheesh Kannan A B satheesh.kan...@hcl.com Hi, I need to display the field error message below each text field without the bullet points. Please suggest me a how to do. Since am getting error message with bullet points. Thanks in Advance. Satheesh Kannan A B ::DISCLAIMER:: --- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. --- -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara -- Maurizio Cucchiara
Re: Struts2, convention plugin, websphere 6.1
Thanks for the quick reply. Here is my full struts.properties: = = = = = = = = = = = = = = = = = = struts.enable.DynamicMethodInvocation = true struts.devMode = true struts.convention.classes.reload = true struts.ui.theme = simple struts.convention.action.disableScanning = false struts.convention.action.packages = com.mycompany.myapp.action = = = = = = = = = = = = = = = = = = Here are the relevant snippets from log4j.xml: !-- Appenders -- appender name=console class=org.apache.log4j.ConsoleAppender param name=Threshold value=DEBUG/ param name=Target value=System.out / layout class=org.apache.log4j.PatternLayout param name=ConversionPattern value=%-5p: %c - %m%n / /layout /appender !-- 3rdparty Loggers -- logger name=org.springframework level value=warn / /logger logger name=org.apache.struts2 level value=debug / /logger logger name=com.opensymphony.xwork2 level value=debug / /logger !-- Root Logger -- root priority value=debug / appender-ref ref=console / appender-ref ref=logfile / /root And yes, I have the special filter flag set in websphere config. I believe that was patched at websphere 13, and I'm patched to 11 at the moment. Struts is working - I can see the config-browser/index.action for example, and when I use xml config all my normal actions are behaving normally. So the websphere filter issue doesn't appear to be the problem in this case. Just for fun, at the end of this message, I'll append a copy of the console log that websphere generates when it loads my app. - Aaron On Wed, Nov 17, 2010 at 12:17 PM, Dave Newton davelnew...@gmail.com wrote: Without further information it'll be difficult to help; is devMode turned on? Do you have DEBUG set for *everything*, or just s2 packages, or xwork, or...? It shouldn't matter, but do you have the WebFear filter compatibility flag set (or don't need it due to patch level)? -- Aaron Brown : aa...@thebrownproject.com debug log follows, sorry for any text wrapping. This log opens with the server completing its startup cycle (open for e-business). I then requested a url to an action configured with annotations, causing the app server to load all the app contexts. At the end of the log you can see struts processing that as an unknown action and dealing with it. [11/17/10 13:32:41:731 EST] 000a WsServerImpl A WSVR0001I: Server server1 open for e-business [11/17/10 13:32:56:715 EST] 0019 SystemOut O DEBUG: com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Loading action configurations from: struts-default.xml [11/17/10 13:32:56:747 EST] 0019 SystemOut O DEBUG: com.opensymphony.xwork2.util.FileManager - Creating revision for URL: wsjar:file:/C:/Program Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/nw897628Node01Cell/tsbOne.ear/tsb.war/WEB-INF/lib/struts2-core-2.1.8.jar!/struts-default.xml [11/17/10 13:32:56:825 EST] 0019 SystemOut O DEBUG: com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Loaded action configuration from: struts-default.xml [11/17/10 13:32:56:856 EST] 0019 SystemOut O INFO : com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Parsing configuration file [struts-default.xml] [11/17/10 13:32:56:856 EST] 0019 SystemOut O DEBUG: com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Loaded type: name:xwork impl:com.opensymphony.xwork2.ObjectFactory [11/17/10 13:32:56:872 EST] 0019 SystemOut O DEBUG: com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Loaded type:com.opensymphony.xwork2.ObjectFactory name:struts impl:org.apache.struts2.impl.StrutsObjectFactory [11/17/10 13:32:56:872 EST] 0019 SystemOut O DEBUG: com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Loaded type:com.opensymphony.xwork2.ActionProxyFactory name:xwork impl:com.opensymphony.xwork2.DefaultActionProxyFactory [11/17/10 13:32:56:887 EST] 0019 SystemOut O DEBUG: com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Loaded type:com.opensymphony.xwork2.ActionProxyFactory name:struts impl:org.apache.struts2.impl.StrutsActionProxyFactory [11/17/10 13:32:56:903 EST] 0019 SystemOut O DEBUG: com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Loaded type:com.opensymphony.xwork2.conversion.ObjectTypeDeterminer name:tiger impl:com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer [11/17/10 13:32:56:903 EST] 0019 SystemOut O DEBUG: com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Loaded type:com.opensymphony.xwork2.conversion.ObjectTypeDeterminer name:notiger impl:com.opensymphony.xwork2.conversion.impl.DefaultObjectTypeDeterminer [11/17/10 13:32:56:903 EST] 0019 SystemOut O DEBUG: com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - Loaded
Re: Struts2, convention plugin, websphere 6.1
Hi, I have an input page which has a checkbox list in a form. Clicking submit takes the user to a 2nd JSP. The problem is that when I don't select a checkbox and click on submit, I get to the output page, of course no value is displayed on the output page though. But if I select a checkbox and click submit, I get an error saying No result defined for action .action.ModelHomeAction and result input I just started with struts and don't really know why it is looking for the result input. I would appreciate any help with this. Relevant code is below. input.jsp s:form method=post action=modelUpload s:checkboxlist name=selectedModel list=modelList listKey=modelId listValue=modelName/ s:submit/s:submit /s:form output.jsp s:property value=selectedModel/ Action private ArrayListModel modelList; private Model selectedModel = new Model(); public ArrayListModel getModelList() { FrameworkHandler handler = new FrameworkHandler(); return handler.getModels(); } public void setModelList(ArrayListModel modelList) { this.modelList = modelList; } public Model getSelectedModel() { return selectedModel; } public void setSelectedModel(Model selectedModel) { this.selectedModel = selectedModel; } public String execute() throws Exception { LOG.debug(Model Home Action); return SUCCESS; } public String upload() throws Exception{ return SUCCESS; } struts.xml action name=modelHome class=.action.ModelHomeAction method=execute result name=success/jsp/input.jsp/result /action action name=modelUpload class=.action.ModelHomeAction method=upload result name=success/jsp/output.jsp/result /action
Re: Struts2, convention plugin, websphere 6.1
Failed validation will send user back to the input result. Dave On Nov 17, 2010 2:29 PM, Harsh C hchau...@gmail.com wrote: Hi, I have an input page which has a checkbox list in a form. Clicking submit takes the user to a 2nd JSP. The problem is that when I don't select a checkbox and click on submit, I get to the output page, of course no value is displayed on the output page though. But if I select a checkbox and click submit, I get an error saying No result defined for action .action.ModelHomeAction and result input I just started with struts and don't really know why it is looking for the result input. I would appreciate any help with this. Relevant code is below. input.jsp s:form method=post action=modelUpload s:checkboxlist name=selectedModel list=modelList listKey=modelId listValue=modelName/ s:submit/s:submit /s:form output.jsp s:property value=selectedModel/ Action private ArrayListModel modelList; private Model selectedModel = new Model(); public ArrayListModel getModelList() { FrameworkHandler handler = new FrameworkHandler(); return handler.getModels(); } public void setModelList(ArrayListModel modelList) { this.modelList = modelList; } public Model getSelectedModel() { return selectedModel; } public void setSelectedModel(Model selectedModel) { this.selectedModel = selectedModel; } public String execute() throws Exception { LOG.debug(Model Home Action); return SUCCESS; } public String upload() throws Exception{ return SUCCESS; } struts.xml action name=modelHome class=.action.ModelHomeAction method=execute result name=success/jsp/input.jsp/result /action action name=modelUpload class=.action.ModelHomeAction method=upload result name=success/jsp/output.jsp/result /action
Re: Struts2, convention plugin, websphere 6.1
So, result input is some kind of default result that struts sends a user to? Is validation turned on by default, as I did not specify any validation? If so, how can I turn it off? Thanks, HC On Wed, Nov 17, 2010 at 11:39 AM, Dave Newton davelnew...@gmail.com wrote: Failed validation will send user back to the input result. Dave On Nov 17, 2010 2:29 PM, Harsh C hchau...@gmail.com wrote: Hi, I have an input page which has a checkbox list in a form. Clicking submit takes the user to a 2nd JSP. The problem is that when I don't select a checkbox and click on submit, I get to the output page, of course no value is displayed on the output page though. But if I select a checkbox and click submit, I get an error saying No result defined for action .action.ModelHomeAction and result input I just started with struts and don't really know why it is looking for the result input. I would appreciate any help with this. Relevant code is below. input.jsp s:form method=post action=modelUpload s:checkboxlist name=selectedModel list=modelList listKey=modelId listValue=modelName/ s:submit/s:submit /s:form output.jsp s:property value=selectedModel/ Action private ArrayListModel modelList; private Model selectedModel = new Model(); public ArrayListModel getModelList() { FrameworkHandler handler = new FrameworkHandler(); return handler.getModels(); } public void setModelList(ArrayListModel modelList) { this.modelList = modelList; } public Model getSelectedModel() { return selectedModel; } public void setSelectedModel(Model selectedModel) { this.selectedModel = selectedModel; } public String execute() throws Exception { LOG.debug(Model Home Action); return SUCCESS; } public String upload() throws Exception{ return SUCCESS; } struts.xml action name=modelHome class=.action.ModelHomeAction method=execute result name=success/jsp/input.jsp/result /action action name=modelUpload class=.action.ModelHomeAction method=upload result name=success/jsp/output.jsp/result /action -- *Thanks, Harsh*
Re: Struts2, convention plugin, websphere 6.1
Could also be a type conversion error. On Nov 17, 2010 2:46 PM, Harsh C hchau...@gmail.com wrote: So, result input is some kind of default result that struts sends a user to? Is validation turned on by default, as I did not specify any validation? If so, how can I turn it off? Thanks, HC On Wed, Nov 17, 2010 at 11:39 AM, Dave Newton davelnew...@gmail.com wrote: Failed validation will send user back to the input result. Dave On Nov 17, 2010 2:29 PM, Harsh C hchau...@gmail.com wrote: Hi, I have an input page which has a checkbox list in a form. Clicking submit takes the user to a 2nd JSP. The problem is that when I don't select a checkbox and click on submit, I get to the output page, of course no value is displayed on the output page though. But if I select a checkbox and click submit, I get an error saying No result defined for action .action.ModelHomeAction and result input I just started with struts and don't really know why it is looking for the result input. I would appreciate any help with this. Relevant code is below. input.jsp s:form method=post action=modelUpload s:checkboxlist name=selectedModel list=modelList listKey=modelId listValue=modelName/ s:submit/s:submit /s:form output.jsp s:property value=selectedModel/ Action private ArrayListModel modelList; private Model selectedModel = new Model(); public ArrayListModel getModelList() { FrameworkHandler handler = new FrameworkHandler(); return handler.getModels(); } public void setModelList(ArrayListModel modelList) { this.modelList = modelList; } public Model getSelectedModel() { return selectedModel; } public void setSelectedModel(Model selectedModel) { this.selectedModel = selectedModel; } public String execute() throws Exception { LOG.debug(Model Home Action); return SUCCESS; } public String upload() throws Exception{ return SUCCESS; } struts.xml action name=modelHome class=.action.ModelHomeAction method=execute result name=success/jsp/input.jsp/result /action action name=modelUpload class=.action.ModelHomeAction method=upload result name=success/jsp/output.jsp/result /action -- *Thanks, Harsh*
Re: Struts2, convention plugin, websphere 6.1
I think that is probably what it was. Basically in my action, I had a list of model objects (modelList) and a model object (selectedModel). I changed the Model type object selectedModel to String type selectedModelId and things work fine now. Now my question is, if I had a checkboxlist backed by a list of Model objects, and upon checking some models, I wanted a list of selectedModel objects, is there a way in struts to do it? Thanks, HC On Wed, Nov 17, 2010 at 11:47 AM, Dave Newton davelnew...@gmail.com wrote: Could also be a type conversion error. On Nov 17, 2010 2:46 PM, Harsh C hchau...@gmail.com wrote: So, result input is some kind of default result that struts sends a user to? Is validation turned on by default, as I did not specify any validation? If so, how can I turn it off? Thanks, HC On Wed, Nov 17, 2010 at 11:39 AM, Dave Newton davelnew...@gmail.com wrote: Failed validation will send user back to the input result. Dave On Nov 17, 2010 2:29 PM, Harsh C hchau...@gmail.com wrote: Hi, I have an input page which has a checkbox list in a form. Clicking submit takes the user to a 2nd JSP. The problem is that when I don't select a checkbox and click on submit, I get to the output page, of course no value is displayed on the output page though. But if I select a checkbox and click submit, I get an error saying No result defined for action .action.ModelHomeAction and result input I just started with struts and don't really know why it is looking for the result input. I would appreciate any help with this. Relevant code is below. input.jsp s:form method=post action=modelUpload s:checkboxlist name=selectedModel list=modelList listKey=modelId listValue=modelName/ s:submit/s:submit /s:form output.jsp s:property value=selectedModel/ Action private ArrayListModel modelList; private Model selectedModel = new Model(); public ArrayListModel getModelList() { FrameworkHandler handler = new FrameworkHandler(); return handler.getModels(); } public void setModelList(ArrayListModel modelList) { this.modelList = modelList; } public Model getSelectedModel() { return selectedModel; } public void setSelectedModel(Model selectedModel) { this.selectedModel = selectedModel; } public String execute() throws Exception { LOG.debug(Model Home Action); return SUCCESS; } public String upload() throws Exception{ return SUCCESS; } struts.xml action name=modelHome class=.action.ModelHomeAction method=execute result name=success/jsp/input.jsp/result /action action name=modelUpload class=.action.ModelHomeAction method=upload result name=success/jsp/output.jsp/result /action -- *Thanks, Harsh* -- *Thanks, Harsh*
Re: Struts2, convention plugin, websphere 6.1
I am using Struts 2.2.1 and would like to get some AJAX functionality in my app, specifically, I would like to use Dojo. The Dojo plugin was deprecated for this release, is there some good documentation/tutorials for getting into Struts 2.2.1 with DOJO?
Re: Struts2, convention plugin, websphere 6.1
Please start new threads for new questions. There's a jquery plugin, or you can use any framework in its raw form. The latter is almost always my personal recommendation so the JavaScript can be optimized for the application. Dave On Nov 17, 2010 4:30 PM, Harsh C hchau...@gmail.com wrote:
struts2.1 validation problem! with fileUploadStack
Hello all, I am now using struts2 UserInfoAction-doModify-validation.xml to validate my form input. It is work fine. but when I add a interceptor into this action, the validation not work anymore. action name=doModify method=doModify class=com.abchina.sysmanage.usermanage.web.action.UserInfoAction interceptor-ref name=fileUploadStack/ result type=dispatcher name=input/WEB-INF/pages/usermanage/modifyUser.jsp/result result name=index type=redirectActionIndexAction_search/result /action Does anyone get this bug before? Thank you in advance... Regards, Mead
Re: struts2.1 validation problem! with fileUploadStack
While, I add the default interceptor into that action, everything work fine. But I am also do not know why,Ha ha... Thank you, all... interceptor-ref name=defaultStack/ interceptor-ref name=fileUploadStack/ Regards, Mead On Thu, Nov 18, 2010 at 2:19 PM, Mead Lai laiqi...@gmail.com wrote: interceptor
Label problem in struts2
Hi I am using the below code to label, which is using a resource bundle. When the application starts up, the label appears twice. JSP code --- s:label key=Label.Name / Resource bundle - Label.Name = Legal Name Output --- Legal Name Legal Name Please help Thanks Prabhu Ragavan