function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DrawloopSupportDrawloopSupport 

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!

Best Answer chosen by Admin (Salesforce Developers) 
DrawloopSupportDrawloopSupport

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

DrawloopSupportDrawloopSupport

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.

This was selected as the best answer
aballardaballard

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.