Re: How to get dropdown list value even if validation intercetor intercepts
Hi Seshagiri, Thanks for your replay. I found the solution for that. As prepare() method of Preparable interface will be called before validation interceptor, I have placed my code inside that. Thanks, Sheeva On Thu, Feb 19, 2009 at 11:44 AM, Seshagiri V seshagi...@kensium.comwrote: Hi, Please send a snippet of my code in the jsp: Thank you, Seshagiri V seshagi...@kensium.com. US Main: 877 KENSIUM (536.7486) US Fax: 312.242.3029 Kensium 200 S Wacker Dr, Suite 3100 Chicago, IL 60606 Confidentiality Note: - The information contained in this e-mail is strictly confidential and for the intended use of the addressee only. Any disclosure, use or copying of the information by anyone other than the intended recipient is prohibited. If you have received this message in error, please notify the sender immediately by return e-mail and securely discard this message. -Original Message- From: sheva j [mailto:shee...@gmail.com] Sent: Thursday, February 19, 2009 10:38 AM To: Struts Users Mailing List Subject: How to get dropdown list value even if validation intercetor intercepts Hi, I am using struts 2.0.11. I am using s:select tag, struts is populating the list box correctly for all the time, except when the validation error occurs for any other field. My issue is: When I first enter into the page, I am able to get the dropdown value, When I submit the page with out entering some mandatory fields, the list box is cleared, Once I enter all the mandatory fields and submit the page, I can able to get the values in list box.(but now it is not showing the selected value in dropdown, instead it is showing 'Please select') . I want the list box to be populated even if validation error occurs Kindly help me Thanks in advance. Thanks, Sheeva No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.11.0/1959 - Release Date: 02/18/09 20:55:00 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Errors repopulating the list after validation.
Hi, Check whether you have same name for list name in s:select tag and in action class. It seems like you have 'i_countries' in action class and 'countries' in your jsp. Thanks, Sheeva On Thu, Feb 19, 2009 at 10:53 PM, Sidharth Bhatia sidharth.bhat...@gmail.com wrote: Hi, Thanks for the suggestion, but this seems to have not solved the problem. What I have is below: private CollectionCountryCode i_countries = new ArrayListCountryCode(); thanks, Sid Bhatia Try not. Do... or do not. There is no try -- Yoda _ _ mailto:sidharth.bhat...@gmail.com -Original Message- From: sheva j [mailto:shee...@gmail.com] Sent: Wednesday, February 18, 2009 11:42 PM To: Struts Users Mailing List Subject: Re: Errors repopulating the list after validation. Hi, Declare like this in your action class, ListString country = new ArrayListString(); Hope this will solve your problem - Sheeva On Thu, Feb 19, 2009 at 5:47 AM, Sidharth Bhatia sidharth.bhat...@gmail.com wrote: Hi, I have form, and a list that is being populated with it. When I first enter the action the list populates properly. But the second time, I get the following error: tag 'select', field 'list', name 'country': The requested list key 'countries' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location] org.apache.struts2.components.Component.fieldError(Component.java:230) org.apache.struts2.components.Component.findValue(Component.java:351) org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java :80) org.apache.struts2.components.Select.evaluateExtraParams(Select.java:105) org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:856) org.apache.struts2.components.UIBean.end(UIBean.java:510) org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSuppor t.java:42) org.apache.jsp.register_jsp._jspx_meth_s_005fselect_005f0(register_jsp.java: 537) org.apache.jsp.register_jsp._jspx_meth_s_005fform_005f0(register_jsp.java:18 0) org.apache.jsp.register_jsp._jspService(register_jsp.java:81) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 74) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9 68) org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:640 ) org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:634) org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestC ontext.java:80) org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequest Context.java:73) org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestCon textWrapper.java:72) org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesReque stContext.java:88) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:28 3) org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.jav a:140) org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.jav a:117) org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:1 54) org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagS upport.java:75) org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport .java:80) org.apache.jsp.layouts.base_jsp._jspx_meth_tiles_005finsertAttribute_005f2(b ase_jsp.java:157) org.apache.jsp.layouts.base_jsp._jspService(base_jsp.java:79) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3 74) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletT ilesRequestContext.java:198) org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(Servlet TilesRequestContext.java:179) org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestCon
Re: Struts performance metrics
Hi, I profiled using JProbe and for a simple 'hello world' jsp I found that JSTL is taking a little more time than OGNl. OGNL : org.apache.jsp.example.HelloWorld_jsp._jspService(HttpServletRequest; HttpServletResponse) Cumulative time spent = 1103 --- JSTL org.apache.jsp.index_jsp._jspService(HttpServletRequest; HttpServletResponse) Cumulative time spent = 1429 Thanks, Mohan -- View this message in context: http://www.nabble.com/Struts-performance-metrics-tp22077072p22118180.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts performance metrics
Hi, I profiled using JProbe and for a simple 'hello world' jsp I found that JSTL is taking a little more time than OGNl. OGNL : org.apache.jsp.example.HelloWorld_jsp._jspService(HttpServletRequest; HttpServletResponse) Cumulative time spent = 1103 --- JSTL org.apache.jsp.index_jsp._jspService(HttpServletRequest; HttpServletResponse) Cumulative time spent = 1429 Thanks, Mohan -- View this message in context: http://www.nabble.com/Struts-performance-metrics-tp22077072p22118187.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: session management
Hi, i wasn't able to understand Your problem, so i was thinking that the code You cited below was about the problem discussed on my blog. If it's not this problem than try to describe the problem in other words, i simply don't get it. Best greetings, Paweł Wielgus. 2009/2/20 mthalis dinesh_nade...@yahoo.com: Give me another suggestion pz. mthalis wrote: i have already implemented login, logout parts using struts(jsp). But the case is after logged out, when i press back button it is redirected to the particular page that i was in before logged out. these are my codings, and plz kind enough to give me reasonable answer. //set sessions// HttpSession session=request.getSession(); session.setAttribute(userName, userLoginForm.getName()); //verify log or not % String userId=(String)session.getAttribute(userName); if(userId != null){ % ///if not log % } else{ response.sendRedirect(./index.jsp); } % //logout % session.removeAttribute(userName); session.invalidate(); response.sendRedirect(./welcome.jsp); % -- View this message in context: http://www.nabble.com/session-management-tp22054409p22114881.html Sent from the Struts - User mailing list archive at Nabble.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: Struts performance metrics
Mohan Radhakrishnan wrote: I profiled using JProbe and for a simple 'hello world' jsp I found that JSTL is taking a little more time than OGNl. OGNL : org.apache.jsp.example.HelloWorld_jsp._jspService(HttpServletRequest; HttpServletResponse) Cumulative time spent = 1103 --- JSTL org.apache.jsp.index_jsp._jspService(HttpServletRequest; HttpServletResponse) Cumulative time spent = 1429 Could you describe your testing methodology, and what, precisely, you're doing to get those results? Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 rest plugin :struts.convention.action.*, possible values
mahanare wrote: I would like to know where can i get all possible values for structs constants? constant name=struts.convention.action.suffix value=Controller/ It's a string, you can make it anything you want. constant name=struts.convention.action.mapAllMatches value=true/ I'm almost positive the other possible value is false. constant name=struts.convention.default.parent.package value=rest-default/ You can make it anything you want. These values, as well as the rest, are documented on the convention plugin page: http://struts.apache.org/2.x/docs/convention-plugin.html#ConventionPlugin-Configurationreference Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
about s:iterator
hi i am using struts 2.0.11.2 i m filling vector somthing like while (rs.next()) { Object [] record = { new Integer(rs.getInt(NodeId)), // Node Id rs.getString(NodeDisplayName), // Display Name new Integer(rs.getInt(ParentNodeId)), // Parent Id rs.getString(FolderName), // Folder Name rs.getString(CanReadFlag), // Can Read Flag rs.getString(CanAddFlag), // Can Add Flag rs.getString(CanEditFlag), // Can Edit Flag rs.getString(canDeleteFlag), // Can Delete Flag new Integer(rs.getInt(iformNo)), // No of comments rs.getString(Filename), //filename rs.getDate(ModifyOn), //file last modified on rs.getString(UserDefineVersionId) }; nodeInfo.addElement(record); how can i get particular field at jsp side in s:iterator somthing like that s:iterator value=getDTl s:prpoerty value={1}/ /s:iterator but i can not please help me -- View this message in context: http://www.nabble.com/about-s%3Aiterator-tp22119987p22119987.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: session management
mthalis wrote: i have already implemented login, logout parts using struts(jsp). But the case is after logged out, when i press back button it is redirected to the particular page that i was in before logged out. these are my codings, and plz kind enough to give me reasonable answer. //set sessions// HttpSession session=request.getSession(); session.setAttribute(userName, userLoginForm.getName()); //verify log or not % String userId=(String)session.getAttribute(userName); if(userId != null){ % ///if not log % } else{ response.sendRedirect(./index.jsp); } % //logout % session.removeAttribute(userName); session.invalidate(); response.sendRedirect(./welcome.jsp); % Leaving the discussion about the scriptlets aside, and that this isn't really a Struts issue... When the user hits the back button if a page has been cached it will be displayed--no server interaction, so no server interaction. Turn off page caching--this forces the browser to go back to the server, whereupon it will discover the user is no longer logged in, and run the... scriptlet. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: about s:iterator
Hi, in an iterator, the object can be accessed by [0]. After that, it is as in Java. So, with something like that it should work : s:iterator value=getDTl s:prpoerty value=[0].{1}/ /s:iterator Regards Sébastien Hardik Shah a écrit : hi i am using struts 2.0.11.2 i m filling vector somthing like while (rs.next()) { Object [] record = { new Integer(rs.getInt(NodeId)), // Node Id rs.getString(NodeDisplayName), // Display Name new Integer(rs.getInt(ParentNodeId)), // Parent Id rs.getString(FolderName), // Folder Name rs.getString(CanReadFlag), // Can Read Flag rs.getString(CanAddFlag), // Can Add Flag rs.getString(CanEditFlag), // Can Edit Flag rs.getString(canDeleteFlag), // Can Delete Flag new Integer(rs.getInt(iformNo)), // No of comments rs.getString(Filename), //filename rs.getDate(ModifyOn), //file last modified on rs.getString(UserDefineVersionId) }; nodeInfo.addElement(record); how can i get particular field at jsp side in s:iterator somthing like that s:iterator value=getDTl s:prpoerty value={1}/ /s:iterator but i can not please help me - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: about s:iterator
Thnaks but when i print like s:property value=[0].{1}/ it shows value in all same like [1,1] i could not understand properly what it do please help more and be more descriptive Sébastien Domergue wrote: Hi, in an iterator, the object can be accessed by [0]. After that, it is as in Java. So, with something like that it should work : s:iterator value=getDTl s:prpoerty value=[0].{1}/ /s:iterator Regards Sébastien Hardik Shah a écrit : hi i am using struts 2.0.11.2 i m filling vector somthing like while (rs.next()) { Object [] record = { new Integer(rs.getInt(NodeId)), // Node Id rs.getString(NodeDisplayName), // Display Name new Integer(rs.getInt(ParentNodeId)), // Parent Id rs.getString(FolderName), // Folder Name rs.getString(CanReadFlag), // Can Read Flag rs.getString(CanAddFlag), // Can Add Flag rs.getString(CanEditFlag), // Can Edit Flag rs.getString(canDeleteFlag), // Can Delete Flag new Integer(rs.getInt(iformNo)), // No of comments rs.getString(Filename), //filename rs.getDate(ModifyOn), //file last modified on rs.getString(UserDefineVersionId) }; nodeInfo.addElement(record); how can i get particular field at jsp side in s:iterator somthing like that s:iterator value=getDTl s:prpoerty value={1}/ /s:iterator but i can not please help me - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/about-s%3Aiterator-tp22119987p22120181.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts2 rest plugin :struts.convention.action.*, possible values
Thanks These values, as well as the rest, are documented on the convention plugin page: http://struts.apache.org/2.x/docs/convention-plugin.html#ConventionPlugin-Configurationreference Dave -- View this message in context: http://www.nabble.com/Struts2-rest-plugin-%3Astruts.convention.action.*%2C-possible-values-tp22115906p22120182.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts performance metrics
Hi, I took a simple JSP using Struts tags and one using equivalent JSTL tags and deployed the WARS one by one in tomcat and used JProbe to attach to the session. I filtered the call graph to show OGNL only and then JSTL only. Actually our intention was to reduce the performance implications of using OGNL if there are any. I came across messages in the forum about OGNL issues. Ours is an internet-enabled web site. Thanks, Mohan -- View this message in context: http://www.nabble.com/Struts-performance-metrics-tp22077072p22120189.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts performance metrics
Mohan Radhakrishnan wrote: I took a simple JSP using Struts tags and one using equivalent JSTL tags and deployed the WARS one by one in tomcat and used JProbe to attach to the session. I filtered the call graph to show OGNL only and then JSTL only. That doesn't really help me much. I ask because OGNL property access has been demonstrably slower than JSTL, and rather significantly so. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: about s:iterator
When you are inside an iterator, the context becomes the objet as it is in a for except that there is no explicit name for the property handled. In struts, it's a generic name : [0]. If you just want to display the toString() result, you just have to write : s:property/ without more parameter. If you want to print a special field of your bean, you can access it the same way as in the jsp with s:property value=.../ where [0] will be the current object in the iterator. If you want more examples, you should go [1] and see the third example. Regards [1] : http://struts.apache.org/2.x/docs/iterator.html Hardik Shah a écrit : Thnaks but when i print like s:property value=[0].{1}/ it shows value in all same like [1,1] i could not understand properly what it do please help more and be more descriptive Sébastien Domergue wrote: Hi, in an iterator, the object can be accessed by [0]. After that, it is as in Java. So, with something like that it should work : s:iterator value=getDTl s:prpoerty value=[0].{1}/ /s:iterator Regards Sébastien Hardik Shah a écrit : hi i am using struts 2.0.11.2 i m filling vector somthing like while (rs.next()) { Object [] record = { new Integer(rs.getInt(NodeId)), // Node Id rs.getString(NodeDisplayName), // Display Name new Integer(rs.getInt(ParentNodeId)), // Parent Id rs.getString(FolderName), // Folder Name rs.getString(CanReadFlag), // Can Read Flag rs.getString(CanAddFlag), // Can Add Flag rs.getString(CanEditFlag), // Can Edit Flag rs.getString(canDeleteFlag), // Can Delete Flag new Integer(rs.getInt(iformNo)), // No of comments rs.getString(Filename), //filename rs.getDate(ModifyOn), //file last modified on rs.getString(UserDefineVersionId) }; nodeInfo.addElement(record); how can i get particular field at jsp side in s:iterator somthing like that s:iterator value=getDTl s:prpoerty value={1}/ /s:iterator but i can not please help me - 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: about s:iterator
Hardik Shah wrote: while (rs.next()) { Object [] record = { new Integer(rs.getInt(NodeId)), // Node Id rs.getString(NodeDisplayName), // Display Name new Integer(rs.getInt(ParentNodeId)), // Parent Id tabsrs.getString(FolderName), // Folder Name are rs.getString(CanReadFlag), // Can Read Flag evilrs.getString(CanAddFlag), // Can Add Flag rs.getString(CanEditFlag), // Can Edit Flag rs.getString(canDeleteFlag), // Can Delete Flag new Integer(rs.getInt(iformNo)), // No of comments rs.getString(Filename), //filename rs.getDate(ModifyOn), //file last modified on rs.getString(UserDefineVersionId) }; nodeInfo.addElement(record); how can i get particular field at jsp side in s:iterator s:iterator value=getDTl s:prpoerty value={1}/ /s:iterator Maybe try [0][n]? But yuck... That's a horribly brittle way to write code. At *least* use a map so you don't have to rely on positioning :/ Consider using an actual object, as well, thus eliminating the bulk of this question. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
sx:datetimepicker and form theme css_xhtml
Hi, I'm trying to use the sx:datetimepicker with Struts 2.1.6. The datetimepicker is embedded in a form with theme=css_xhtml. I did not find a way to set for the datetimepicker the theme explicitly and right now it generates a table row (tr) for the datetimepicker while other form elements are correctly wrapped in divs. I have set the sx:datetimepicker to required=true but in this case the form validation fails with a javascript alert Could not validate: I see this alert is called in css_xhtml/validation.js file because it tries to find a parent DIV with class=wwgrp but this does not exist , since the datetimepicker is not generating this DIV (but TR). Anybody has an idea how to fix that? Thanks, Andras. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
DynaValidatorForm is null (from ActionForm in execute)
Here is the code: action .java: public class EditColActionInit extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // form arrives as null DynaValidatorForm myForm = (DynaValidatorForm) form; } struts-config: form-bean name=newRunVer2EditColForm type=org.apache.struts.validator.DynaValidatorForm form-property name=label type=java.lang.String/ /form-bean ... action path=/NewRunVer2/editColInit type=webfabis.newRunVer2.controller.EditColActionInit name=newRunVer2EditColForm scope=request validate=true input=/NewRunVer2/editCol.jsp forward name=failure path=/mainMenu.jsp/ forward name=success path=/NewRunVer2/editCol.jsp/ /action ... plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames value=/webfabis/defaultroot/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml/ set-property property=stopOnFirstError value=false/ /plug-in ... validation.xml: form-validation formset form name=newRunVer2EditColForm field property=label depends=required/ /formset /form-validation pls help.! -- sledge -- View this message in context: http://www.nabble.com/DynaValidatorForm-is-null-%28from-ActionForm-in-execute%29-tp22120932p22120932.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2.1 validation with annotations
I have the same exact problem now after upgrading to 2.1. I have the following model-driven validation defined (which works fine in 2.0): @VisitorFieldValidator(message=) Now I get the same exception as above when validation fails. If I add in any kind of text into the message param, it works but looks ugly since it spits out that message along with the field message. So I get something like this underneath my textfield My default messageLast Name cannot be blank or contain invalid characters Any ideas about what is going on here? Thanks. sheltonn wrote: It is null. Can you point me in the direction of what I am missing? Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Shelton Consulting, LLC ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton From: Musachy Barroso musa...@gmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, February 19, 2009 3:45:35 PM Subject: Re: Struts 2.1 validation with annotations It seems like the default message for that validator is null. Try adding a break point to ValidatorSupport:getMessage and see if the defaultMessage is null. musachy On Thu, Feb 19, 2009 at 3:31 PM, Norris Shelton norrisshel...@yahoo.com wrote: validateObject -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-2.1-validation-with-annotations-tp22109064p22124783.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
S2 How to configure converter for double in xwork-conversion
Hi Im using Struts 2.0.14 and Ive created a converter for Decimal types and configure them in xwork-conversion.properties: java.lang.Float = ve.com.tcs.commons.view.converter.DecimalTypeConverter java.lang.Double = ve.com.tcs.commons.view.converter.DecimalTypeConverter java.math.BigDecimal = ve.com.tcs.commons.view.converter.DecimalTypeConverter Now if I have a form that maps to a class with a double primitive type attribute it will use the converter from Action to JSP, but not from JSP to Action. I created a Class-conversion.properties to see if the problem persists, and it uses the converter from JSP to Action but it tells the converter that its trying to convert to Double.TYPE. How can I configure xwork-conversion.properties to use a specific converter for float and double primitive types? Regards, Néstor Boscán
Re: Struts 2.1 validation with annotations
Please open a jira ticket with as much information as possible. thanks musachy On Fri, Feb 20, 2009 at 12:33 PM, billgloff bgl...@citytechinc.com wrote: I have the same exact problem now after upgrading to 2.1. I have the following model-driven validation defined (which works fine in 2.0): @VisitorFieldValidator(message=) Now I get the same exception as above when validation fails. If I add in any kind of text into the message param, it works but looks ugly since it spits out that message along with the field message. So I get something like this underneath my textfield My default messageLast Name cannot be blank or contain invalid characters Any ideas about what is going on here? Thanks. sheltonn wrote: It is null. Can you point me in the direction of what I am missing? Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Shelton Consulting, LLC ICQ# 26487421 AIM NorrisEShelton YIM norrisshelton From: Musachy Barroso musa...@gmail.com To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, February 19, 2009 3:45:35 PM Subject: Re: Struts 2.1 validation with annotations It seems like the default message for that validator is null. Try adding a break point to ValidatorSupport:getMessage and see if the defaultMessage is null. musachy On Thu, Feb 19, 2009 at 3:31 PM, Norris Shelton norrisshel...@yahoo.com wrote: validateObject -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/Struts-2.1-validation-with-annotations-tp22109064p22124783.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Simplets way to make default labelposition=left on css_html theme
Hi there, after doing some search here and googling I still need some directions on the simplest way to make my forms s:textfield have a default labelposition=left attribute. I am using css_html theme... ¿do I need to extend it? thanks, Ignacio -- View this message in context: http://www.nabble.com/Simplets-way-to-make-default-labelposition%3Dleft-on-css_html-theme-tp22131248p22131248.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: WARNING: Could not find action or result There is no Action mapped for na...
In your index.jsp if seems you are saying s:form action=loadAmrita so the framework is searching the default / namespace. Try s:form action=/Amrita/loadAmrita.action ** A Good Credit Score is 700 or Above. See yours in just 2 easy steps! (http://pr.atwola.com/promoclk/100126575x1218822736x1201267884/aol?redir=http:%2F%2Fwww.freecreditreport.com%2Fpm%2Fdefault.aspx%3Fsc%3D668072%26hmpgID %3D62%26bcd%3DfebemailfooterNO62)
Re: @Result annotation (2.1.6) -- name does not default to 'success'
Wasn't aware of it (the separator) and that any single character does the separation trick. Thanks for the pointer. Chris -Original Message- From: Dave Newton newton.d...@yahoo.com To: Struts Users Mailing List user@struts.apache.org Sent: Thu, 19 Feb 2009 12:58 pm Subject: Re: @Result annotation (2.1.6) -- name does not default to 'success' musom...@aol.com wrote:? I was trying to dodge the massive renaming of the jsps to hyphenated names.? ? Depending on your current naming conventions the struts.convention.action.name.separator might be of use.? ? That aside, most massive renaming tasks can be handled with a few-line [perl|python|ruby|shell|etc] script, so it shouldn't be *that* bad!? ? Dave? ? -? To unsubscribe, e-mail: user-unsubscr...@struts.apache.org? For additional commands, e-mail: user-h...@struts.apache.org? ?
Re: Nested iterator struts 2.1.6 -- automatically rebuild the collection
What do you have inside the iterator tag?? Hard to diagnose without knowing what you have. Some possible causes: A a possible OGNL expression error inside your iterator tag. If the Sample objects are not built-in java objects (String, Date..) you might be having type conversion problems? Are you sending the information back to the same action or is there a possible mix-up in the attributes of your tags Chris -Original Message- From: Phan, Hienthuc T hienthuc_p...@merck.com To: Struts Users Mailing List user@struts.apache.org Sent: Mon, 9 Feb 2009 5:46 pm Subject: Nested iterator struts 2.1.6 -- automatically rebuild the collection Hi, Using s:iterator .. tag, how do you instruct struts to rebuild the collection automatically? I have a List of List of Sample objects I use s:iterator tag to loop through and display data for user to make changes The displaying part is OK; however, when the form is submitted, the List of List of Sample objects is not populated. In Struts 1.x, the tag logic:iterator was used and if we add indexed=true for each element inside the logic:iterator tag, Struts automatically rebuild the collection. Is there a way that it can accomplish with s:iterator? Thank you. Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.
Re: Struts performance metrics
Hijust to share some of my experience and see what you decide to do I have worked on a project which the end result is packed into a jar (actions and stuff)and will be throw into and coexist with other project. To run the project, I simply put the jar and related jsp and struts setting xml's into another project and everything will run. I have deployed my project into 2-3 different projects(all using plain servlets) in my company and . And all worked fine, meaning no major compatibility issues. Except for one, I have the performance issues described on most places you have seen. And I basically did the same thing as what they all did, I changed Struts tags to JSTL tags, and everything just worked fine. All I can say is that from my observation its probably the different jars files included that my cause some conflicts. I have not have the time fully test it out. so just something to share with you.
Re: about s:iterator
yap you right newton.dave wrote: Maybe try [0][n]? But yuck... That's a horribly brittle way to write code. At *least* use a map so you don't have to rely on positioning :/ Consider using an actual object, as well, thus eliminating the bulk of this question. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- View this message in context: http://www.nabble.com/about-s%3Aiterator-tp22119987p22132774.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts performance metrics
I will use larger datasets and property access also. We plan to profe right from the beginning but I am not sure how JSTL can replace Struts tags to increase performance. I understand that in order to display data we can use JSTL. Struts tags are required to use the framework fully. Isn't it ? -- View this message in context: http://www.nabble.com/Struts-performance-metrics-tp22077072p22132801.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org