Re: Any Struts + mysql example ?
Hi Saeed, would like please send it to me or give me a link to it. thanks --- On Sat, 11/28/09, Saeed Iqbal wrote: From: Saeed Iqbal Subject: Re: Any Struts + mysql example ? To: "Struts Users Mailing List" Date: Saturday, November 28, 2009, 9:52 PM I wouldnt have a JDBC example but i have a MVC example where Model ORM is Hibernate, Controller is Spring and View is Struts Search for startsoft in google code On Sat, Nov 28, 2009 at 9:50 PM, A. Lotfi wrote: > with jdbc, > > thanks > > --- On Sat, 11/28/09, Saeed Iqbal wrote: > > > From: Saeed Iqbal > Subject: Re: Any Struts + mysql example ? > To: "Struts Users Mailing List" > Date: Saturday, November 28, 2009, 11:41 AM > > > Struts with JDBC? or JPA/Hibernate > > On Sat, Nov 28, 2009 at 9:39 PM, A. Lotfi wrote: > > > Hi, > > > > I Please if you know about a nice example or a small proj using struts > and > > mysql I would appreciate. > > > > thanks > > > > > > > > > > > -- > Saeed Iqbal > http://www.iqbalconsulting.com > Struts - J2EE - Application Architect / Developer > > > > > -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
RE: Any Struts + mysql example ?
the Spring 2.5 distro has a Hibernate example org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter did you say Struts is the view ..perhaps you meant Struts-taglib is used in the jsp??? Martin Gainty __ 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: Sun, 29 Nov 2009 02:55:47 + > From: larryr...@comcast.net > To: user@struts.apache.org > Subject: Re: Any Struts + mysql example ? > > Another example using JPA/Hibernate would be the Struts2InAction example from > the book of that name. > > - Original Message - > From: "Saeed Iqbal" > To: "Struts Users Mailing List" > Sent: Saturday, November 28, 2009 6:52:29 PM GMT -08:00 US/Canada Pacific > Subject: Re: Any Struts + mysql example ? > > I wouldnt have a JDBC example but i have a MVC example where Model ORM is > Hibernate, Controller is Spring and View is Struts > > Search for startsoft in google code > > On Sat, Nov 28, 2009 at 9:50 PM, A. Lotfi wrote: > > > with jdbc, > > > > thanks > > > > --- On Sat, 11/28/09, Saeed Iqbal wrote: > > > > > > From: Saeed Iqbal > > Subject: Re: Any Struts + mysql example ? > > To: "Struts Users Mailing List" > > Date: Saturday, November 28, 2009, 11:41 AM > > > > > > Struts with JDBC? or JPA/Hibernate > > > > On Sat, Nov 28, 2009 at 9:39 PM, A. Lotfi wrote: > > > > > Hi, > > > > > > I Please if you know about a nice example or a small proj using struts > > and > > > mysql I would appreciate. > > > > > > thanks > > > > > > > > > > > > > > > > > > > -- > > Saeed Iqbal > > http://www.iqbalconsulting.com > > Struts - J2EE - Application Architect / Developer > > > > > > > > > > > > > > -- > Saeed Iqbal > http://www.iqbalconsulting.com > Struts - J2EE - Application Architect / Developer _ Bing brings you maps, menus, and reviews organized in one place. http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1
Re: Any Struts + mysql example ?
Another example using JPA/Hibernate would be the Struts2InAction example from the book of that name. - Original Message - From: "Saeed Iqbal" To: "Struts Users Mailing List" Sent: Saturday, November 28, 2009 6:52:29 PM GMT -08:00 US/Canada Pacific Subject: Re: Any Struts + mysql example ? I wouldnt have a JDBC example but i have a MVC example where Model ORM is Hibernate, Controller is Spring and View is Struts Search for startsoft in google code On Sat, Nov 28, 2009 at 9:50 PM, A. Lotfi wrote: > with jdbc, > > thanks > > --- On Sat, 11/28/09, Saeed Iqbal wrote: > > > From: Saeed Iqbal > Subject: Re: Any Struts + mysql example ? > To: "Struts Users Mailing List" > Date: Saturday, November 28, 2009, 11:41 AM > > > Struts with JDBC? or JPA/Hibernate > > On Sat, Nov 28, 2009 at 9:39 PM, A. Lotfi wrote: > > > Hi, > > > > I Please if you know about a nice example or a small proj using struts > and > > mysql I would appreciate. > > > > thanks > > > > > > > > > > > -- > Saeed Iqbal > http://www.iqbalconsulting.com > Struts - J2EE - Application Architect / Developer > > > > > -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: Any Struts + mysql example ?
I wouldnt have a JDBC example but i have a MVC example where Model ORM is Hibernate, Controller is Spring and View is Struts Search for startsoft in google code On Sat, Nov 28, 2009 at 9:50 PM, A. Lotfi wrote: > with jdbc, > > thanks > > --- On Sat, 11/28/09, Saeed Iqbal wrote: > > > From: Saeed Iqbal > Subject: Re: Any Struts + mysql example ? > To: "Struts Users Mailing List" > Date: Saturday, November 28, 2009, 11:41 AM > > > Struts with JDBC? or JPA/Hibernate > > On Sat, Nov 28, 2009 at 9:39 PM, A. Lotfi wrote: > > > Hi, > > > > I Please if you know about a nice example or a small proj using struts > and > > mysql I would appreciate. > > > > thanks > > > > > > > > > > > -- > Saeed Iqbal > http://www.iqbalconsulting.com > Struts - J2EE - Application Architect / Developer > > > > > -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: Alert Box issue in Struts
Hi Deepak, as far as i know validation framework will generate your validation javascript automaticly if client side validation is turn on (somewhere in configuration maybe). But i haven't used client side validation at all so i'm not a good help here. Best greetings, Pawel Wielgus. 2009/11/28, deepakl_2000 : > > Hi Pawel, > i need to implement a Javascript function for this in jsp.(not > server side validation),how to mix javascript with jsp code please help > with snippet of code... > > Deepak > > Paweł Wielgus wrote: >> >> Hi Deepak, >> read about validation framework in struts2 and about action messages >> which should solve your problem. >> >> Best greetings, >> Pawel Wielgus. >> >> 2009/11/28, deepakl_2000 : >>> >>> Hi Struts Experts, >>> >>> I'm using Struts for Controller,i.e presentation tier. >>> IBatis as a Persistence Framework . >>> >>> Action class --> Service class --> Ibatis .xml file --> Database(SQL >>> Sever >>> 2000) >>> >>> I have implemented a Save operation In Service class which inserts a >>> record >>> in database. >>> When the record is successfully inserted into database. >>> >>> I want to show a Dialog box i.e an alert box saying >>> "Records are Saved Successfully" else an alert box "Save Operation >>> Unsuccessful",in case records are not saved. >>> >>> How do i implement this feature in Struts along with Ibatis Framework >>> Integration >>> Please help >>> >>> >>> >>> 1 Requirement > >>> --- >>> Save.jsp >>> -- >>> //do some logical operation and click on Save button >>> Save //call to SaveAction.java depending on >>> struts-config.xml (setting/declaration) >>> >>> >>> >>> SaveAction.java >>> >>> >>> myService.insertData(XYZPOJO1,XYZPOJO2); //call insertData method in >>> myService class >>> mapping.findforward(); // i want to redirect to Save.jsp and display an >>> alert button indicating records are saved or not??please help >>> >>> --- >>> myService class >>> --- >>> >>> insertData(...){ >>> sqlMap.insert("saveData1",XYZPOJO1); >>> sqlMap.insert("saveData2",XYZPOJO2); >>> } >>> >>> >>> >>> after insert operation i want to return a value determining whether save >>> is >>> successful or not?? how to proceed. >>> >>> >>> how should this part be implemented in jsp i.e displaying an alert box >>> depending on some condition.please help me (in my case return value) >>> ??? >>> >>> >>> >>> >>> 2 Requirement > Once i get an alert Box and i click on "ok" button of >>> that >>> alert box,i want to be re-directed to another jsp page (example: >>> MainMenu.jsp") >>> >>> i.e from SaveAction.java --> goto Save.jsp -> display an alert >>> accordingly and click on ok button of alert box --> re-direct to >>> MainMenu.jsp >>> >>> >>> Deepak >>> -- >>> View this message in context: >>> http://old.nabble.com/Alert-Box-issue-in-Struts-tp26545846p26545846.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 >> >> >> > :confused: > -- > View this message in context: > http://old.nabble.com/Alert-Box-issue-in-Struts-tp26545846p26554622.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: Where to disable encrypting of non latin chars?
I do not get what you are talking. Saeed Iqbal-2 wrote: > > I mean if you want to display decoded HTML value, then feed in encoded > values or the other option first > > On Sat, Nov 28, 2009 at 6:50 AM, Saeed Iqbal wrote: > >> These are encoded characters. Either output this but first you must imo >> try >> s:property with escape="false" >> >> >> On Sat, Nov 28, 2009 at 5:57 AM, Alex Siman >> wrote: >> >>> >>> I don't know... Do I need these extra bytes in output? And are that >>> entities >>> good for SEO (Google, others)? >>> >>> Saeed Iqbal-2 wrote: >>> > >>> > I personally feel that is a good feature of Struts. >>> > >>> > On Fri, Nov 27, 2009 at 8:22 AM, Saeed Iqbal >>> wrote: >>> > >>> >> escape="false" can help you or show those characters as encoded >>> values >>> >> >>> >> >>> >> On Fri, Nov 27, 2009 at 8:17 AM, Alex Siman >>> >> wrote: >>> >> >>> >>> >>> >>> I just have found another issue after upgrading from [2.1.6] -> >>> [2.1.8]. >>> >>> Struts now encode any non latin char to its HTML entity of property. >>> >>> >>> >>> E.g. now I have such a mess in HTML output (in browser it looks >>> OK): >>> >>> описание >>> >>> >>> >>> How to disable encoding of every char but leave only encoding of >>> special >>> >>> chars like?: >>> >>> < > ' " >>> >>> -- >>> >>> View this message in context: >>> >>> >>> http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26535859.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 >>> >>> >>> >>> >>> >> >>> >> >>> >> -- >>> >> Saeed Iqbal >>> >> http://www.iqbalconsulting.com >>> >> Struts - J2EE - Application Architect / Developer >>> >> >>> >> >>> > >>> > >>> > -- >>> > Saeed Iqbal >>> > http://www.iqbalconsulting.com >>> > Struts - J2EE - Application Architect / Developer >>> > >>> > >>> >>> -- >>> View this message in context: >>> http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26545411.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 >>> >>> >> >> >> -- >> Saeed Iqbal >> http://www.iqbalconsulting.com >> Struts - J2EE - Application Architect / Developer >> >> > > > -- > Saeed Iqbal > http://www.iqbalconsulting.com > Struts - J2EE - Application Architect / Developer > > -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26554981.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: Any Struts + mysql example ?
with jdbc, thanks --- On Sat, 11/28/09, Saeed Iqbal wrote: From: Saeed Iqbal Subject: Re: Any Struts + mysql example ? To: "Struts Users Mailing List" Date: Saturday, November 28, 2009, 11:41 AM Struts with JDBC? or JPA/Hibernate On Sat, Nov 28, 2009 at 9:39 PM, A. Lotfi wrote: > Hi, > > I Please if you know about a nice example or a small proj using struts and > mysql I would appreciate. > > thanks > > > -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: Any Struts + mysql example ?
Struts with JDBC? or JPA/Hibernate On Sat, Nov 28, 2009 at 9:39 PM, A. Lotfi wrote: > Hi, > > I Please if you know about a nice example or a small proj using struts and > mysql I would appreciate. > > thanks > > > -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Any Struts + mysql example ?
Hi, I Please if you know about a nice example or a small proj using struts and mysql I would appreciate. thanks
Re: Alert Box issue in Struts
Hi Pawel, i need to implement a Javascript function for this in jsp.(not server side validation),how to mix javascript with jsp code please help with snippet of code... Deepak Paweł Wielgus wrote: > > Hi Deepak, > read about validation framework in struts2 and about action messages > which should solve your problem. > > Best greetings, > Pawel Wielgus. > > 2009/11/28, deepakl_2000 : >> >> Hi Struts Experts, >> >> I'm using Struts for Controller,i.e presentation tier. >> IBatis as a Persistence Framework . >> >> Action class --> Service class --> Ibatis .xml file --> Database(SQL >> Sever >> 2000) >> >> I have implemented a Save operation In Service class which inserts a >> record >> in database. >> When the record is successfully inserted into database. >> >> I want to show a Dialog box i.e an alert box saying >> "Records are Saved Successfully" else an alert box "Save Operation >> Unsuccessful",in case records are not saved. >> >> How do i implement this feature in Struts along with Ibatis Framework >> Integration >> Please help >> >> >> >> 1 Requirement > >> --- >> Save.jsp >> -- >> //do some logical operation and click on Save button >> Save //call to SaveAction.java depending on >> struts-config.xml (setting/declaration) >> >> >> >> SaveAction.java >> >> >> myService.insertData(XYZPOJO1,XYZPOJO2); //call insertData method in >> myService class >> mapping.findforward(); // i want to redirect to Save.jsp and display an >> alert button indicating records are saved or not??please help >> >> --- >> myService class >> --- >> >> insertData(...){ >> sqlMap.insert("saveData1",XYZPOJO1); >> sqlMap.insert("saveData2",XYZPOJO2); >> } >> >> >> >> after insert operation i want to return a value determining whether save >> is >> successful or not?? how to proceed. >> >> >> how should this part be implemented in jsp i.e displaying an alert box >> depending on some condition.please help me (in my case return value) >> ??? >> >> >> >> >> 2 Requirement > Once i get an alert Box and i click on "ok" button of >> that >> alert box,i want to be re-directed to another jsp page (example: >> MainMenu.jsp") >> >> i.e from SaveAction.java --> goto Save.jsp -> display an alert >> accordingly and click on ok button of alert box --> re-direct to >> MainMenu.jsp >> >> >> Deepak >> -- >> View this message in context: >> http://old.nabble.com/Alert-Box-issue-in-Struts-tp26545846p26545846.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 > > > :confused: -- View this message in context: http://old.nabble.com/Alert-Box-issue-in-Struts-tp26545846p26554622.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: Where to disable encrypting of non latin chars?
)) Yeah, congrats! I use this magic from the day 1. Anyway, thanx for attention. Miguel-55 wrote: > > I use lots of pages with accented latin characters, and in the source > you can see the native characters, not encoded as html entities. > The thing I use, in the <%@ page ...%> header, that should be the > first thing in a jsp, I define the charset as utf-8, and that does the > magic, at least for me. > > <%@ page language="java" contentType="text/html; charset=UTF-8" > pageEncoding="UTF-8"%> > > Si quieres ser más positivo, pierde un electrón > Miguel Ruiz Velasco Sobrino > > > > On Fri, Nov 27, 2009 at 20:14, Saeed Iqbal wrote: >> I mean if you want to display decoded HTML value, then feed in encoded >> values or the other option first >> >> On Sat, Nov 28, 2009 at 6:50 AM, Saeed Iqbal wrote: >> >>> These are encoded characters. Either output this but first you must imo >>> try >>> s:property with escape="false" >>> >>> >>> On Sat, Nov 28, 2009 at 5:57 AM, Alex Siman >>> wrote: >>> I don't know... Do I need these extra bytes in output? And are that entities good for SEO (Google, others)? Saeed Iqbal-2 wrote: > > I personally feel that is a good feature of Struts. > > On Fri, Nov 27, 2009 at 8:22 AM, Saeed Iqbal wrote: > >> escape="false" can help you or show those characters as encoded values >> >> >> On Fri, Nov 27, 2009 at 8:17 AM, Alex Siman >> wrote: >> >>> >>> I just have found another issue after upgrading from [2.1.6] -> [2.1.8]. >>> Struts now encode any non latin char to its HTML entity of property. >>> >>> E.g. now I have such a mess in HTML output (in browser it looks OK): >>> описание >>> >>> How to disable encoding of every char but leave only encoding of special >>> chars like?: >>> < > ' " >>> -- >>> View this message in context: >>> http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26535859.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 >>> >>> >> >> >> -- >> Saeed Iqbal >> http://www.iqbalconsulting.com >> Struts - J2EE - Application Architect / Developer >> >> > > > -- > Saeed Iqbal > http://www.iqbalconsulting.com > Struts - J2EE - Application Architect / Developer > > -- View this message in context: http://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26545411.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 >>> >>> >>> -- >>> Saeed Iqbal >>> http://www.iqbalconsulting.com >>> Struts - J2EE - Application Architect / Developer >>> >>> >> >> >> -- >> Saeed Iqbal >> http://www.iqbalconsulting.com >> Struts - J2EE - Application Architect / Developer >> > > - > 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://old.nabble.com/Where-to-disable-encrypting-of-non-latin-chars--tp26535859p26554455.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: Alert Box issue in Struts
Hi Deepak, read about validation framework in struts2 and about action messages which should solve your problem. Best greetings, Pawel Wielgus. 2009/11/28, deepakl_2000 : > > Hi Struts Experts, > > I'm using Struts for Controller,i.e presentation tier. > IBatis as a Persistence Framework . > > Action class --> Service class --> Ibatis .xml file --> Database(SQL Sever > 2000) > > I have implemented a Save operation In Service class which inserts a record > in database. > When the record is successfully inserted into database. > > I want to show a Dialog box i.e an alert box saying > "Records are Saved Successfully" else an alert box "Save Operation > Unsuccessful",in case records are not saved. > > How do i implement this feature in Struts along with Ibatis Framework > Integration > Please help > > > > 1 Requirement > > --- > Save.jsp > -- > //do some logical operation and click on Save button > Save //call to SaveAction.java depending on > struts-config.xml (setting/declaration) > > > > SaveAction.java > > > myService.insertData(XYZPOJO1,XYZPOJO2); //call insertData method in > myService class > mapping.findforward(); // i want to redirect to Save.jsp and display an > alert button indicating records are saved or not??please help > > --- > myService class > --- > > insertData(...){ > sqlMap.insert("saveData1",XYZPOJO1); > sqlMap.insert("saveData2",XYZPOJO2); > } > > > > after insert operation i want to return a value determining whether save is > successful or not?? how to proceed. > > > how should this part be implemented in jsp i.e displaying an alert box > depending on some condition.please help me (in my case return value) ??? > > > > > 2 Requirement > Once i get an alert Box and i click on "ok" button of that > alert box,i want to be re-directed to another jsp page (example: > MainMenu.jsp") > > i.e from SaveAction.java --> goto Save.jsp -> display an alert > accordingly and click on ok button of alert box --> re-direct to > MainMenu.jsp > > > Deepak > -- > View this message in context: > http://old.nabble.com/Alert-Box-issue-in-Struts-tp26545846p26545846.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: S2 Strange behaviour of validation
Hi Titus, This behaviour is the "standard" behaviour of struts 2. Your second message comes from the conversion error : http://struts.apache.org/2.1.8.1/docs/conversion-error-interceptor.html I suppose that your field is of type int (or any number like class). Struts will in the first try to convert the parameter value to stick it in your variable. Obviously, that won't work ("abc" isn't much of an int). Because if that, struts will output a stack trace in the console as warning (it is just for information, not an actual error). And will add the conversion error to the list of action errors (see interceptor above). Only after that does your validation kicks in, and of course, at that point your value is empty, thus trigerring the required validation. So, the bottom line is an int validator on a numeric field, when the type of this attribute is int is useless as it will never be reached. Either change your field to be a String, in which case all validation and conversion is up to you, or you will have to dig in Struts 2 to handle the conversion error a little more graciously. Good luck! Denis. Marsman a écrit : Hi! I'm using the Struts 2 validation for my form fields. For a required numeric input field, I've set the "required" and the "int" validator and a custom message for each of them. But when the user enters none numeric characters, the custom localized required-messages and a default "Invalid field value" message are displayed in the error box. Also a NoSuchMethodException occurs because Struts tries to store the alphanumeric field value in an action class property of type string. Why is a the field marked as required, when the user has entered a wrong, but has entered a value? Why is a default message instead of my custom message shown? And why is there is Struts trying to store the value in a bean property, if the value is identified as invalid? Here is my validation: I'm using Struts 2.1.8.1. The valiidateion XML is assigned to the action class. The action class implements ModelDriven but myNumber is outside the model class in the of type Integer. Thanks for any hints or comments. Titus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
S2 Strange behaviour of validation
Hi! I'm using the Struts 2 validation for my form fields. For a required numeric input field, I've set the "required" and the "int" validator and a custom message for each of them. But when the user enters none numeric characters, the custom localized required-messages and a default "Invalid field value" message are displayed in the error box. Also a NoSuchMethodException occurs because Struts tries to store the alphanumeric field value in an action class property of type string. Why is a the field marked as required, when the user has entered a wrong, but has entered a value? Why is a default message instead of my custom message shown? And why is there is Struts trying to store the value in a bean property, if the value is identified as invalid? Here is my validation: I'm using Struts 2.1.8.1. The valiidateion XML is assigned to the action class. The action class implements ModelDriven but myNumber is outside the model class in the of type Integer. Thanks for any hints or comments. Titus -- View this message in context: http://old.nabble.com/S2-Strange-behaviour-of-validation-tp26551371p26551371.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
REST multiple return type problems
Hi guys i'm using REST plugin in Struts 2.1.8.1 I'm using ModelDriven and also using a result (resultType stream) to output some special cases like simple "true or false" coded manually in json. It's working properly but if I define I *cannot use my own results*, it's always returning modeldriven object in json!! Another issue, how can we know in a method what is the contentType (json,xhtml,xml,...) defined in the request? We need it to manually code "true or false" results. -- David Canós www.david-canos.net
Alert Box issue in Struts
Hi Struts Experts, I'm using Struts for Controller,i.e presentation tier. IBatis as a Persistence Framework . Action class --> Service class --> Ibatis .xml file --> Database(SQL Sever 2000) I have implemented a Save operation In Service class which inserts a record in database. When the record is successfully inserted into database. I want to show a Dialog box i.e an alert box saying "Records are Saved Successfully" else an alert box "Save Operation Unsuccessful",in case records are not saved. How do i implement this feature in Struts along with Ibatis Framework Integration Please help 1 Requirement > --- Save.jsp -- //do some logical operation and click on Save button Save //call to SaveAction.java depending on struts-config.xml (setting/declaration) SaveAction.java myService.insertData(XYZPOJO1,XYZPOJO2); //call insertData method in myService class mapping.findforward(); // i want to redirect to Save.jsp and display an alert button indicating records are saved or not??please help --- myService class --- insertData(...){ sqlMap.insert("saveData1",XYZPOJO1); sqlMap.insert("saveData2",XYZPOJO2); } after insert operation i want to return a value determining whether save is successful or not?? how to proceed. how should this part be implemented in jsp i.e displaying an alert box depending on some condition.please help me (in my case return value) ??? 2 Requirement > Once i get an alert Box and i click on "ok" button of that alert box,i want to be re-directed to another jsp page (example: MainMenu.jsp") i.e from SaveAction.java --> goto Save.jsp -> display an alert accordingly and click on ok button of alert box --> re-direct to MainMenu.jsp Deepak -- View this message in context: http://old.nabble.com/Alert-Box-issue-in-Struts-tp26545846p26545846.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: textfield label localized
No Problem :) On Saturday, November 28, 2009, wrote: > Hi, > > Thanks for the answer, both are working now. > > > Regards > LV > > > > > From: KamHon Eng > To: Struts Users Mailing List > Sent: Sat, November 28, 2009 9:41:32 AM > Subject: Re: textfield label localized > > maxlength="35" theme="xhtml"/> > or > > > shoud working > > On Sat, Nov 28, 2009 at 4:53 AM, wrote: >> Hi, >> >> Can someone tell me how to make the label use my resource bundle value? I've >> tried this >> > theme="xhtml"/> >> and >> > theme="xhtml"/> >> both are not working. >> >> But this work: >> >> >> in my resource bundle properties file >> I've this >> label.name = Name >> >> THanks >> >> L.V >> > > > > -- > Best Regard, > > Kam Hon > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: textfield label localized
Hi, Thanks for the answer, both are working now. Regards LV From: KamHon Eng To: Struts Users Mailing List Sent: Sat, November 28, 2009 9:41:32 AM Subject: Re: textfield label localized or shoud working On Sat, Nov 28, 2009 at 4:53 AM, wrote: > Hi, > > Can someone tell me how to make the label use my resource bundle value? I've > tried this > theme="xhtml"/> > and > theme="xhtml"/> > both are not working. > > But this work: > > > in my resource bundle properties file > I've this > label.name = Name > > THanks > > L.V > -- Best Regard, Kam Hon - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: textfield label localized
Hi, Thanks, its work now by using key. Regards LV From: Saeed Iqbal To: Struts Users Mailing List Sent: Sat, November 28, 2009 1:54:48 AM Subject: Re: textfield label localized There are 2 ways to go about this 1) within Struts tags use key="" where your i8nl key should go in. But for that to work your struts needs to know where all the i8nl values are located. Define a constant for it in struts.xml or create a struts.properties to contain this struts.custom.i18n.resources=package where my i8nl file is called package.properties located in the same folder where struts.xml is present 2) use fmt tag JSTL tag for i8nl Make sure the jstl jar(s) are on your dependency list. On Sat, Nov 28, 2009 at 1:53 AM, wrote: > Hi, > > Can someone tell me how to make the label use my resource bundle value? > I've tried this > theme="xhtml"/> > and > maxlength="35" theme="xhtml"/> > both are not working. > > But this work: > > > in my resource bundle properties file > I've this > label.name = Name > > THanks > > L.V > -- Saeed Iqbal http://www.iqbalconsulting.com Struts - J2EE - Application Architect / Developer
Re: textfield label localized
or shoud working On Sat, Nov 28, 2009 at 4:53 AM, wrote: > Hi, > > Can someone tell me how to make the label use my resource bundle value? I've > tried this > theme="xhtml"/> > and > theme="xhtml"/> > both are not working. > > But this work: > > > in my resource bundle properties file > I've this > label.name = Name > > THanks > > L.V > -- Best Regard, Kam Hon - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org