You need to sign in to do that
Don't have an account?
Joe Hayes
String is showing as blank. I don't know why?
Hi,
This should be pretty basic,
I have a vf page to display the value of the name field of a record in a custom object called 'Certification_Accredited_Centres__c'
I also have a controller that the vf page uses.
The URL passes a paramater 'centreId' which is the id of the record I am trying to get the name value of.
At the moment all I am getting on the vf page is "Assesments taken at " <-- the string is blank
VF Page (not complete)
Please can someone tell me why the {!asscen} is blank in the vf page?
Thanks
Joe
This should be pretty basic,
I have a vf page to display the value of the name field of a record in a custom object called 'Certification_Accredited_Centres__c'
I also have a controller that the vf page uses.
The URL passes a paramater 'centreId' which is the id of the record I am trying to get the name value of.
At the moment all I am getting on the vf page is "Assesments taken at " <-- the string is blank
VF Page (not complete)
<apex:page controller="AddingAssessmentsController> <h3> <apex:outputText value="Assesments taken at {!asscen}"/> </h3> </apex:page>Controller (not complete)
public class AddingAssessmentsController { public Id centreId; public String asscen{get;set;} public AddingAssessmentsController(){ centreId = ApexPages.currentPage().getParameters().get('centreId'); String asscen = [SELECT name from Certification_Accredited_Centres__c WHERE id =: centreId].name; } }
Please can someone tell me why the {!asscen} is blank in the vf page?
Thanks
Joe
Here is correct code:
If this resolve your problem, please mark this as solved , so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks & Regards
Gulshan Raj
LinkedIn (https://www.linkedin.com/in/gulshan-raj-a26b0640/)
Twitter (https://twitter.com/gulshan_bittoo)
All Answers
Here is correct code:
If this resolve your problem, please mark this as solved , so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.
Thanks & Regards
Gulshan Raj
LinkedIn (https://www.linkedin.com/in/gulshan-raj-a26b0640/)
Twitter (https://twitter.com/gulshan_bittoo)
Thanks Gulshan.