You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Madhavan Thirumalai <ma...@letsgaggle.com> on 2005/09/06 00:55:59 UTC

evaluation

Here is my script: Note that the --- line below is just for debugging and
I'll remove it soon.

function enable_recurrence_rwp(on) {
---- ${display_rwp} -----------
<if expression="'${display_rwp}' == 'true'">
<![CDATA[

    ${formname}.${rwp_monday.name}.disabled = !on;
    ${formname}.${rwp_tuesday.name}.disabled = !on;
    ${formname}.${rwp_wednesday.name}.disabled = !on;
    ${formname}.${rwp_thursday.name}.disabled = !on;
    ${formname}.${rwp_friday.name}.disabled = !on;
    ${formname}.${rwp_saturday.name}.disabled = !on;
    ${formname}.${rwp_sunday.name}.disabled = !on;
]]>
</if>
}

I invoke the script with display_rwp set to the string 'true'. Here's what
gets rendered

function enable_recurrence_rwp(on) {
---- true -----------

}

Any idea why the stuff inside the CDATA block is not being rendered? I don't
seem to understand how the boolean expression in the expression attribute of
the <if> tag works.

Madhavan


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: evaluation

Posted by Nugroho DS <nd...@nwa.iao.co.id>.
I think you should use <if expression="display_rwp == 'true'">


Nugroho

Madhavan Thirumalai wrote:
> Here is my script: Note that the --- line below is just for debugging and
> I'll remove it soon.
> 
> function enable_recurrence_rwp(on) {
> ---- ${display_rwp} -----------
> <if expression="'${display_rwp}' == 'true'">
> <![CDATA[
> 
>     ${formname}.${rwp_monday.name}.disabled = !on;
>     ${formname}.${rwp_tuesday.name}.disabled = !on;
>     ${formname}.${rwp_wednesday.name}.disabled = !on;
>     ${formname}.${rwp_thursday.name}.disabled = !on;
>     ${formname}.${rwp_friday.name}.disabled = !on;
>     ${formname}.${rwp_saturday.name}.disabled = !on;
>     ${formname}.${rwp_sunday.name}.disabled = !on;
> ]]>
> </if>
> }
> 
> I invoke the script with display_rwp set to the string 'true'. Here's what
> gets rendered
> 
> function enable_recurrence_rwp(on) {
> ---- true -----------
> 
> }
> 
> Any idea why the stuff inside the CDATA block is not being rendered? I don't
> seem to understand how the boolean expression in the expression attribute of
> the <if> tag works.
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: evaluation

Posted by Adam Greene <ag...@iq-2000.com>.
Basic String comparison.  In java 'true' != 'true' as they are two different 
strings.  you want to leave the quotes off because it's string replacement 
and true == true.

----- Original Message ----- 
From: "Madhavan Thirumalai" <ma...@letsgaggle.com>
To: <ta...@jakarta.apache.org>
Sent: Monday, September 05, 2005 7:55 PM
Subject: <if expression> evaluation


>
> Here is my script: Note that the --- line below is just for debugging and
> I'll remove it soon.
>
> function enable_recurrence_rwp(on) {
> ---- ${display_rwp} -----------
> <if expression="'${display_rwp}' == 'true'">
> <![CDATA[
>
>    ${formname}.${rwp_monday.name}.disabled = !on;
>    ${formname}.${rwp_tuesday.name}.disabled = !on;
>    ${formname}.${rwp_wednesday.name}.disabled = !on;
>    ${formname}.${rwp_thursday.name}.disabled = !on;
>    ${formname}.${rwp_friday.name}.disabled = !on;
>    ${formname}.${rwp_saturday.name}.disabled = !on;
>    ${formname}.${rwp_sunday.name}.disabled = !on;
> ]]>
> </if>
> }
>
> I invoke the script with display_rwp set to the string 'true'. Here's what
> gets rendered
>
> function enable_recurrence_rwp(on) {
> ---- true -----------
>
> }
>
> Any idea why the stuff inside the CDATA block is not being rendered? I 
> don't
> seem to understand how the boolean expression in the expression attribute 
> of
> the <if> tag works.
>
> Madhavan
>
>
> ---------------------------------------------------------------------
> 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