Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Visualforce Development
- :
- Alternate PageBlockSection Header style in a Repea...
turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
0
Alternate PageBlockS ection Header style in a Repeat block.
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-15-2012 07:45 AM
Hello,
I have a VF page that is dynamically displaying pageblockheaders in a repeat section. I have added a java script to auto-collapse the sections, but the problem is that the outcome of 20 or so collaped page block sections in a row is eye-watering to say the least. I think that alternating the color of the section headers might help alleviate the problem, but I am unsure how. Here is a stripped down version of my VF page. At the top is where I apply the style to all of the pageblocksection headers.
<apex:page Controller="CustomOpportunityProductController" >
<style> .pbSubheader{ background-color: #317992 !important; border-color: none !important; } </style>
<apex:sectionHeader title="{!$ObjectType.Opportunity_Product__c.label} Edit" subtitle="New {!$ObjectType.Opportunity_Product__c.label}"/>
<apex:form >
<apex:pageBlock title="New {!$ObjectType.Opportunity_Product__c.label}" id="mainPageBlock">
<apex:pageBlockSection showHeader="true" title="Details" columns="1" collapsible="false" >
****Intermediate code here, not important***
</apex:pageBlockSection>
<apex:repeat value="{!categories}" var="currentCategory" rendered="{!showProductSelection}" >
<apex:pageBlockSection id="categorySection" showHeader="true" title="Category: {!currentCategory}" columns="1">
<apex:pageBlockTable value="{!separatedPSRecords[currentCategory]}" var="currentPSWrapper" cellpadding="4" border="1" >
***Details of the repeat table here***
</apex:pageBlockTable>
</apex:pageBlockSection>
<script> twistSection(document.getElementById('{!$Component .categorySection}').getElementsByTagName('img')[0] ) </script> ***This is the script that collapses the PBS***
<br/> ***Tried adding this to alleviate the problem, with only minimal effect.
</apex:repeat>
</apex:pageBlock>
</apex:form>
</apex:page>Any help would be appreciated.
Thanks,
Jeremy Stender

