+ Start a Discussion
GerhardNewman2GerhardNewman2 

Summer 09 Bug: How to use PanelBar value parameter?

I want to make the third item open by default.
Code:
  <apex:panelBar value="System">
    <apex:panelBarItem label="Operations Fields" id="Operations">
      data 1
    </apex:panelBarItem>
    <apex:panelBarItem label="Administrator Fields" id="Administrator">
      data 2
    </apex:panelBarItem>
    <apex:panelBarItem label="System Fields" id="System">
      data 3
    </apex:panelBarItem>
  </apex:panelBar>

 
but this code gives the following error:
Error: Formula expression is required for attribute value in <apex:panelBar>
What is the correct usage?  I can find no examples.
Message Edited by GerhardNewman2 on 05-20-2009 10:18 PM
GerhardNewman2GerhardNewman2

Here is the solution in case someone wonders how it works (easy when you know how)

Controller:

Code:
    public String getPanel() {
        return 'System';
    }
    public String setPanel(String s) {
        return null;
    }

Page:

Code:
  <apex:panelBar value="{!Panel}">
    <apex:panelBarItem label="Operations Fields" id="Operations">
      data 1
    </apex:panelBarItem>
    <apex:panelBarItem label="Administrator Fields" id="Administrator">
      data 2
    </apex:panelBarItem>
    <apex:panelBarItem label="System Fields" id="System">
      data 3
    </apex:panelBarItem>
  </apex:panelBar>

Gerhard



Message Edited by GerhardNewman2 on 11-06-2008 05:55 PM
GerhardNewman2GerhardNewman2

The solution I previously posted (see above) and have been using in production no longer works with summer 09 in my sandbox.  I believe this is a bug.  Please fix!

 

Thanks,

Gerhard