I have passed some Parameters across the URL string and I am trying to display one of two strings dependant on the value. I'm not getting any errors in my apex or on my VFP but it is returning blank.
Here is my APEX code
// get and set sub from url
public String submittedForm { get; set; }
public String theLRProdID { get; set; }
public String showLRstring { get; set; }
public String valueOne { get; set; }
public String valueTwo { get; set; }
public String showString { get; set; }
public String showSub { get; set; }
public String getIDSAstring() {
theLRProdID = Apexpages.currentPage().getParameters().get('prodId');
String showID = theLRProdID;
return showID;
}
// String for leadership ready header
public String showLRstring() {
submittedForm = Apexpages.currentPage().getParameters().get('sub');
String showSub = submittedForm;
return showSub;
String valueOne = 'Please check over the details below and click the green submit button to confirm your Training Plan.';
String valueTwo = 'Thank you for submitting your details. Click on the blue print button to print your Training Plan for future reference.';
//If the form is submitted show value 2.
if (showSub != 'submitted'){
String showString = valueOne;
} else{
String showString = valueTwo;
}
return showString;
}
And here is my VFP code
<apex:facet name="caption"><p id="introText">{!showLRstring}</p></apex:facet>
Any ideas? Thanks.