Friday, April 27, 2012

Splitting a string in xpage


Actually I had an issue with splitting the string. But that string can have null character.
That time I was in server side javascript on Xpage.
I had used @Explode(",,test,test123").length, it should return 4 as of my concern.
But the above had returned 2. Again I had used split(",,test,test123"), I thought it would work perfect.
Again I got cheated by Xpage :).
So I used the split(",,test,test123") in CSJS. I got my thing correct.

Obviously what we have known that the functional behavior is changing, while running the split in Domino server.

Try to use basic javascript in our xpages at CSJS script. Do not use it in SSJS script.

No comments:

Post a Comment