You need to sign in to do that
Don't have an account?
asadim
Rerender tries to validate fields -it shouldn't
I have a simple pageBlock with a required field and a button in it. The button calls a method from the controller and then rerenders the pageBlock. The issue is, when the rerender happens if the field is blank I get an error (Error: You must enter a value) and the pageBlock doesn't get rerendered. I don't want any validation at this stage; I just want the PB to rerender that's all.
Any ideas on how to do that would be nice.
Thanks!
On the button, make sure immediate="true" attribute is included in the command button component.
ie.
<apex:commandButton action="{!somemethod}" value="doSomething" styleClass="btn" immediate="true"/>
This should skip all validation and let you have the pageBlock be rerendered.
Cheers,
W
All Answers
On the button, make sure immediate="true" attribute is included in the command button component.
ie.
<apex:commandButton action="{!somemethod}" value="doSomething" styleClass="btn" immediate="true"/>
This should skip all validation and let you have the pageBlock be rerendered.
Cheers,
W
Another way to not go through the validation is to embed the button in actionRegion tags. If you use actionRegion, only the data changes made inside the actionRegion tags will be submitted to the controller.