• VishnuE
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

Test class is covering only two functions out of three and the code coverage is 54%.

The controller for the page is below.

 

global class CommissionChartsVFController
  {         
      @RemoteAction
      global static Closing_Commision_Producer_Summary__c[] loadProducerIncome()
      {
          Id userId = UserInfo.getUserId();
          Date thisDate= System.today();
          Date previousMonthDate = thisDate.addMonths(-12);
          String Year = String.valueOf(previousMonthDate.Year());
              String preMonth = String.valueOf(previousMonthDate.Month());
              if (preMonth.length()<2)
              {
                  preMonth = '0'+preMonth;
              }
              String YearMonth = Year+preMonth;
              
              List<Closing_Commision_Producer_Summary__c> ProducerIncomeList = new List<Closing_Commision_Producer_Summary__c>();
              ProducerIncomeList = [SELECT Id, Real_Income__c, Chartis_Production__c, Closing_YearMonth__c FROM Closing_Commision_Producer_Summary__c where OwnerId=:userId AND Closing_YearMonth__c >=: YearMonth];
              return ProducerIncomeList;
          }
          
          @RemoteAction
          global static Closing_Commision_Producer_Summary__c[] loadProducerProduction()
          {
              Id userId = UserInfo.getUserId();
              Id contactID;
              String advisorId;
              Date thisDate= System.today();
              Date previousMonthDate = thisDate.addMonths(-6);
              String Year = String.valueOf(previousMonthDate.Year());
              String preMonth = String.valueOf(previousMonthDate.Month());
              if (preMonth.length()<2)
              {
                  preMonth = '0'+preMonth;
              }
              String YearMonth = Year+preMonth;
              User user = [SELECT LastName, ContactId FROM User WHERE Id = :UserInfo.getUserId()];
              system.debug('userProducer:'+user);
              contactID = user.ContactId;
              system.debug('ContactIdProducer'+contactID);
              Contact con = [Select Sales_Company_ID__c FROM Contact WHERE Id =:contactID LIMIT 1];
              system.debug('SalesProducer:'+con);
              advisorId = con.Sales_Company_ID__c;       
              List<Closing_Commision_Producer_Summary__c> ProducerProductionList = new List<Closing_Commision_Producer_Summary__c>();
              ProducerProductionList = [SELECT Id, Chartis_Production__c , Closing_YearMonth__c FROM Closing_Commision_Producer_Summary__c where OwnerId =: userId AND Advisor_Id__c=:advisorId AND Closing_YearMonth__c >=: YearMonth];
              return ProducerProductionList;
          }
          
          @RemoteAction
          global static Closing_Commision_Company_New__c[] loadCompanyIncome()
          {
              Id contactID;
              String advisorId;
              Date thisDate= System.today();
              Date previousMonthDate = thisDate.addMonths(-2);
              String Year = String.valueOf(previousMonthDate.Year());
              String preMonth = String.valueOf(previousMonthDate.Month());
              if (preMonth.length()<2)
              {
                  preMonth = '0'+preMonth;
              }
              String YearMonth = Year+preMonth;
              User user = [SELECT LastName, ContactId FROM User WHERE Id = :UserInfo.getUserId()];
              system.debug('userCompany:'+user);
              contactID = user.ContactId;
              system.debug('ContactIdCompany'+contactID);
              Contact con = [Select Sales_Company_ID__c FROM Contact WHERE Id =:contactID LIMIT 1];
              system.debug('SalesCompany:'+con);
              advisorId = con.Sales_Company_ID__c;
              system.debug('_______________adCompany'+advisorId);
              
              
              List<Closing_Commision_Company_New__c> CompanyIncomeList = new List<Closing_Commision_Company_New__c>();
              CompanyIncomeList = [SELECT Advisor_Id__c, Total_Premium_of_New_Contract__c, Insurance_Company_Code__c, General_Premium__c, Closing_YearMonth__c FROM Closing_Commision_Company_New__c where Advisor_Id__c=:advisorId AND Closing_YearMonth__c =: YearMonth];
              return CompanyIncomeList;
          }      
      }

 

The test class for the controller is

@isTest
public class CommissionChartsVFControllerTest
{
 static testMethod void myunitTest()
 {    
     test.StartTest();
     CommissionChartsVFController ccvfc = new CommissionChartsVFController();
     
     User user = [SELECT ContactId FROM User WHERE Profile.Name = 'Partner Producer Profile' and IsActive = true LIMIT 1];
         
     System.runas(user)
     {  
     
      RecordType salesRecCon = [SELECT Id FROM RecordType WHERE sObjectType='Contact' AND Name='Sales Contact' LIMIT 1];
    
      Contact con= new Contact(LastName = 'TestContact', FirstName = 'CA', Name_Eng__c = 'LEngname',
                              RecordTypeId = salesRecCon.Id, Sales_Company_ID__c = '1234ABCD',
                              SSN_for_Producer__c = '8201011111111');
     insert con;
        
     Contact contInstance = [select Id,Sales_Company_ID__c from Contact where LastName = 'TestContact' and  FirstName = 'CA'and Name_Eng__c = 'LEngname' and Sales_Company_ID__c = '1234ABCD' and SSN_for_Producer__c = '8201011111111' and RecordTypeId =: salesRecCon.Id];
       
     Closing_Commision_Producer_Summary__c ccpsInstance = new Closing_Commision_Producer_Summary__c();    
 // inserting a record for this object
         
     CommissionChartsVFController.loadProducerIncome();
     
     
     Closing_Commision_Company_New__c ccCompanyNewIns = new Closing_Commision_Company_New__c();
 //inserting a record for this object  
     
    
     CommissionChartsVFController.loadProducerProduction();
     CommissionChartsVFController.loadCompanyIncome();
     
     }
     test.StopTest();
 }
}

I am getting a following error in the part

 

System.NullPointerException: Attempt to de-reference a null object

Error is in expression '{!search}' in component <apex:page> in page contactpagination
 
 

The list is returning data but showing null pointer exception
 

<apex:page tabStyle="Contact" readOnly="true" Controller="ContactPaginationController">
    <apex:form id="form">
        <table width="100%" border="0">
            <tr>
                <td width="100%">
                    <apex:sectionHeader title="Search Contacts"/>
                        <apex:pageBlock id="block">
                            <apex:pageBlockSection collapsible="true" title="Contact Filters">                               
                                <apex:inputfield value="{!contactObjIns.Lastname}"  />
                                <apex:inputField value="{!contactObjIns.MobilePhone}" />
                                <apex:inputField value="{!contactObjIns.Department}"/>    
                            </apex:pageBlockSection>
                            <br/>
                            <apex:commandButton value="Search" reRender="block1" action="{!search}" status="status"/>
                             <apex:actionStatus id="status" startText="Searching... please wait..."/>
                            <apex:commandButton value="Reset" action="{!reset}"/>
                            <apex:outputPanel >
                        <font size="1.5pt">Number of Records per Page</font>
                        <apex:selectList size="1" >
                        <apex:selectOption itemValue="5" itemLabel="5"/>
                        <apex:selectOption itemValue="10" itemLabel="10"/>
                        <apex:selectOption itemValue="20" itemLabel="20">                        
                        </apex:selectOption>
                        <apex:actionSupport event="onchange" reRender="Block1"/>
                        </apex:selectList>
                        </apex:outputPanel>
                        </apex:pageBlock>
                        </td>
                        </tr>
                        <tr>
                        <td>
                        <apex:pageBlock id="block1">
                        <apex:actionRegion >
                        <apex:pageBlockSection >
                        <apex:pageBlockTable value="{!searchResults}" var="contactDisplay" width="300%">
                        <apex:column >
                                <a href="/{!contactDisplay.Id}">
                                <apex:outputField value="{!contactDisplay.Name}"/></a>
                            </apex:column>
                        
                        <apex:column value="{!contactDisplay.Email}"/>
                        <apex:column value="{!contactDisplay.Languages__c}"/>
                        <apex:column value="{!contactDisplay.Level__c}"/>
                        <apex:column value="{!contactDisplay.MailingStreet}"/>
                        <apex:column value="{!contactDisplay.MobilePhone}"/>
                        <apex:column value="{!contactDisplay.MailingCity}"/>
                        <apex:column value="{!contactDisplay.MailingState }"/>
                        </apex:pageBlockTable></apex:pageBlockSection>         
                        </apex:actionRegion>
                        </apex:pageBlock>
                        </td></tr>
                        </table>
    </apex:form>
</apex:page>

 

public with sharing class ContactPaginationController
{
     public Integer size = 20;
    public ContactPaginationController() {}
    Public Contact contactObjIns {get;set;}
    Public List<Contact> contactInsSearch;
    public List<Contact> searchResults = new List<Contact>();       
    public String qry = 'select Name,Email,Languages__c,Level__c,MailingStreet,MobilePhone,MailingCity,MailingState From Contact ';

    public ContactPaginationController(ApexPages.StandardController controller)
    {
        contactObjIns = new Contact();
    }
    
   public list<Contact> getsearchResults()
   {
        searchResults= new List<Contact>();
        for(Contact contact :(list<Contact>)con.getRecords())
        searchResults.add(contact);
        return searchResults;
    }
   public ApexPages.StandardSetController con
   {
        get
        {
            if(con == null)
            {
                con= new ApexPages.StandardSetController(Database.getQueryLocator(qry));
                con.setPageSize(size);
            }
        return con;
            
        }
        set;
    }
    public void search()
    {
        contactInsSearch = new List<Contact>([select Name,Email,Languages__c,Level__c,MailingStreet,MobilePhone,MailingCity,MailingState From Contact
                                              where Lastname =: contactObjIns.Lastname and MobilePhone = : contactObjIns.MobilePhone
                                              and Department = : contactObjIns.Department]);
        
        System.debug('Contact'+contactInsSearch);
     
    }
    public String getWhereClause()
    {         
        String whereClause = 'WHERE Lastname != null ';

        if(contactObjIns.Lastname != '' && contactObjIns.Lastname != null)
        {
            whereClause +='AND LastnameLIKE \''+ String.escapeSingleQuotes(contactObjIns.Lastname) +'%\' ';
        }
        if(contactObjIns.MobilePhone != '' && contactObjIns.MobilePhone != null)
        {
            whereClause +='AND MobilePhone LIKE \''+String.escapeSingleQuotes(contactObjIns.MobilePhone) +'%\' ';
        }
        if(contactObjIns.Department != '' && contactObjIns.Department != null)
        {
            whereClause +='AND Department LIKE \''+ String.escapeSingleQuotes(contactObjIns.Department) +'%\' ';
        }
        return whereClause;
    }
    public Contact getcontactObjIns()
    {
      return this.contactObjIns;
    }
    public void setcontactObjIns(Contact val)
    {
      this.contactObjIns = val;
    }
    
    public PageReference reset()
    {
     PageReference newPage= new PageReference(System.currentPageReference().getURL());
     newPage.setRedirect(true);
     return newPage;
    }
}

The record is not getting saved using visual force page. The object contains record types and for the picklist values I used schema methods. Please help me in correcting the page.


<apex:page standardController="Books__c" extensions="BookExtensions">
<p><h1>welcome {!$User.FirstName & ' ' & $User.LastName}</h1></p>
<h2> You are in Books object. Create a book you need </h2>
<apex:form ><apex:pageBlock ><apex:pageBlockSection columns="2">
<apex:inputField value="{!Books__c.Name}"/>
<apex:inputField value="{!Books__c.Author__c}"/>
<apex:selectList value="{!Genre}" size="1" title="Genre" label="Genre">
<apex:selectOptions value="{!PicklistValues}" />
</apex:SelectList>

<apex:inputField value="{!Books__c.Price__c}"/>
<apex:inputField value="{!Books__c.RecordTypeId}"/>
</apex:pageBlockSection><apex:pageBlockButtons >
<apex:commandButton value="Submit" action="{!save}"/>
</apex:pageBlockButtons>
</apex:pageBlock></apex:form>
</apex:page>

 

 

 

public with sharing class BookExtensions
{
    String[] Genre= new String[]{};
   
    private ApexPages.StandardController controller;
    public BookExtensions(ApexPages.StandardController controller)
    {  
    }
    public BookExtensions()
    {  
    }   
    public static List<SelectOption> getPicklistValues()
    {
    List<SelectOption> options = new List<SelectOption>();
     Schema.DescribeFieldResult F = Books__c.Genre__c.getDescribe();
     List<Schema.PicklistEntry> pick_list_values = F.getPicklistValues();
      for (Schema.PicklistEntry a : pick_list_values)
      {   
          options.add(new selectOption(a.getLabel(), a.getValue()));
      }
     return Options;
    }
    
    public String[] getGenre()
    {
      return Genre;
    }
            
    public void setGenre(String[] Genre)
    {
     this.Genre= Genre;
    }
   Public PageReference Save()
    {
 
     return null;
    }
}

I am getting a following error in the part

 

System.NullPointerException: Attempt to de-reference a null object

Error is in expression '{!search}' in component <apex:page> in page contactpagination
 
 

The list is returning data but showing null pointer exception
 

<apex:page tabStyle="Contact" readOnly="true" Controller="ContactPaginationController">
    <apex:form id="form">
        <table width="100%" border="0">
            <tr>
                <td width="100%">
                    <apex:sectionHeader title="Search Contacts"/>
                        <apex:pageBlock id="block">
                            <apex:pageBlockSection collapsible="true" title="Contact Filters">                               
                                <apex:inputfield value="{!contactObjIns.Lastname}"  />
                                <apex:inputField value="{!contactObjIns.MobilePhone}" />
                                <apex:inputField value="{!contactObjIns.Department}"/>    
                            </apex:pageBlockSection>
                            <br/>
                            <apex:commandButton value="Search" reRender="block1" action="{!search}" status="status"/>
                             <apex:actionStatus id="status" startText="Searching... please wait..."/>
                            <apex:commandButton value="Reset" action="{!reset}"/>
                            <apex:outputPanel >
                        <font size="1.5pt">Number of Records per Page</font>
                        <apex:selectList size="1" >
                        <apex:selectOption itemValue="5" itemLabel="5"/>
                        <apex:selectOption itemValue="10" itemLabel="10"/>
                        <apex:selectOption itemValue="20" itemLabel="20">                        
                        </apex:selectOption>
                        <apex:actionSupport event="onchange" reRender="Block1"/>
                        </apex:selectList>
                        </apex:outputPanel>
                        </apex:pageBlock>
                        </td>
                        </tr>
                        <tr>
                        <td>
                        <apex:pageBlock id="block1">
                        <apex:actionRegion >
                        <apex:pageBlockSection >
                        <apex:pageBlockTable value="{!searchResults}" var="contactDisplay" width="300%">
                        <apex:column >
                                <a href="/{!contactDisplay.Id}">
                                <apex:outputField value="{!contactDisplay.Name}"/></a>
                            </apex:column>
                        
                        <apex:column value="{!contactDisplay.Email}"/>
                        <apex:column value="{!contactDisplay.Languages__c}"/>
                        <apex:column value="{!contactDisplay.Level__c}"/>
                        <apex:column value="{!contactDisplay.MailingStreet}"/>
                        <apex:column value="{!contactDisplay.MobilePhone}"/>
                        <apex:column value="{!contactDisplay.MailingCity}"/>
                        <apex:column value="{!contactDisplay.MailingState }"/>
                        </apex:pageBlockTable></apex:pageBlockSection>         
                        </apex:actionRegion>
                        </apex:pageBlock>
                        </td></tr>
                        </table>
    </apex:form>
</apex:page>

 

public with sharing class ContactPaginationController
{
     public Integer size = 20;
    public ContactPaginationController() {}
    Public Contact contactObjIns {get;set;}
    Public List<Contact> contactInsSearch;
    public List<Contact> searchResults = new List<Contact>();       
    public String qry = 'select Name,Email,Languages__c,Level__c,MailingStreet,MobilePhone,MailingCity,MailingState From Contact ';

    public ContactPaginationController(ApexPages.StandardController controller)
    {
        contactObjIns = new Contact();
    }
    
   public list<Contact> getsearchResults()
   {
        searchResults= new List<Contact>();
        for(Contact contact :(list<Contact>)con.getRecords())
        searchResults.add(contact);
        return searchResults;
    }
   public ApexPages.StandardSetController con
   {
        get
        {
            if(con == null)
            {
                con= new ApexPages.StandardSetController(Database.getQueryLocator(qry));
                con.setPageSize(size);
            }
        return con;
            
        }
        set;
    }
    public void search()
    {
        contactInsSearch = new List<Contact>([select Name,Email,Languages__c,Level__c,MailingStreet,MobilePhone,MailingCity,MailingState From Contact
                                              where Lastname =: contactObjIns.Lastname and MobilePhone = : contactObjIns.MobilePhone
                                              and Department = : contactObjIns.Department]);
        
        System.debug('Contact'+contactInsSearch);
     
    }
    public String getWhereClause()
    {         
        String whereClause = 'WHERE Lastname != null ';

        if(contactObjIns.Lastname != '' && contactObjIns.Lastname != null)
        {
            whereClause +='AND LastnameLIKE \''+ String.escapeSingleQuotes(contactObjIns.Lastname) +'%\' ';
        }
        if(contactObjIns.MobilePhone != '' && contactObjIns.MobilePhone != null)
        {
            whereClause +='AND MobilePhone LIKE \''+String.escapeSingleQuotes(contactObjIns.MobilePhone) +'%\' ';
        }
        if(contactObjIns.Department != '' && contactObjIns.Department != null)
        {
            whereClause +='AND Department LIKE \''+ String.escapeSingleQuotes(contactObjIns.Department) +'%\' ';
        }
        return whereClause;
    }
    public Contact getcontactObjIns()
    {
      return this.contactObjIns;
    }
    public void setcontactObjIns(Contact val)
    {
      this.contactObjIns = val;
    }
    
    public PageReference reset()
    {
     PageReference newPage= new PageReference(System.currentPageReference().getURL());
     newPage.setRedirect(true);
     return newPage;
    }
}

The record is not getting saved using visual force page. The object contains record types and for the picklist values I used schema methods. Please help me in correcting the page.


<apex:page standardController="Books__c" extensions="BookExtensions">
<p><h1>welcome {!$User.FirstName & ' ' & $User.LastName}</h1></p>
<h2> You are in Books object. Create a book you need </h2>
<apex:form ><apex:pageBlock ><apex:pageBlockSection columns="2">
<apex:inputField value="{!Books__c.Name}"/>
<apex:inputField value="{!Books__c.Author__c}"/>
<apex:selectList value="{!Genre}" size="1" title="Genre" label="Genre">
<apex:selectOptions value="{!PicklistValues}" />
</apex:SelectList>

<apex:inputField value="{!Books__c.Price__c}"/>
<apex:inputField value="{!Books__c.RecordTypeId}"/>
</apex:pageBlockSection><apex:pageBlockButtons >
<apex:commandButton value="Submit" action="{!save}"/>
</apex:pageBlockButtons>
</apex:pageBlock></apex:form>
</apex:page>

 

 

 

public with sharing class BookExtensions
{
    String[] Genre= new String[]{};
   
    private ApexPages.StandardController controller;
    public BookExtensions(ApexPages.StandardController controller)
    {  
    }
    public BookExtensions()
    {  
    }   
    public static List<SelectOption> getPicklistValues()
    {
    List<SelectOption> options = new List<SelectOption>();
     Schema.DescribeFieldResult F = Books__c.Genre__c.getDescribe();
     List<Schema.PicklistEntry> pick_list_values = F.getPicklistValues();
      for (Schema.PicklistEntry a : pick_list_values)
      {   
          options.add(new selectOption(a.getLabel(), a.getValue()));
      }
     return Options;
    }
    
    public String[] getGenre()
    {
      return Genre;
    }
            
    public void setGenre(String[] Genre)
    {
     this.Genre= Genre;
    }
   Public PageReference Save()
    {
 
     return null;
    }
}

how to connect to different objects in visualforce page which is tagged inside an tabs

 

this is my first custom object code

<apex:page standardController="Provider_Group__c" showHeader="true" sidebar="true">
<apex:form >
<apex:detail relatedList="true"/>
<apex:tabpanel switchType="client" selectedTab="tabdetails" id="AccountTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab" style="Account">
<apex:tab name="Provider Group" label="Provider Group" id="provider">

<apex:pageBlock title="Basic Information" mode="edit" id="providergroup" >
<apex:pageBlockSection columns="1">



<apex:inputfield value="{!Provider_Group__c.Provider_Group__c}" />
<apex:inputfield value="{!Provider_Group__c.Status__c}" />
<apex:inputfield value="{!Provider_Group__c.Type__c}" />
<apex:inputfield value="{!Provider_Group__c.Company_name__c}" />
Notifications*<apex:inputfield value="{!Provider_Group__c.Use_Members_to_Broadcast__c}" />
<apex:inputfield value="{!Provider_Group__c.Group_Worklist__c}" />
<apex:inputfield value="{!Provider_Group__c.Group_Worklists__c}" />
<apex:inputfield value="{!Provider_Group__c.Preferred_Notification__c}" />
<apex:inputfield value="{!Provider_Group__c.Email_Address__c}" />
<apex:inputfield value="{!Provider_Group__c.Comments__c}" />
<apex:inputfield value="{!Provider_Group__c.Currency_Code__c}" />
</apex:pageBlockSection>




</apex:pageBlock>
</apex:tab>

<apex:tab name="Schedule" label="Schedule" id="providerr">
</apex:tab>
</apex:tabpanel>
</apex:form>

</apex:page>

 

i want to connect next program to the tab of schedule which is der in first page

<apex:page StandardController="Schedule__c" standardStylesheets="true">
<apex:form >

<apex:pageBlock title="Schedule">

<apex:pageblockButtons location="bottom" >
<apex:commandButton action="{!Quicksave}" value="save" />
</apex:pageblockButtons>

<apex:pageBlockSection columns="1">

<apex:inputfield value="{!Schedule__c.Time_Zone__c}" />
<apex:inputfield value="{!Schedule__c.Holiday__c}" />

</apex:pageBlockSection>
<apex:pageBlock title="Hours of Operation">
<apex:pageBlockSection >

<apex:pageBlockTable value="{!Schedule__c}" var="opp" cellpadding="5" border="l" headerClass="red" columnsWidth="2" >

<apex:column headerValue="Monday">
<apex:pageBlock title="Hours on Monday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Monday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time1__c}"/>
<apex:inputField value="{!Schedule__c.End_Time1__c}"/>
</apex:pageBlockSection>

</apex:pageBlock>
</apex:column>

</apex:pageBlockTable>


<apex:pageBlockTable value="{!Schedule__c}" var="opps" cellpadding="5" border="l" headerClass="red" columnsWidth="5" >
<apex:column headerValue="Tuesday">
<apex:pageBlock title="Hours on Tuesday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Tuesday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time2__c}"/>
<apex:inputField value="{!Schedule__c.End_Time2__c}"/>

</apex:pageBlockSection>

</apex:pageBlock>
</apex:column>
</apex:pageBlockTable>

<apex:pageBlockTable value="{!Schedule__c}" var="oppss" cellpadding="5" border="l" headerClass="red" >
<apex:column headerValue="Wednesday">
<apex:pageBlock title="Hours on Wednesday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Wednesday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time3__c}"/>
<apex:inputField value="{!Schedule__c.End_Time3__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:column>
</apex:pageBlockTable>

<apex:pageBlockTable value="{!Schedule__c}" var="oppsss" cellpadding="5" border="l" headerClass="red" >
<apex:column headerValue="Thursday">
<apex:pageBlock title="Hours on Thursday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Thursday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time4__c}"/>
<apex:inputField value="{!Schedule__c.End_Time4__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:column>
</apex:pageBlockTable>
<apex:pageblockTable value="{!Schedule__c}" var="oppssd" cellpadding="5" border="l" headerClass="red" >
<apex:column headerValue="Friday">
<apex:pageBlock title="Hours on Friday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Friday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time5__c}"/>
<apex:inputField value="{!Schedule__c.End_Time5__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:column>
</apex:pageblockTable>
<apex:pageblockTable value="{!Schedule__c}" var="oppsse" cellpadding="5" border="l" headerClass="red" >
<apex:column headerValue="Saturday">
<apex:pageBlock title="Hours on Saturday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Saturday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time6__c}"/>
<apex:inputField value="{!Schedule__c.End_Time6__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:column>
</apex:pageblockTable>
<apex:pageblockTable value="{!Schedule__c}" var="oppssu" cellpadding="5" border="l" headerClass="red" >
<apex:column headerValue="Sunday">
<apex:pageBlock title="Hours on Sunday">
<apex:pageBlockSection columns="1" >
<apex:inputField value="{!Schedule__c.Sunday__c}"/>
<apex:inputField value="{!Schedule__c.Start_Time7__c}"/>
<apex:inputField value="{!Schedule__c.End_Time7__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:column>
</apex:pageblockTable>

 

</apex:pageBlockSection>
</apex:pageBlock>
</apex:pageBlock>

</apex:form>

</apex:page>

 

 

Can u tell me how to add two custom objects tabs in same visual force page