You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa" <da...@xs4all.nl> on 2004/01/05 10:53:14 UTC
Re: [script] How to use the (SOLVED)
Harish Krishnaswamy wrote:
> Hi Fermin,
>
> Sorry, I was wrong about the <input-symbol> before, the type is
> maintained irrespective of whether the "class" attribute is specified or
> not. But I just noticed a problem, and that is you are enclosing the
> <foreach> inside the CDATA block. Anything inside the CDATA block is
> rendered unaltered. If you take a look at the source of the rendered web
> page you will see the <foreach>. Hope this helps.
M a n, it most certainly does. Its actually quite logical because its meant
for literal interpretation of the code ...
Not feeling too clever right now! ;)
Thx
Fermin
>
> -Harish
>
> F. Da Costa wrote:
>
>> Hi,
>>
>> Still trying to get a handle on the .script 'stuff'
>> Following two snips.
>> The .page snip works fine. Debugger shows that the gets are made.
>>
>> <component id="scr0" type="Script">
>> <static-binding name="script" value="test0.script" />
>> <binding name="test" expression="test" /> *is retrieved*
>> <binding name="tstRows" expression="rows" /> *is retrieved*
>> </component>
>>
>> The .script however only works for the single function.
>> The multi() function does not work, as in the ${row} does not show a
>> value (whilst the ArrayList is definitely filled).
>> Q: What am i missing here?
>>
>> <script>
>> <input-symbol key="test" />
>> <input-symbol key="tstRows" /> *no go with or without this line*
>> <set key="tst" expression="test" />
>> <body>
>> <![CDATA[
>> // this works fine
>> function single() {
>> alert("${tst}");
>> }
>>
>> // This does *not* show the ${row}
>> function multi() {
>> var s = "The String ";
>> <foreach key="row" source="tstRows">
>> s = s + ${row}+"~";
>> </foreach>
>> alert(s);
>> }
>>
>> ]]>
>> </body>
>>
>> TIA
>> Fermin DCG
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org