If you are going to create new sObject using values of the table, use following as example:
controller:
public class emptyTableController {
public yourSObject fakeSObject { get; set; }
public emptyTableController() {
fakeSObject = new yourSObject();
}
}
page:
<apex:page controller="emptyTableController">
<apex:form>
<apex:pageBlock>
<apex:pageBlockSection columns="enterYourSize">
<apex:pageBlockSectionItem>
<apex:inputField value="fakeSObject.APIFieldName" />
</apex:pageBlockSectionItem>
<!-- Repeat for all fields that you need -->
<apex:pageBlockSection>
<apex:pageBlock>
<apex:form>
</apex:page>
If this table will not contain fields of sObject, use attributes like: <apex:inputText />, <apex:inputHidden />. For more detail read documentation about Standard Component Reference.
public with sharing class manageScheduleController2{
public List<Contact> ContactList { get; set; }
public Contact cont{get;set;}
public manageScheduleController2()
{
ContactList = new List<Contact>();
}
public void addContact()
{
cont = new Contact();
cont.Email = 'chamil.madusanka@gmail.com';
cont.Description = 'I\'m a Salesforce Developer';
cont.Phone= '947777777777';
ContactList.add(cont);
}
}
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.
If you are going to create new sObject using values of the table, use following as example:
controller:
page:
If this table will not contain fields of sObject, use attributes like: <apex:inputText />, <apex:inputHidden />. For more detail read documentation about Standard Component Reference.
Are you looking for as follow approach? Try this solution.
If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.