Hi Ken,
I want to use <! if> to control several property, such as
<sun:property id="hostp" label="Host:" >
<sun:staticText id="host" text="localHost"/>
</sun:property>
However, it seems that no matter what i set to the testing variable, the
whole property line will NEVER show up. Looks like i can only control
the component within a <sun:property>
Is this by design, or is this a bug ? If its true that we cannot
control the whole property, its usage is very limited, since most
likely we want to show the label only when the component itself should
be shown.
I have attached a .jsf file that i use to test, and also the outcome.
If i am not using <! if> correctly, please let me know.
thanks
Anissa.
<sun:page id="page1">
<!beforeCreate setAttribute(key="showIt" value="#{true}");/>
<sun:form id="form1">
<sun:propertySheet id="propertySheet" >
<sun:propertySheetSection id="section1" >
<!-- the following NEVER shows up no matter what showIt is -->
<!if ${showIt}>
<sun:property id="hostp" label="Host:" >
<sun:staticText id="host" text="localHost"/>
</sun:property>
</if >
<!-- seems can only control the component inside a property -->
<sun:property id="userp" label="User:" >
<!if ${showIt}>
<sun:staticText id="user" text="myUser"/>
</if >
</sun:property>
<sun:property id="testUserp2" label="User2:" >
<!if !${showIt}>
<sun:staticText id="testUser2" text="myUser2"/>
</if >
</sun:property>
</sun:propertySheetSection>
</sun:propertySheet>
</sun:form>
</sun:page>
(image/png attachment: result)