You need to sign in to do that
Don't have an account?
vanessa veron
ApexPages.Message NOT WORK
Hii
My error messages do not work.
I have a method within this method and use the code below:
APEX CONTROLLER:
Inside the Visualforce page, the button will execute this method that contains the error message, but does not work. why?
My error messages do not work.
I have a method within this method and use the code below:
APEX CONTROLLER:
global PageReference schedulejob(){ .............................. if (nomJob == null){ ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.FATAL,'job null'); ApexPages.addMessage(myMsg); } else system.schedule(NomJobSchedulable , expression, p); .............. PageReference pageRef = new PageReference('/apex/BBBBPage'); pageRef.setRedirect(true); return pageRef ; }
Inside the Visualforce page, the button will execute this method that contains the error message, but does not work. why?
.......... <apex:PageBlock id="block01"> <apex:pagemessages id="showmsg" /> ............. Nom Job.: <apex:inputText id="nomJobIP" value="{!nomJob}" /> ................... <apex:commandButton value="Create" action="{!schedulejob}"/>
wouldnt my above suggestion stop the page redirect as we doing a redirect after setting the page message
Vish
Vish
How should I make the error message work?
Thank you
http://bobbuzzard.blogspot.co.uk/2011/06/execute-custom-search-when-opening-page.html
shows how to extract parameters from the URL and use them in the controller.