cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christoph Gaffga (triplemind.com)" <cgaf...@triplemind.com>
Subject Re: [Jexl] linebreaks in jexl expressions
Date Fri, 06 Jul 2007 20:17:47 GMT
I tried using the apache-cocoon JX generator (it uses jexl for it's
> expressions within the template) to convert linebreak from strings to
> <br> elements.
>
> I ran into some problem with searches for linebreaks, like:
>
> <p>${value.indexOf('\n')}</p>
>
> or
>
> <p>${value.indexOf('&#10')}</p>

just for the record, I solved it using a variable:

  <jx:set var="nl" value="&#10;"/>
  ${foo.bar.indexOf(nl)}

Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message