cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Website generation [If="Value=A"] not working properly

alros
Super Contributor

Hello,

 

According to the Website generation documentation, the following code should Check, whether a certain property is set to a specific value:

[Component="Application"]

    [Buffer="IsA"]

        [Buffer="IsA" Set]0[/Buffer]

        [ComponentProperty="MyProperty" Layout="Internal"]

            [If="Value=AVALUE"]

                [Buffer="IsA" Set]1[/Buffer]

            [/If]

        [/ComponentProperty]

        [Buffer="IsA" Get/] \c <--- This always prints "0" even if the object has MyProperty set with internal value of "AVALUE".

    [/Buffer]

[/Component]

 

But as described in the comment, it doesn't work properly. On the other hand [If="Value=""AVALUE"""]... Always prints a "1" even if the object has a different value of MyProperty.

 

How can we properly use the [If ...] tag to query for an exact string match (In java we would write if ("AVALUE".equals(strProp)))?

1 Reply

gquiniou
Retired

Hi,

 

You need to use "internalvalue" in place of "value" in your test expression:

 

[If="internalvalue=S"]

 

 

Best regards,

 

Gregory