You need to sign in to do that
Don't have an account?
chiranjib rout
Page redirection from one VF page to another VF page is not working.
here when i will give any jobid which is available in interview object then after pressing the enter button 1 new page(Feedback_JobID) will open and if the jobid is not available inside the interview object then 1 error message will come. But whenever i am trying to do that here for every value it is showing the error message.The flow is not going to if loop i think. Can anybody give me the idea what is wrong here..
VF Page: <apex:page controller="Client_Feedback" showHeader="false" sidebar="false" standardStylesheets="true"> <apex:Pagemessages id="msg"/> <apex:form > <CENTER><apex:image url="{!$Resource.LOGO}" width="200" height="130"/></CENTER> <CENTER><p><b>Client Login Page</b><br /></p></CENTER> <CENTER> <apex:panelGrid columns="3" style="margin-top:1em;"> <p><b>JOB ID:</b><br /> <apex:inputText required="true" id="ID" value="{!var}"/> <apex:commandButton action="{!search}" value="enter" id="enter"/> </p> </apex:panelGrid> </CENTER> </apex:form> </apex:page>
CONTROLLER: public class Client_Feedback { public String ID {get;set;} public string var{set;get;} public List < SCSCHAMPS__Interview__c > intList {get;set;} //public Freelancer__c fre {get;set;} public PageReference search() { { //this.intList.clear(); List<SCSCHAMPS__Interview__c> intList = [SELECT id,SCSCHAMPS__Job__c FROM SCSCHAMPS__Interview__c WHERE SCSCHAMPS__Job__c= :ID limit 1 ]; pageReference ref; if(!intList.isEmpty()) { ref= page.Feedback_JobID; ref.setRedirect(true); return ref; } else { ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO, 'TRY AGAIN... .')); } return null; } } }
Update this code .
Regards ,
Harish.R
Hi,
Update this code
this is refrence code check this .if any issue ask me imediatly .
Regards,
Harish.R.
is it solved my code .
Regards ,
Harish.R