+ Start a Discussion
iJojoiJojo 

Repeating an opportunity richtextfield on a visualforce page

Hi, 

 

here's the issue i'am having.

 

i only want to repeat a custom richtextfield of my opportunities on a visualforcepage.

 

The custom field(rich text) is menus__c.

 

and my visualforce code is the following ;

 

<apex:repeat value="{!Opportunity.menus__c}" var="Line">
<tr>
<td>{!Line.menus__c}</td>
</tr>
</apex:repeat>

 

i have also tried :

 

<apex:repeat value="{!Opportunity.menus__r}" var="Line">
<tr>
<td>{!Line.menus__r}</td>
</tr>
</apex:repeat>

 

 

any ideas?

 

Thank you in advance.

 

Jonathan

Cory CowgillCory Cowgill
Have you tried <apex:outputField> ?
iJojoiJojo

This doesn't

 

<apex:repeat value={!Opportunity.menus__c} var="Line">

 

<apex:outputField value="{!Line.menus__c}"/>

 

</apex:repeat>

vivek12345vivek12345

Hello,

 

Have you tried generating table using  apex:pageblockTable

 

<apex:pageblockTable value="{!OpportunityMenu}" var="emp" width="100%" >
        <apex:column headervalue="Rich text" >
            <apex:outputText  value="/{!emp.menus__c}" />
        </apex:column>

</apex:pageblockTable>

 

public List<Opportunity> getOpportunityMenu(){
        List<Opportunity> TempOppList=  new List<Opportunity>();
        TempEducationHistory = [Select  menus__c From Opportunity where 'If you have any'];
        
        if (!TempOppList.isEmpty()){
            return TempOppList;
        }else{
            return null;
        }
    }

 

Please let me know if that Helps.

 

Thanks

Vivek