I am trying to view a section based on a condition ... but it seems that the Rendered statement always return false, I'm not sure where I went wrong! but could someone help me?
here is my code
<!--the buttons block -->
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<!--end of buttons block -->
<apex:actionRegion >
<!--Section 1 -->
<apex:pageBlockSection title="Basic Information" columns="2">
<apex:inputField value="{!Client_Session_Record__c.name}"/>
<!-- the condition -->
<apex:pageBlockSectionItem >
<apex:outputLabel value="Session Type"/>
<apex:outputPanel >
<apex:inputField value=" {!Client_Session_Record__c.Session_Type__c}">
<apex:actionSupport event="onchange"
reRender="thePageBlock"
status="status"/>
</apex:inputField>
<apex:actionStatus startText="checking..."
id="status"/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
<!-- end of condition -->
</apex:pageBlockSection>
<!--Section 1 -->
</apex:actionRegion>
<!--Section 2 -->
<apex:outputPanel >
<apex:pageBlockSection title="Initial Assessment" id="Section2"
columns="2" collapsible="false"
Rendered="{if(!Client_Session_Record__c.Session_Type__c == 'Initial Assessment',true,false)}" >
</apex:pageBlockSection>
</apex:outputPanel > <!--Section 2 -->
<!--Section 3 -->
<apex:pageBlockSection title="Provision" id="Section3"
columns="2"
>
</apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
one more question, do rich text fields not work with Rendered sections ? sometimes i get this error that rich text fields are not supported with Rendered!
public Boolean getRednerPageBlock() { //complex logic that ends with a Boolean value returned. }and then just have the rendered condition as<pageBlock rendered="{!rerenderPageBlock}'>. – Peter Knolle Dec 26 '12 at 19:59