function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mick ManMick Man 

custom object

how can display two custom object in a Visualforce page
such as
<apex:page standardController="Ordre_Travail__c" extensions="OdtDetailController">
    <apex:pageBlock >
        <apex:pageBlockSection title="Detail d'un ordre de travail" collapsible="false">
                    <apex:outputText value="{!Ordre_Travail__c.Name}"/>
                    <apex:outputField value="{!Ordre_Travail__c.Date__c}"/>
                    <apex:outputField value="{!Ordre_Travail__c.Produit__c}"/>
                    <apex:outputField value="{!Ordre_Travail__c.Nombre__c}"/>
            </apex:pageBlockSection>
            <apex:pageBlockTable value="{!Joint}" var="g">
                    <apex:column value="{!g.MatierePremiere__r.name}"/>
                    <apex:column value="{!g.Quantite__c}"/>
            </apex:pageBlockTable>
    </apex:pageBlock>

 
pconpcon
In your controller extension you would just need to return a list of objects for the variable Joint
 
public List<MyObject__c> getJoint() {
     // Code that returns a list of MyObject__c
     // This could be a SOQL or something else
}