Skip to main content
Chelsea Wuest 님이 #Sales And Marketing에 질문했습니다
I am trying to turn the page for my custom object Student into a visualforce page that displays all the information in tabs. Attendance, Behavior Log, Grade Book and Student Note are a master/detail relationship to Student. Gradebook is also a detail to Assignments. At first I was getting anxml error, so I added <apex:page tabStyle="VisualF__tab".... and it fixed it. Now I have no clue what should go into the relatedList stuff, my main problem I have pinpointed to the subject= thing. I've tried Student__c and __r and still no luck.

 

I used the code from the tutorial: http://wiki.developerforce.com/index.php/Tabbed_Accounts_in_30_seconds

 

I am getting the error: Error: Unknown property 'Student__cStandardController.Student__r'

 

Here is my code:

 

<apex:page tabStyle="VisualF__tab" standardController="Student__c" showHeader="true">

 

    <apex:pageBlock >

 

 

 

Welcome {!$User.FirstName}

 

You are on {!Student__c.name}'s student page.

 

    </apex:pageBlock>

 

    <style>

 

       .activeTab {background-color: #.236FBD; color:white; background-image:none}

 

        .inactiveTab { background-color: lightgrey; color:black; background-image:none}

 

    </style>

 

   

 

   <apex:tabPanel switchType="client" selectedTab=" tabDetails" id="StudentTabPanel" tabClass='activeTab' inactiveTabClass='inactiveTab'>

 

   

 

       <apex:tab label="Student Details" name="StudentDetails" id="tabDetails">

 

          <apex:detail relatedList="false" title="true"/>

 

       </apex:tab>

 

      

 

       <apex:tab label="Grade Book" name="GradeBook" id="tabGrades">

 

          <apex:relatedList subject="{!???}" list="Gradebook" />

 

       </apex:tab>

 

       

 

       <apex:tab label="Attendance" name="Attendance" id="tabAttendance">

 

          <apex:relatedList subject="{!Student__r}" list="Attendance" />

 

       </apex:tab>

 

     

 

       <apex:tab label="Behavior Log" name="BehaviorLog" id="tabBehavior">

 

          <apex:relatedList subject="{!Student__r}" list="OpenActivities" />

 

       </apex:tab>

 

      

 

        <apex:tab label="Student Note" name="StudentNote" id="tabNote">

 

          <apex:relatedList subject="{!Student_r}" list="StudentNote" />

 

        </apex:tab>

 

     

 

    </apex:tabPanel>

 

 </apex:page>

 

Any suggestions?
답변 4개
  1. 2010년 12월 2일 오후 3:34
    Thanks ChuankaiZhou  for the further clarification to my comment. :) Hopefully that helps you now.