I have a pretty standard use case where I have a PageBlockTable where you can select any number of rows to process.
//wrapper class
public class CaseWrapper{
public Boolean selected {get; set;}
public Case case {get; set;}
public CaseWrapper(){
selected = false;
}
}
//VF page
<apex:pageBlockTable id="table" value="{!caseWrappers}" var="caseWrapper">
<apex:column>
<apex:inputCheckbox value="{!caseWrapper.Selected}">
<apex:actionSupport event="onchange" rerender="table" />
</apex:inputCheckbox>
</apex:column>
<apex:column>
<apex:inputField value="{!caseWrapper.Status}" required="{!caseWrapper.Selected}" />
</apex:column>
</apex:pageBlockTable>
This seems to work until I trigger a required field error and THEN uncheck the selection box. Instead of becoming un-required again, the required fields stay.
pageBlockTable
?<apex:pageBlockTable
not only the<apex:column
. As the<apex:column
is dependent on<apex:pageBlockTable
.