AW: Re: i18n & ActionErrors
"Bernhard Woehrlin" <[email protected]>
| Newsgroups | gmane.comp.java.strutscx.user |
|---|---|
| Organization | IT.CappuccinoNet.com |
| Message-ID | <000d01c34c76$60781440$4c01a8c0@javaws> |
Hi Nitin, actually you're right. To test if there is a "/root/errors/title" node it is sufficient to test it like this <xsl:if test="/root/errors/title"> Greetings, Berny -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Nitin Gaur Gesendet: Donnerstag, 17. Juli 2003 16:39 An: [email protected] Betreff: Re: [Strutscx-user] Re: i18n & ActionErrors Thanks David and Berny! finally got things working! Actually I almost completed my application using stxx, but with weblogic, at last moment, it produced some problem. so I was in hurry to use strutscx. Acc to docs, to show error message if error tag is present , the XPath node test looks like <xsl:if test="/root/errors/title = node()">but its not working in my case Instead <xsl:if test="/root/errors/title">is working fineany comments?Thanks again-Nitin----- Original Message ----- From: "David Stabel" <[email protected]> To: <[email protected]> Sent: Thursday, July 17, 2003 1:36 PM Subject: [Strutscx-user] Re: i18n & ActionErrors > Hi Ninit, > > Concerning your question about i18n. > I also found out that the variables are not automatically set by the > StrutsCX framework (talking about V0.9.2, I did not yet checked out > V0.9.3). To solve this problem I added the following code in my > ActionBase class (see I18N CODE SAMPLE): > > ----------- I18N CODE SAMPLE START ---------------- > // set the prefered user locale > if (request.getLocale() != null) { > session.setAttribute(StrutsCXConstants.LOCALE, > request.getLocale().getLanguage() ); > session.setAttribute(StrutsCXConstants.COUNTRY, > request.getLocale().getDisplayCountry() ); > } else { > // no locale found in request, use server default instead > } > ----------- I18N CODE SAMPLE END ---------------- > > Using this code, the Locale is determined by the browser's settings. > Basic idea is that you must set the Locale manually for the > StrutsCXServlet in order to let the StrutsCXServlet pick up the desired > variables. > > Concerning your question about the ActionError. > See the following explanation on the StrutsCX site (Errorhandling with > StrutsCX): > http://it.cappuccinonet.com/strutscx/doc/v08/en/intro/ar01s04.html > You must also not forget to add the error container to the > StrutsCXServlet => request.setAttribute(StrutsCXConstants.XML_ERROR, > errors); > That should answer your question. > Hope this help :) > > Kind regards, David Stabel. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: VM Ware > With VMware you can run multiple operating systems on a single machine. > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 > _______________________________________________ > Strutscx-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/strutscx-user > ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ Strutscx-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strutscx-user ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0