This is the code of the VF PAGE

<apex:page showHeader="false"  controller="Controller004">
    <link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'/>
    h1{font-family: 'Oswald', sans-serif; text-decoration:none;}
    <apex:pageBlock >
    <apex:pageBlockSection title="Record of avalaible Doctors">
    <apex:form >
    <apex:pageBlockTable value="{!obj}" var="a">

     <apex:column headerValue="Name">
     <h1><apex:outputField value="{!a.Full_Name__c}" /></h1>
     <apex:column headerValue="Fee">
    <h1><apex:outputField value="{!a.Fee__c}"/></h1>
    <apex:column headerValue="Schedule">
    <h1><apex:outputField value="{!a.schedule__c}"/></h1>
    <apex:column >
    <apex:image value="{!a.ImageUpload__c}" />


AND this is the controller of the page:

global class Controller004{

    public List<Doctor__c> obj{get;set;}
    public Controller004(){
    obj = [select Full_Name__c, Fee__c, schedule__c, ImageUpload__c from Doctor__c];

  • which field is richtextArea? – Ratan Paul Mar 16 '16 at 3:55
  • its ImageUpload__c – Nishant Mar 16 '16 at 3:57

Looks like ImageUpload__c is rich text area

then don't use apex:image for ImageUpload__c field

Instead use apex:outputField

<apex:outputField value="{!a.ImageUpload__c}"/>

This will display your rich text area image.

when we use apex:outputField salssforce in there end use as richTextArea field.

  • Yes Ratan. It works. I also wanted to know how to customize the size of the image displayed on the page, It displays in its default size. – Nishant Mar 16 '16 at 6:11
  • @Nishant if you check the doc for apex:outputField, you can use style attribute to set height and width . DOC LINK – Ratan Paul Mar 16 '16 at 6:17
  • @Nishant most welcome.. – Ratan Paul Mar 16 '16 at 7:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.