Re: Struts 2 Annotation Validation Problem
Just see the below link for usage of Annotations in validation, Hope might be useful http://intricatetips.blogspot.com -- View this message in context: http://www.nabble.com/Struts-2-Annotation-Validation-Problem-tp16990235p19592822.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problems with Indexed Properties, Hidden Values and Logic Iterate Tag
Hi to all. I'm using Struts 1.3, Tomcat 6.0 and Eclipse. I have a problem with Indexed Properties. I have a jsp that should save hidden values and pass it to the linked Action. I show you my code. JSP PAGE logic:notEmpty name=creazioneProfiloUtenteForm property=listaSport html:select property=sport styleId=sport o_n_c_h_a_n_g_e=javascript:submitForm('creazioneProfiloUtenteForm','caricamentoRuoliAttributiSport.do') html:optionsCollection property=listaSport / /html:select logic:iterate id=hSportBean name=creazioneProfiloUtenteForm property=listaSport html:hidden name=hSportBean property=label indexed=true / html:hidden name=hSportBean property=value indexed=true / /logic:iterate /logic:notEmpty where - 'listaSport' is a list containing a list of sports. This list is correctly populated by the previous Action through 'select' and 'optionsCollection' tags. - 'hSportBean' is a LabelValueBean list where I have to save the select options. *** ACTION FORM *** public class CreazioneProfiloUtenteForm extends ActionForm { private String sport; private ArrayList listaSport; private ArrayList listaRuoli; private Object[] ruoliSelezionati; public ActionErrors validate(ActionMapping mapping,HttpServletRequest request) { return null; } public void reset(ActionMapping mapping, HttpServletRequest request) { } public LabelValueBean getHSportBean(int index) { if(this.listaSport == null) { this.listaSport = new ArrayList(); } while(index = this.listaSport.size()) { this.listaSport.add(new LabelValueBean()); } return (LabelValueBean) listaSport.get(index); } public String getSport() { return sport; } public void setSport(String sport) { this.sport = sport; } public ArrayList getListaSport() { return listaSport; } public void setListaSport(ArrayList listaSport) { this.listaSport = listaSport; } public ArrayList getListaRuoli() { return listaRuoli; } public void setListaRuoli(ArrayList listaRuoli) { this.listaRuoli = listaRuoli; } public Object[] getRuoliSelezionati() { return ruoliSelezionati; } public void setRuoliSelezionati(Object[] ruoliSelezionati) { this.ruoliSelezionati = ruoliSelezionati; } } ** ACTION ** public class CaricamentoRuoliAttributiSportAction extends Action { public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) { CreazioneProfiloUtenteForm creazioneProfiloUtenteForm = (CreazioneProfiloUtenteForm) form;// TODO Auto-generated method stub sportSelezionato = creazioneProfiloUtenteForm.getSport(); //HERE I HAVE TO LOAD HIDDEN VALUES SAVED IN JSP PAGE ... ... } } The problem is that I can't load in Action the hidden values saved in the jsp page. I tried to print the values received System.out.println((creazioneProfiloUtenteForm.getHSportBean(0)).getLabel()) System.out.println((creazioneProfiloUtenteForm.getHSportBean(0)).getValue()); but I always obtain null values (for all indexes). So, I don't know how to solve my problem. I also followed guidelines in: http://faq.javaranch.com/java/IndexedProperties http://faq.javaranch.com/java/IndexedProperties http://struts.apache.org/1.x/struts-taglib/indexedprops.html http://struts.apache.org/1.x/struts-taglib/indexedprops.html http://mail-archives.apache.org/mod_mbox/struts-user/200604.mbox/[EMAIL PROTECTED] http://mail-archives.apache.org/mod_mbox/struts-user/200604.mbox/[EMAIL PROTECTED] Can you help me? Thanks a lot in advance. -- View this message in context: http://www.nabble.com/Problems-with-Indexed-Properties%2C-Hidden-Values-and-Logic-Iterate-Tag-tp19593011p19593011.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
context value
Hello, sorry for my bad english. Does someone knows why a context value could be lost between two struts actions? For an example, In SecondAction: req.getSession(true).getServletContext().getAttribute(key)) returns value, In ThirdAction: req.getSession(true).getServletContext().getAttribute(key)) returns null with the following struts actions: action path=/secondAction name=secondAction type=appli.struts.actions.SecondAction forward name=valid path=/thirdAction.do/ forward name=invalid path=/error.jsp / /action action path=/thirdAction name=thirdAction type=appli.struts.actions.ThirdAction forward name=valid path=/result2.jsp / forward name=invalid path=/error.jsp / /action I haven't this problem when I do this at home, with a simple configuration. But is there something that could explain that I have this problem at work in your advice? Configuration parameters, the scope of the context, etc... ? Thank you in advance. -- View this message in context: http://www.nabble.com/context-value-tp19593451p19593451.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with deployment using Eclipse
Hi, i'm using eclipse 3.4 with jboss-tools to develop my application. Unfortunately sometimes the deployment doesnt work. The xml configuration isnt copied. Does anybody have an idea if there is a way to fix that? Greetings, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: context value
access it with straight web.xml context-param context-param param-namequalifying_requirements/param-name param-valuepoor_english/param-value /context-param //you can then access it via getServletContext().getInitParameter(qualifying_requirements);Is there something specific you needed? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Sun, 21 Sep 2008 04:07:53 -0700 From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: context value Hello, sorry for my bad english. Does someone knows why a context value could be lost between two struts actions? For an example, In SecondAction: req.getSession(true).getServletContext().getAttribute(key)) returns value, In ThirdAction: req.getSession(true).getServletContext().getAttribute(key)) returns null with the following struts actions: action path=/secondAction name=secondAction type=appli.struts.actions.SecondAction forward name=valid path=/thirdAction.do/ forward name=invalid path=/error.jsp / /action action path=/thirdAction name=thirdAction type=appli.struts.actions.ThirdAction forward name=valid path=/result2.jsp / forward name=invalid path=/error.jsp / /action I haven't this problem when I do this at home, with a simple configuration. But is there something that could explain that I have this problem at work in your advice? Configuration parameters, the scope of the context, etc... ? Thank you in advance. -- View this message in context: http://www.nabble.com/context-value-tp19593451p19593451.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Stay up to date on your PC, the Web, and your mobile phone with Windows Live. http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
Re: Problem with deployment using Eclipse
Fixed. I don't know why it worked sometimes but after i changed the builder-configuration for my project. it works allways now. it seems the eclipse builder doesn't copy files with some special endings into the build folder. one of these is .xml another necessary project specific setting. Greetings, Alex Alexander Baetz schrieb: Hi, i'm using eclipse 3.4 with jboss-tools to develop my application. Unfortunately sometimes the deployment doesnt work. The xml configuration isnt copied. Does anybody have an idea if there is a way to fix that? Greetings, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 + tiles + displaytag export = firefox hang or exception
Hi all, This thread is almost one year old but I'm facing the exact same issue ! http://www.mail-archive.com/user@struts.apache.org/msg68104.html Does anyone know how to solve it ? Thanks Yannick On Wed, Oct 17, 2007 at 11:08 AM, Giovanni Azua [EMAIL PROTECTED] wrote: hi All, Anyone has ran into the situation above? solutions? I have the snippet below in my web.xml. I get no exceptions but firefox hangs. If I flip the order i.e. struts 2 filter first and then displaytag filter then I get an exception from displaytag complaining about the lack of the filter ... SEVERE: Servlet.service() for servlet jsp threw exception Exception: [.TableTag] Unable to reset response before returning exported data. You are not using an export filter. Be sure that no other jsp tags are used before display:table or refer to the displaytag documentation on how to configure the export filter (requires j2ee 1.3). at org.displaytag.tags.TableTag.writeExport(TableTag.java:1438) at org.displaytag.tags.TableTag.doExport(TableTag.java:1364) at org.displaytag.tags.TableTag.doEndTag(TableTag.java:1215) My setup: displaytag 1.1.1 struts 2.0.9 TIA, regards, Giovanni filter filter-nameResponseOverrideFilter/filter-name filter-classorg.displaytag.filter.ResponseOverrideFilter/filter-class /filter filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-nameResponseOverrideFilter/filter-name url-pattern*.action/url-pattern /filter-mapping filter-mapping filter-nameResponseOverrideFilter/filter-name url-pattern*.jsp/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Query
You're going to need to provide a lot more detail if you want a useful answer of any kind. On Sun, Sep 21, 2008 at 1:27 AM, greatshalu.6 [EMAIL PROTECTED]wrote: how we use grids in struts -- View this message in context: http://www.nabble.com/Query-tp19591765p19591765.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com
Re: session based pojo as form variables
On Sat, Sep 20, 2008 at 4:46 PM, 928572663 [EMAIL PROTECTED] wrote: The Tag Reference doc: http://struts.apache.org/2.0.11.1/docs/submit.html doesn't have much detail about what to expect: Set method attribute. Is my pageForward() method supposed to conform to a certain signature? Yup. It should accept no arguments, and return a String. Er, and be public: public String pageForward() { //... } -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com
Internationalization using Database
Hi I would like to know, whether is it possible to replace package.properties file data into a database or can we read resource messages from database instead of properties file in struts2??? If yes, How??? Thanks Regards Roopam Verma
Datetime picker known issues
Can anyone comment on http://struts2-java.blogspot.com/2008/09/struts2-datetimepicker-setting-todays.html _ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx