+ Start a Discussion

Issue with immediate="true" in command button

I have a custom command button in a visualforce page that when clicked performs an action. For this action, I refresh a page block that has fields that are required. However, I do not want them to be required at this point, so I use immediate="true", which is partially working. The action isn't actually being prevented, but the field required message is still displayed (screenshot attached). Can anyone explain why this might be happening? Thank you!!

<apex:column headerValue="Add Test">
                    <apex:actionStatus id="addStatus" >
                        <apex:facet name="stop" >
                            <apex:commandButton value="Select" action="{!addToQuoteLineItemWrappers}" reRender="selected,errors" immediate="true" image="{!$Resource.GreenPlus}" status="addStatus">
                                <apex:param value="{!product.Id}" assignTo="{!toSelectId}" name="toSelectId"/>
                        <apex:facet name="start">
                            <apex:commandButton value="Adding - See Below" disabled="true" status="addStatus" />
User-added image

Hi mgodsey,
Try to enclose sections inside <apex:actionRegion> this will allow you submit the corresponding section to the server, without effect to another.
Here is an example for you :