How would I implement a button control for an apex:panelBar? I have a Previous and Next button that increase/decrease the selectedTabNumber, it updates the {!selectedTabNumber} correctly and my if statement is correct but it does not seem to have an effect on the expanded="{!IF(selectedTabNumber == tab.tabnumber, true, false)}" attribute in the apex:panelBarItem. What am I missing?
Thanks, Matt
<div><apex:commandButton reRender="tabPanel" action="{!prevSection}" value="Previous"/>
<apex:commandButton reRender="tabPanel" action="{!nextSection}" value="Next"/>
</div>
<apex:panelBar id="tabPanel" items="{!tabs}" var="tab" switchType="server" headerClass="panel" headerClassActive="panelActive">
<apex:panelBarItem expanded="{!IF(selectedTabNumber == tab.tabnumber, true, false)}" label="{!tab.tabName}" >
selected {!selectedTabNumber} of {!tab.tabnumber} this tab {!IF(selectedTabNumber == tab.tabnumber, true, false)}