You need to sign in to do that
Don't have an account?
PageBlockSection with Repeat and PageBlockSectionItem
I have two pages that both use:
<apex:pageBlockSection columns="1"> <apex:repeat value="{!vals}" var="v"> <apex:pageBlockSectionItem >
They both reference the same standardcontroller and extension. The main difference between the pages is that one is for an existing record and the other is for creating a new record. One page displays the fields normally (like the standard Salesforce edit pages) and the other page does not. Inspecting the page that is not properly formatted, it appears that the labelCol td is not present and both the label and field are being put in the dataCol td. Does anyone know what would cause this? I have simplified both pages down to the bare minimum and am still getting the same results.
Thanks!
Found it. I changed the visualforce page's API version to 21.0 and the formatting is good. Hope this information if helpful for others.
All Answers
Found it. I changed the visualforce page's API version to 21.0 and the formatting is good. Hope this information if helpful for others.
You need to set the apiversion of a page to 20 (or later) for repeat to generate separate pageblocksectionitems. Prior to that release, a repeat within a pageblocksection generated a single item.