You need to sign in to do that
Don't have an account?
Manu2015
How to display text area field using VF Page
Hi Experts,
I want to display one text area field (Notes_c) in exist VF Page.
Below is my code.
VF Code:
<tr>
<td width="10%"> </td>
<td width="10%"> </td>
<td width="10%"> </td>
<td width="10%"> </td>
<td width="10%"> </td>
<td width="2%" align="right"><b></b></td>
<td width="10%" align="right"><b>Notes :</b></td>
<td width="55px" align="right"><b><apex:outputField value="{!MyNotes.Notes__c}"/></b> </td>
<td width="50px;"><b> </b></td>
<td width="50px;"><b> </b></td>
</tr>
Apex Class:
public string ptcid {get; set;}
public WeeklyTimeCards__c MyNotes{get;set;}
public ProjectWeekTimeCardNewController(ApexPages.StandardController controller){
ptcid = ApexPages.currentPage().getParameters().get('ptcid');
MyNotes = [select id, Notes__c FROM WeeklyTimeCards__c WHERE id =: ptcid];
system.debug('##' + MyNotes );
Is the above code correct?
Why we use debug function in class?
Anyone please sort out this.
Thanks in advance.
Thanks,
Manu
I want to display one text area field (Notes_c) in exist VF Page.
Below is my code.
VF Code:
<tr>
<td width="10%"> </td>
<td width="10%"> </td>
<td width="10%"> </td>
<td width="10%"> </td>
<td width="10%"> </td>
<td width="2%" align="right"><b></b></td>
<td width="10%" align="right"><b>Notes :</b></td>
<td width="55px" align="right"><b><apex:outputField value="{!MyNotes.Notes__c}"/></b> </td>
<td width="50px;"><b> </b></td>
<td width="50px;"><b> </b></td>
</tr>
Apex Class:
public string ptcid {get; set;}
public WeeklyTimeCards__c MyNotes{get;set;}
public ProjectWeekTimeCardNewController(ApexPages.StandardController controller){
ptcid = ApexPages.currentPage().getParameters().get('ptcid');
MyNotes = [select id, Notes__c FROM WeeklyTimeCards__c WHERE id =: ptcid];
system.debug('##' + MyNotes );
Is the above code correct?
Why we use debug function in class?
Anyone please sort out this.
Thanks in advance.
Thanks,
Manu
The basic syntax of <apex:outputField value="{!MyNotes.Notes__c}"/> looks correct to me.
As for the debug statement, you'd use that for exactly what it sounds like, to debug your code. The debug logs can be accessed by going to Setup->Monitor->Debug Logs