You need to sign in to do that
Don't have an account?
Chamiz
Problem with using greater than sign in conditions
There is a problem in using ">" sign in the if conditions.
Here the sample code.
I have created a empty component
<!------- myComponent ------------>
<apex:component>
<apex:componentBody />
</apex:component>
and code of the visualforce page
<apex:page renderAs="html" showheader="false">
<c:myComponent>
<apex:outputText rendered="{!(3>2)}" />
</apex:page>
Following error occurs when I'm trying to save the page.
Error: The element type "apex:componentReference" must be terminated by the matching end-tag "</apex:componentReference>"
But when I close the "apex:outputText" tag as </apex:outputText>
Instead of self closing page does not show any error.
<apex:page renderAs="html" showheader="false">
<c:myComponent>
<apex:outputText rendered="{!(3>2)}"></apex:outputText>
</c:myComponent>
</apex:page>
Can you explain this behavior ?
Try this
<apex:page > <apex:outputText value="Hello world!" rendered="{!(3>2)}" escape="false" ></apex:outputText> </apex:page>
Or...
<apex:outputText rendered="{!(2<3)}"></apex:outputText>
Chamiz
Your first VF page with the error is missing this tag </c:myComponent>
In your second VF page you have have that tag and the page works.
You can have the pair <c:myComponent> XXXXXXXX </c:myComponent>
OR self closing <c:myComponent/>
But you cannot have just <c:myComponent> on its own.
Colin,
Sorry <c:myComponent> closing tag is there in my first page. Thats not the reason.