I have two custom objects, Package\_\_c and Product\_\_c, I'm trying to create a form that will take input for fields of both objects on a single visualforce page and Save the data accordingly. Here is my Visualforce page -

```
    <apex:page controller="RedirectedController">
    <apex:form > 

    <apex:pageBlock >

        <apex:pageBlockSection columns="2">

            <apex:inputField label="Name" value="{!objectpkg.Name}"/>
            <apex:inputField label="Account" value="{!objectpkg.Account__c}"/>
            <apex:inputField label="Type" value="{!objectpkg.Package_Type__c}"/>
            <apex:inputField label="Cost Of Goods" value="{!objectpkg.Cost_of_Goods_Sold__c}"/>
            <apex:inputField label="Quantity Of Goods" value="{!objectpkg.Quantity_of_Goods_Sold__c}"/>
            <apex:inputField label="Ready to Ship" value="{!objectpkg.Ready_to_Ship__c}"/>

        </apex:pageBlockSection>

        <apex:pageBlockButtons >
            <apex:commandButton action="{!saveAll}" value="Save"/>
            <apex:commandButton value="Cancel"/>
        </apex:pageBlockButtons>

    </apex:pageBlock>

   <apex:inputField label="Family" value="{!objectprod.Product_Family__c}"/>
</apex:form> 
</apex:page>

```

Apex Code

```
public with sharing class RedirectedController 
{
    public List<Package__c> objectpkg {get; set;}
    public List<Product__c> objectprod {get; set;}
    public Package__c pkg {get; set;}
    public Product__c prod {get; set;}
    public RedirectedController() 
    {
        List<Package__c> objectpkg = new List<Package__c>();
        List<Product__c> objectprod = new List<Product__c>();
        objectpkg = [SELECT Account__c, Cost_of_Goods_Sold__c, Name, Package_Type__c, Quantity_of_Goods_Sold__c, Ready_to_Ship__c FROM Package__c];
        objectprod =[SELECT Product_Family__c From Product__c];

    }

    public void saveAll()
    {
        insert objectpkg;
        insert objectprod;
    }

}

```

I get the error as "Could not resolve the entity from apex:inputField value binding '{!objectpkg.Name}'. apex:inputField can only be used with SObjects, or objects that are Visualforce field component resolvable."

What am I doing wrong?