cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Gianni <>
Subject Re: repalce function in Flowscript ?
Date Mon, 08 May 2006 13:35:03 GMT
Hi Luca,

Luca Morandini wrote:

> Hmmm... "replace" is a JavaScript function, not a Java one, hence I
> cannot understand how the string differences apply :(
> Anyway, I tried:
> var jfilters= new;
> var re= new"/a/g");
> var s= new"b");
> jfilters.replace(re, b);

Nope, in this case you are not calling the javascript replace function,
which accept the /a/g syntax, but the java.lang.String.replace(char,
char) method, which only accept two chars.

How is the filter variable declared?

You could try one of the following :

var jsfilters = new String(filter);
var jsfilters = filters + '';

and then :


Hope this helps,


Simone Gianni

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message