The docs for <apex:column />
states that the default behavior of the headerValue displays the field label when using an <apex:inputField/>
or an <apex:outputField/>
tag.
Note also that specifying a value for this attribute overrides the default header label that appears if you use an inputField or outputField in the column body.
However the header value is blank when I do so.
<apex:pageBlockTable value="{!productsToInsert}" var="p" id="orderItemTable" >
<apex:column>
<apex:inputField value="{!p.Name}" />
</apex:column>
<apex:column>
<apex:inputField value="{!p.Family}">
</apex:inputField>
</apex:column>
<apex:column>
<apex:inputField value="{!p.isActive}" />
</apex:column>
<apex:column >
<apex:inputField value="{!p.Initial_Inventory__c}" />
</apex:column>
</apex:pageBlockTable>
How is this supposed to work with nesting inputFields inside the Apex Column body?
headerValue
attribute and thefacet
attribute. If it's not displaying a label it seems like it may be a bug. Does it work when you useoutputField
or when you use thevalue
attribute?value
attribute on the column it shows a label, but for this case I want input from the User. Specifying thevalue
attribute only displays the data. I think this is a bug too, or just bad documentation.