The problem is, that I have a billion dates on this page. I also don't care (in this case) about logic in my Templates.
> If you just want something, that works, Does this mean, the "locale" attribute of formatDate doesn't work yet or isn't implemented (in the 2.1.7 distribution)? Thanks Jonny > --- Ursprüngliche Nachricht --- > Von: Jan Hinzmann <[EMAIL PROTECTED]> > An: [email protected] > Betreff: Re: JXTemplate - Incrementing value of variable in a loop > Datum: Tue, 12 Jul 2005 16:39:16 +0200 > > On Tuesday 12 July 2005 16:05, Johannes Becker wrote: > > Thanks! > > > > The xpath function sum() worked for me. > > > > And since I have you guys and girls attention. I posted this two times > but > > never got an answer: > > > > I'm still having trouble formatting dates. > > > > My date problem: > > Something like > > <jx:formatDate value="#{date}" pattern="dd MMMM yyyy" locale="en_US"/> > > will output for example: 12 März 2003 > > Since I set the locale to an american-style output that either means my > > locale is set in a wrong way or the locale-attribute isn't implemented > yet. > > Can anybody tell me how to set the locale correctly? > > > If you just want something, that works, and if you are using flowscript, > you > can do somthing like: > > - have a Util.java class which gives you the correct formatted DateString > - pass this String from the flowscript to the JXTemplate > > Using this prevents you from having logic in your Templates. > > Thanks > > Jonny > > > > > > > > > > > --- Ursprüngliche Nachricht --- > > > Von: "Chris Marasti-Georg" <[EMAIL PROTECTED]> > > > An: <[email protected]> > > > Betreff: RE: JXTemplate - Incrementing value of variable in a loop > > > Datum: Tue, 12 Jul 2005 09:47:02 -0400 > > > > > > There is an xpath function sum(), try using #{sum(item/quantity)} (not > > > sure of exact syntax) > > > ex. <jx:set var="total" value="#{sum(item/quantity)}"/> > > > > > > Chris Marasti-Georg > > > > > > > > > > -----Original Message----- > > > > From: Upayavira [mailto:[EMAIL PROTECTED] > > > > Sent: Tuesday, July 12, 2005 9:05 AM > > > > To: [email protected] > > > > Subject: Re: JXTemplate - Incrementing value of variable in a loop > > > > > > > > Johannes Becker wrote: > > > > > Hi, > > > > > > > > > > I want to increment the value of a variable in a > > > > <jx:forEach>-loop. In > > > > > my case, I want to increment the variable "total" with the > > > > > "quantity"-element (from item). > > > > > > > > > > <jx:set var="total" value="0"/> > > > > > <jx:forEach select="#{item}"> > > > > > ??? #{total} += #{quantity} ??? > > > > > </jx:forEach> > > > > > > > > > > Is there a way to do this? Or a workaround? > > > > > > > > See > http://cocoon.apache.org/2.1/userdocs/flow/jxtemplate.html#forEach > > > > (esp begin, step, end attributes). > > > > > > > > Never used them, I assume they work. > > > > > > > > Upayavira > > > > > > > > > --------------------------------------------------------------------- > > > > 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] > > > > > > > -- > > Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie! > > Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > Gruß, Jan > -- Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie! Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
