You need to sign in to do that
Don't have an account?
JessSun
cheers
JS
apex:actionSupport not executing action?
I have a input feild in visualforce page which is a picklist and I want to rerender certain part of the page after changes happens on that input feild
Here is the code
<apex:inputField value="{!a__c.c__c}" >
<apex:actionSupport event="onchange" action="{!changeHappenedOnC}" rerender="aSection" />
</apex:inputField>
Before rerendering "aSection", Function "changeHappenedOnC" inside of my controller should be executed.
Function "changeHappenedOnC" is executed almost everytimes except when one of the required field for "a__c" is empty.
Have anybody entered this kind of problem and resolved their issue??
Your help will be appreciated..
Before rerendering "aSection", Function "changeHappenedOnC" inside of my controller should be executed.
Function "changeHappenedOnC" is executed almost everytimes except when one of the required field for "a__c" is empty.
Have anybody entered this kind of problem and resolved their issue??
Your help will be appreciated..
p.s. looking into the logs when the issue happens this are the lines I got:
20:20:18.118 (118316000)|VF_PAGE_MESSAGE|You must enter a value
20:20:18.120 (120297000)|VF_PAGE_MESSAGE|You must enter a value
cheers
JS
There are two things that you can try.
Hope this helps!
All Answers
There are two things that you can try.
Hope this helps!
I tried your 1st suggestion. However there was another challenge: in function "changeHappenedOnC", I refreshed a object, which is used for "aSection" display. if I set "immediate" to true, my object will not get refreshed correctly. :(
for 2. if I set it is required to false, will there be validation on those fields when user click on save?
Yes, even if you set the field required="false" in the vfpage the server side validation will still be enforced.
You can also write your own validation in the controller. You can use the <apex:pageMessage> tag to display the error message. Ex:
Here is a quick way you can get the same look for required fields: