Re: Cleaner way to create this page?
Hi, or use logic:equals, and as David stated put RoutingEnginePropertiesMgr.getInstance() in form, there is no client side in struts, page is rendered to html on the server side and travels from server to client as pure html. Best greetings, Paweł Wielgus. 2009/7/27 Musachy Barroso musa...@gmail.com: add RoutingEnginePropertiesMgr.getInstance() to the request attributes map, and use jstl or struts tags in the jsp: c:if test=${rte.useCaptcha} ... /c:if Dare to stay away from scriptlets ;) musachy On Mon, Jul 27, 2009 at 9:35 AM, laredotornadolaredotorn...@gmail.com wrote: A couple of things ... 1. Struts tag libraries wouldn't apply here, right? I'm trying to do some conditional if logic and I don't see which of the Struts libraries would fit. I'm using Struts 1.3. 2. You mention to put this, %= rePropMgr.getCaptchaPublicKey() % in the ActionForm, but I need this output to the client side because the script src requires that information. Knowing that, any other advice there? Thanks , - Dave Kawczynski, David wrote: Write a taglib or put a getCaptchaPublicKey() method in the ActionForm, and use struts taglibs. -Original Message- From: laredotornado [mailto:laredotorn...@gmail.com] Sent: Monday, July 27, 2009 11:51 AM To: user@struts.apache.org Subject: Cleaner way to create this page? Hi, I'm using Struts 1.3. I have this in my JSP page ... % final RoutingEnginePropertiesMgr rePropMgr = RoutingEnginePropertiesMgr.getInstance(); if (rePropMgr.isUseCaptcha()) { % script type=text/javascript src=https://api-secure.recaptcha.net/challenge?k=%= rePropMgr.getCaptchaPublicKey() %/script % } // if % Is there a cleaner way to write this that avoids using scriptlets? Thanks for any advice, - Dave -- View this message in context: http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683 147p24683147.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 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. - 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/Cleaner-way-to-create-this-page--tp24683147p24683970.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 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 1.x, how to create packge and jar file ...?
2009/7/27 john lee sh_thorn_b...@yahoo.com: how can i generate 1 single .jar? and put into which folder, then i can delete those many *.class files, and delete folder packageX as well? Why do you want do that? Regards -- Lukasz http://www.lenart.org.pl/ http://dailylog.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Java template custom component problem
Hi, I m trying to write a custom component in Java template. I've gone through the documentation and the java template plugin source code and able to write a simple component (in fact I've copied one of the tag and changed the name nad trying to use it) *DataGridHandler.java* public class DataGridHandler extends AbstractTagHandler implements TagGenerator { @Override public void generate() throws IOException { MapString, Object params = context.getParameters(); Attributes attr = new Attributes(); attr.addIfExists(name, params.get(name)) .addIfExists(id, params.get(id)) .addIfExists(class, params.get(cssClass)) .addIfExists(style, params.get(cssStyle)) .addIfExists(title, params.get(title)); super.start(div, attr); } public static class CloseHandler extends AbstractTagHandler implements TagGenerator { public void generate() throws IOException { end(div); } } } But When I try to run, I m getting below exception. java.lang.NullPointerException org.apache.struts2.components.template.TemplateEngineManager.getTemplateEngine(TemplateEngineManager.java:102) org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:549) org.apache.struts2.components.UIBean.end(UIBean.java:513) org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42) org.apache.jsp.WEB_002dINF.content.test_jsp._jspx_meth_s_005fcomponent_005f0(test_jsp.java:92) org.apache.jsp.WEB_002dINF.content.test_jsp._jspService(test_jsp.java:61) 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:374) 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.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154) org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249) org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
Re: Java template custom component problem
I m sorry, I missed out the jsp part: s:component template=DataGridHandler.java templateDir=com/nic/eawedan/components label=Data grid/s:component Regards, ManiKanta G twitter.com/manikantag
Convention plugin blues
Hi Is there a setting/property I can set to get the Convention plugin to tell me where what it's looking for to resolve to the result classes. Having split a Struts 2 (2.1.7) application that was running solely on Tomcat to now serve static content from an Apache Webserver and pass Struts requests through to Tomcat, I've got the html being served ok, config-browser/index.action finds my actions, but I cannot for the life of me get it to find my result classes. If I could only see what/where it's trying to find them .. Regards - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
AJAX Validation
Hi everybody, I'm currently working on a project based on Struts 2.0.11. We're planning to migrate to the last 2.1.x version but I've just seen that the Dojo plugin has been deprecating. Consequently, what's your recommandation to perform proper AJAX validation since the example on the Wiki is still based on the Dojo plugin ? Which plugin will be the next standard for Ajax tags in Struts 2 ? JQuery plugin ? Thanks in advance for your answers, Regards, Nicolas
Re: AJAX Validation
From what I can tell Dojo has been moved out into a plugin, but still exists. Honestly though, I¹d take the opportunity move away from an integrated solution to using a javascript framework directly. We use jQuery and it integrates with Struts without any major issues and more often than not offers much greater flexibility. I know of others who use dojo, mootools and prototype without any issues. Z. Hi everybody, I'm currently working on a project based on Struts 2.0.11. We're planning to migrate to the last 2.1.x version but I've just seen that the Dojo plugin has been deprecating. Consequently, what's your recommandation to perform proper AJAX validation since the example on the Wiki is still based on the Dojo plugin ? Which plugin will be the next standard for Ajax tags in Struts 2 ? JQuery plugin ? Thanks in advance for your answers, Regards, Nicolas
Re: AJAX Validation
Hi Zoran, Thank you for your answer. Since you are using JQuery directly, how do you perform data validation ? Is it possible to use the XML Files or annotations provided by Struts ? Cheers, Nicolas On Tue, Jul 28, 2009 at 11:26 AM, Zoran Avtarovski zo...@sparecreative.comwrote: From what I can tell Dojo has been moved out into a plugin, but still exists. Honestly though, I¹d take the opportunity move away from an integrated solution to using a javascript framework directly. We use jQuery and it integrates with Struts without any major issues and more often than not offers much greater flexibility. I know of others who use dojo, mootools and prototype without any issues. Z. Hi everybody, I'm currently working on a project based on Struts 2.0.11. We're planning to migrate to the last 2.1.x version but I've just seen that the Dojo plugin has been deprecating. Consequently, what's your recommandation to perform proper AJAX validation since the example on the Wiki is still based on the Dojo plugin ? Which plugin will be the next standard for Ajax tags in Struts 2 ? JQuery plugin ? Thanks in advance for your answers, Regards, Nicolas -- .. Nicolas BARON Architecte OCTO Technology Maroc .. 59, av Fal Ould Oumeir Rabat Agdal - Maroc GSM : (212) 661 46 20 38 http://www.octo.com/ ...
Re: Struts vs Other competitors
Sadly, I have kids so I either have no time for video games or can¹t get access to the gear. My past time is daydreaming about having a past time. As for testing, and documentation these tasks are as valid as any others, but again the problem from my perspective, and I don¹t mean that in a negative way, is finding which tasks need to be done. I have so much trouble navigating through the dev management part of the site. I guess what I was trying to say is that if the outstanding items could be broken down in manageable tasks, I¹d find it much less intimidating to take them on. Z. I would say the biggest help we can get right now is on the documentation and get help testing releases. One thing I have always seems lacking in the struts community, is support from users to help testing releases *before* they are actually released. As for coordinating effort, I am not sure it would work (besides the usual..hey I am working on this cool X thing.. email in dev@), I think that working as volunteers doesn't fit well with commitment because we also have other priorities, you know, like playing video games and stuff :) musachy On Mon, Jul 27, 2009 at 8:35 PM, Zoran Avtarovskizo...@sparecreative.com wrote: I have to agree. Our touch with the JSF Oracle was both painful and fruitless and lead us to truly appreciate how bad things could be. Having said that, I think Martin has raised some points about how S2 can be improved and I think S2 is at a stage where there needs to be some general discussion on where all interested parties (devs and users) think the framework should be heading and where there are deficiencies. I for one think, that with S2¹s improved plugin architecture, there is a huge amount of scope in what can be achieved. We need a few key people to guide the process. I know my biggest fear is over committing and not having the time to deliver. If there was a centralised coordinator who could organise a second tier of developers, for example, who can help on a smaller scale then I believe more of the niche development could be achieved. Z. On Mon, Jul 27, 2009 at 4:42 AM, Andrey Rogovstrut...@gmail.com wrote: I agree with Matt Rable that JSF programming based on RAD methods makes us transition to JSF. I think many, many people have crossed that bridge and came back in rush after a while. musachy
Re: AJAX Validation
It depends on the approach you want to take in validation. For security reasons we run two layers of validation, a simple model using jQuery checking mandatory fields and limits checks and then a more rigorous model server side. As for setting up, we looked at how it was done with S2 and dojo, in the end we found it it much easier just to program directly when creating the form pages. Because of the powerful selectors in jQuery and judicious use of listeners we¹ve had no issue with maintenance of code and we¹ve been able to leverage a range of plugins available for jQuery. Originally we tried to have the scripts created automagically through programming, but in the end it wasn¹t worth the effort. We¹ve extended the CSS and XHTML templates to accommodate some time saving features but on the whole there wasn¹t much to it. I now find it quicker to setup the validation directly rather than setting up the XML files. It¹s amazing what can be achieved with a few well placed s:if tags and some JS code. Z. Hi Zoran, Thank you for your answer. Since you are using JQuery directly, how do you perform data validation ? Is it possible to use the XML Files or annotations provided by Struts ? Cheers, Nicolas On Tue, Jul 28, 2009 at 11:26 AM, Zoran Avtarovski zo...@sparecreative.comwrote: From what I can tell Dojo has been moved out into a plugin, but still exists. Honestly though, I¹d take the opportunity move away from an integrated solution to using a javascript framework directly. We use jQuery and it integrates with Struts without any major issues and more often than not offers much greater flexibility. I know of others who use dojo, mootools and prototype without any issues. Z. Hi everybody, I'm currently working on a project based on Struts 2.0.11. We're planning to migrate to the last 2.1.x version but I've just seen that the Dojo plugin has been deprecating. Consequently, what's your recommandation to perform proper AJAX validation since the example on the Wiki is still based on the Dojo plugin ? Which plugin will be the next standard for Ajax tags in Struts 2 ? JQuery plugin ? Thanks in advance for your answers, Regards, Nicolas
Re: Struts 2.x and Java 6 and/or Servlet 2.5
Lee Clemens wrote: With Java 5's EOL coming on October 30th and the additional features available in Servlet API 2.5 - is there any timeline for updating Struts 2.x's platform requirements? Or have I misunderstood and these are only Minimum requirements? They're minimum requirements. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Handle Japanese characters from jsp page into ActionClass
HiSo basically in my web.xml i add CharacterEncodingFilter as the first filter and it will be handled in web application as first filter, i have 3 different filters already defined, so adding CharacterEncodingFilter on top will ensure that it will be the first filter to be called On Mon, Jul 27, 2009 at 4:32 PM, Greg Lindholm greg.lindh...@gmail.comwrote: That filter will work with struts 1. Just be sure it's early in the filter chain before anyone is reading the request. I always make it the first filter. On Mon, Jul 27, 2009 at 4:23 PM, Ashish Kulkarni ashish.kulkarn...@gmail.com wrote: HiI am using struts 1.2.6 and not yes in struts 2, So should i just put in a general filter to do encoding? Ashish On Mon, Jul 27, 2009 at 4:10 PM, Greg Lindholm greg.lindh...@gmail.com wrote: On Mon, Jul 27, 2009 at 3:34 PM, Ashish Kulkarni ashish.kulkarn...@gmail.com wrote: HiI have a jsp page which displays data in UTF-8 encoding, there is a input text field, when user enter japanese characters in this input text and data is transferred to Actionclass i get junk value, How do i handle japanese characters in ActionClass, do i have to do anything special in servlet or in JSP? I did try to put request.setCharacterEncoding(UTF-8); in my Action class, but still does not work. JSP page displays proper japanese characters as it is uses UTF-8 for encoding, Is there a solution which will work for tomcat, weblogic and websphere application server? or is encoding handled seperately by different app servers Setting character encoding in your action is too late, the parameters have already been read from the request. You need to set the character encoding in a filter that runs before the struts2 filter. There is a simple filter that will do it. You just need to add this filter to your web.xml before the struts2 filter. public class CharacterEncodingFilter implements Filter { public void doFilter(ServletRequest request, ServletResponse response, FilterChain next) throws IOException, ServletException { String encoding = request.getCharacterEncoding(); if (encoding == null || encoding.length() == 0) { request.setCharacterEncoding(UTF-8); } next.doFilter(request, response); } }
Re: AJAX Validation
There is an interceptor called JSONValidation (or something like that). If you cruise to the bottom of this page, you will see an example of using it with Prototype - http://struts.apache.org/2.x/docs/ajax-validation.html I started a JQuery plugin that is sitting in the sandbox right now waiting for some direction, but I used this technique and if you're willing to wade through some code you can see how to use the JSONValidator in a very struts-y way. Also, there is a showcase where I put examples of AJAX form handling (with validation). http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-jquery-plugin/ http://svn.apache.org/viewvc/struts/sandbox/trunk/s2-jquery-showcase/ -Wes On Tue, Jul 28, 2009 at 7:30 AM, Nicolas Baronnba...@octo.com wrote: Hi Zoran, Thank you for your answer. Since you are using JQuery directly, how do you perform data validation ? Is it possible to use the XML Files or annotations provided by Struts ? Cheers, Nicolas On Tue, Jul 28, 2009 at 11:26 AM, Zoran Avtarovski zo...@sparecreative.comwrote: From what I can tell Dojo has been moved out into a plugin, but still exists. Honestly though, I¹d take the opportunity move away from an integrated solution to using a javascript framework directly. We use jQuery and it integrates with Struts without any major issues and more often than not offers much greater flexibility. I know of others who use dojo, mootools and prototype without any issues. Z. Hi everybody, I'm currently working on a project based on Struts 2.0.11. We're planning to migrate to the last 2.1.x version but I've just seen that the Dojo plugin has been deprecating. Consequently, what's your recommandation to perform proper AJAX validation since the example on the Wiki is still based on the Dojo plugin ? Which plugin will be the next standard for Ajax tags in Struts 2 ? JQuery plugin ? Thanks in advance for your answers, Regards, Nicolas -- .. Nicolas BARON Architecte OCTO Technology Maroc .. 59, av Fal Ould Oumeir Rabat Agdal - Maroc GSM : (212) 661 46 20 38 http://www.octo.com/ ... -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: AJAX Validation
is JS validation thru a JS function faster than allowing the FieldValidationInterceptor to verify? is there a way to coordinate validations between the 2 layers (so that the effort is not duplicated) possibly an advised method from spring? http://struts.apache.org/2.1.2/struts2-core/apidocs/com/opensymphony/xwork2/validator/annotations/RequiredFieldValidator.html thanks, Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Tue, 28 Jul 2009 21:51:44 +1000 Subject: Re: AJAX Validation From: zo...@sparecreative.com To: user@struts.apache.org It depends on the approach you want to take in validation. For security reasons we run two layers of validation, a simple model using jQuery checking mandatory fields and limits checks and then a more rigorous model server side. As for setting up, we looked at how it was done with S2 and dojo, in the end we found it it much easier just to program directly when creating the form pages. Because of the powerful selectors in jQuery and judicious use of listeners we¹ve had no issue with maintenance of code and we¹ve been able to leverage a range of plugins available for jQuery. Originally we tried to have the scripts created automagically through programming, but in the end it wasn¹t worth the effort. We¹ve extended the CSS and XHTML templates to accommodate some time saving features but on the whole there wasn¹t much to it. I now find it quicker to setup the validation directly rather than setting up the XML files. It¹s amazing what can be achieved with a few well placed s:if tags and some JS code. Z. Hi Zoran, Thank you for your answer. Since you are using JQuery directly, how do you perform data validation ? Is it possible to use the XML Files or annotations provided by Struts ? Cheers, Nicolas On Tue, Jul 28, 2009 at 11:26 AM, Zoran Avtarovski zo...@sparecreative.comwrote: From what I can tell Dojo has been moved out into a plugin, but still exists. Honestly though, I¹d take the opportunity move away from an integrated solution to using a javascript framework directly. We use jQuery and it integrates with Struts without any major issues and more often than not offers much greater flexibility. I know of others who use dojo, mootools and prototype without any issues. Z. Hi everybody, I'm currently working on a project based on Struts 2.0.11. We're planning to migrate to the last 2.1.x version but I've just seen that the Dojo plugin has been deprecating. Consequently, what's your recommandation to perform proper AJAX validation since the example on the Wiki is still based on the Dojo plugin ? Which plugin will be the next standard for Ajax tags in Struts 2 ? JQuery plugin ? Thanks in advance for your answers, Regards, Nicolas _ Bing™ brings you maps, menus, and reviews organized in one place. Try it now. http://www.bing.com/search?q=restaurantsform=MLOGENpubl=WLHMTAGcrea=TXT_MLOGEN_Local_Local_Restaurants_1x1
Re: AJAX Validation
@Wes : Thanks for the samples, I'll check it. The struts2-jquery-plugin you are talking about is the same as the one released in 1.0 last night ? @Martin : I agree. Coordinating the 2 layers (ie. client-side server-side validation) is one of my main goal to avoid rewriting validation rules twice, possibly in 2 different languages. Cheers, Nicolas On Tue, Jul 28, 2009 at 1:41 PM, Martin Gainty mgai...@hotmail.com wrote: is JS validation thru a JS function faster than allowing the FieldValidationInterceptor to verify? is there a way to coordinate validations between the 2 layers (so that the effort is not duplicated) possibly an advised method from spring? http://struts.apache.org/2.1.2/struts2-core/apidocs/com/opensymphony/xwork2/validator/annotations/RequiredFieldValidator.html thanks, Martin __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Tue, 28 Jul 2009 21:51:44 +1000 Subject: Re: AJAX Validation From: zo...@sparecreative.com To: user@struts.apache.org It depends on the approach you want to take in validation. For security reasons we run two layers of validation, a simple model using jQuery checking mandatory fields and limits checks and then a more rigorous model server side. As for setting up, we looked at how it was done with S2 and dojo, in the end we found it it much easier just to program directly when creating the form pages. Because of the powerful selectors in jQuery and judicious use of listeners we¹ve had no issue with maintenance of code and we¹ve been able to leverage a range of plugins available for jQuery. Originally we tried to have the scripts created automagically through programming, but in the end it wasn¹t worth the effort. We¹ve extended the CSS and XHTML templates to accommodate some time saving features but on the whole there wasn¹t much to it. I now find it quicker to setup the validation directly rather than setting up the XML files. It¹s amazing what can be achieved with a few well placed s:if tags and some JS code. Z. Hi Zoran, Thank you for your answer. Since you are using JQuery directly, how do you perform data validation ? Is it possible to use the XML Files or annotations provided by Struts ? Cheers, Nicolas On Tue, Jul 28, 2009 at 11:26 AM, Zoran Avtarovski zo...@sparecreative.comwrote: From what I can tell Dojo has been moved out into a plugin, but still exists. Honestly though, I¹d take the opportunity move away from an integrated solution to using a javascript framework directly. We use jQuery and it integrates with Struts without any major issues and more often than not offers much greater flexibility. I know of others who use dojo, mootools and prototype without any issues. Z. Hi everybody, I'm currently working on a project based on Struts 2.0.11. We're planning to migrate to the last 2.1.x version but I've just seen that the Dojo plugin has been deprecating. Consequently, what's your recommandation to perform proper AJAX validation since the example on the Wiki is still based on the Dojo plugin ? Which plugin will be the next standard for Ajax tags in Struts 2 ? JQuery plugin ? Thanks in advance for your answers, Regards, Nicolas _ Bing™ brings you maps, menus, and reviews organized in one place. Try it now. http://www.bing.com/search?q=restaurantsform=MLOGENpubl=WLHMTAGcrea=TXT_MLOGEN_Local_Local_Restaurants_1x1 ...
Re: AJAX Validation
Wes Wannemacher wrote: There is an interceptor called JSONValidation (or something like that). If you cruise to the bottom of this page, you will see an example of using it with Prototype - http://struts.apache.org/2.x/docs/ajax-validation.html That's fairly slick, but I wonder if there's a way to prevent the validation form submission from uploading files an additional time? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: AJAX Validation
On Tue, Jul 28, 2009 at 9:48 AM, Dale Newfieldd...@newfield.org wrote: Wes Wannemacher wrote: There is an interceptor called JSONValidation (or something like that). If you cruise to the bottom of this page, you will see an example of using it with Prototype - http://struts.apache.org/2.x/docs/ajax-validation.html That's fairly slick, but I wonder if there's a way to prevent the validation form submission from uploading files an additional time? -Dale Dale, I've never looked into that, but it's a valid point, why don't you put in a JIRA. I think it would be pretty easy to say something like - hey, if this is a multipart/form-data encoding type, let's take a different course of action. -Wes -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: AJAX Validation
On Tue, Jul 28, 2009 at 9:48 AM, Nicolas Baronnba...@octo.com wrote: @Wes : Thanks for the samples, I'll check it. The struts2-jquery-plugin you are talking about is the same as the one released in 1.0 last night ? No, this is different. When I started this one (many moons ago), I knew of at least a few other plugins, but they were concentrating on adding widgets and other eye candy. I decided to take this and work on form submission with validation, then add eye candy later. The recent release announced on dev is the reason why I mentioned that my plugin is awaiting future direction. I only pointed to it because it provides some examples of how to do the ajax form processing with validation. -Wes -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: AJAX Validation
Very clear. I'll check what you've just mentionned and try to find the best strategy related to our context. Thanks a lot your help. Nicolas On Tue, Jul 28, 2009 at 1:54 PM, Wes Wannemacher w...@wantii.com wrote: On Tue, Jul 28, 2009 at 9:48 AM, Nicolas Baronnba...@octo.com wrote: @Wes : Thanks for the samples, I'll check it. The struts2-jquery-plugin you are talking about is the same as the one released in 1.0 last night ? No, this is different. When I started this one (many moons ago), I knew of at least a few other plugins, but they were concentrating on adding widgets and other eye candy. I decided to take this and work on form submission with validation, then add eye candy later. The recent release announced on dev is the reason why I mentioned that my plugin is awaiting future direction. I only pointed to it because it provides some examples of how to do the ajax form processing with validation. -Wes -- Wes Wannemacher Head Engineer, WanTii, Inc. Need Training? Struts, Spring, Maven, Tomcat... Ask me for a quote! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- .. Nicolas BARON Architecte OCTO Technology Maroc .. 59, av Fal Ould Oumeir Rabat Agdal - Maroc GSM : (212) 661 46 20 38 http://www.octo.com/ ...
Re: AJAX Validation
Wes Wannemacher wrote: why don't you put in a JIRA Done: https://issues.apache.org/struts/browse/WW-3206 (although it's more a documentation fix than anything else) -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Convention plugin blues
Hi Is there a setting/property I can set to get the Convention plugin to tell me where what it's looking for to resolve to the result classes. Having split a Struts 2 (2.1.7) application that was running solely on Tomcat to now serve static content from an Apache Webserver and pass Struts requests through to Tomcat, I've got the html being served ok, config-browser/index.action finds my actions, but I cannot for the life of me get it to find my result classes. If I could only see what/where it's trying to find them .. Regards Tried this?: http://cwiki.apache.org/S2PLUGINS/config-browser-plugin.html Jim C. signature.asc Description: OpenPGP digital signature