In 4.0.2 the initialization code was being placed in open on the page. But
in 4.1.5 the initialization code is placed into a function and hence the
variable looses its reference. Hope that helps.
Srini.

On Wed, Apr 23, 2008 at 6:13 PM, Rohan Kalyan <[EMAIL PROTECTED]>
wrote:

> Hi all,
> We moved from tapestry 4.0.2 to 4.1.5
> we were using a script file and in had used the
> <initialization></initialization> tag to initialize the values used in
> script functions.
> The variables defined in this tag were working as global variable and we
> used to get the value of these variables in any script function.
> After shifting to 4.1.5 the initialization is treated as a different
> function and so the variables defined there are local to it, these
> variables
> loose there values as we try to access them in different script functions.
>
> the code is as follows
> <initialization>
> var thArray = new Array();
> <foreach key="th" expression="ths">
>        thArray[t++] = new Th("${th.thId}", ${th.position});
> </foreach>
> swapThArray();
> </initialization>
>
> function swapThArray() {
>    var tswap = thArray.length;
>    for (var k = t; k < t + (thArray.length - t - 1)/2; k++) {
>        var tempth = thArray[--tswap];
>        thArray[tswap] = thArray[k];
>        thArray[k] = tempth;
>    }
> }
> getting a javascript error in swapThArray that thArray has no properties
>
>
> thanks in advance,
>
> regards,
> --
> Rohan Kalyan
> Indygo - www.indygo.in
>



-- 
http://www.indygosoft.com

Reply via email to