SAMPLE FIELDS inserting
<apex:page
standardController="Opportunity" tabStyle="Opportunity">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection
title="Opportunity Information">
<apex:outputField
value="{!opportunity.name}"/>
<apex:outputField
value="{!opportunity.amount}"/>
<apex:outputField
value="{!opportunity.closeDate}"/>
</apex:pageBlockSection>
<apex:pageBlockSection
>
<apex:inputField
value="{!opportunity.name}"/>
<apex:inputText
value="{!opportunity.name}"/>
</apex:pageBlockSection>
<apex:pageBlockSection
title="outputtest and inputtext">
<apex:outputLabel
value="Opp Name"></apex:outputLabel>
<apex:inputText />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
SAMPLE SOQL
<apex:page controller="SampleSoql">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputText value="{!Searched}"/>
<apex:commandButton value="Submit" Action="{!Submit}"/>
<apex:pageBlockTable value="{!accs}" var="a">
<apex:column Value="{!a.Name}"></apex:column>
<apex:column Value="{!a.Industry}"></apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
2
<apex:page controller="samplesoql2">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:inputText value="{!Searched}"/>
<apex:commandButton value="Submit" Action="{!Submit}"/>
<apex:pageBlockTable value="{!cons}" var="a">
<apex:column Value="{!a.Owner}"></apex:column>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Schema
example
<apex:page controller="SchemaExample">
<apex:form >
<apex:panelGrid columns="3" id="one">
<apex:selectList value="{!selected}" size="1">
<apex:selectOptions value="{!options}" />
<apex:actionSupport event="onchange" action="{!getDetails}" reRender="one" />
</apex:selectList>
<apex:commandButton value="GetProperties" action="{!getDetails}" />
<apex:inputTextArea value="{!describe}" rows="5" cols="70" />
</apex:panelGrid>
</apex:form>
</apex:page>
Schema 2
<apex:page controller="SchemaExample">
<apex:form >
<apex:panelGrid columns="3" id="one">
<apex:selectList value="{!selected}" size="1">
<apex:selectOptions value="{!options}" />
<apex:actionSupport event="onchange" action="{!getDetails}" reRender="one" />
</apex:selectList>
<apex:commandButton value="GetProperties" action="{!getDetails}" />
<apex:inputTextArea value="{!describe}" rows="5" cols="70" />
</apex:panelGrid>
</apex:form>
</apex:page>
Select vf Component
<apex:page controller="selectcomponent" sidebar="false" setup="false" showHeader="false" >
<apex:Form >
<apex:Pageblock >
<apex:outputLabel value="Enter grade"></apex:outputLabel><br/>
<apex:SelectList size="1">
<apex:selectoption itemlabel="None" Itemvalue="NONE"/>
<apex:selectoption itemlabel="one" Itemvalue="1"/>
<apex:selectoption itemlabel="two" Itemvalue="2"/>
<apex:selectoption itemlabel="three" Itemvalue="3"/>
</apex:SelectList>
</apex:PageBlock>
<apex:PageBlock >
<apex:outputlabel Value="Enter Submited Documents"/>
<apex:SelectCheckboxes >
<apex:selectOption Itemlabel="SSC" ItemValue="1"/>
<apex:selectOption Itemlabel="Inter" ItemValue="2"/>
<apex:selectOption Itemlabel="B.Tech" ItemValue="3"/>
</apex:SelectCheckboxes>
</apex:pageblock>
<apex:Pageblock >
<apex:OutputLabel Value="Select gender"/>
<apex:SelectRadio >
<apex:selectOption Itemlabel="Male" ItemValue="1"/>
<apex:selectOption Itemlabel="Female" ItemValue="2"/>
</apex:SelectRadio>
<apex:outputLabel value="InputSecret "/>
<apex:inputSecret />
<apex:outputLabel value="InputCheckBox "/>
<apex:inputCheckBox />
<apex:commandButton Value="Submit" action="{!save}"/>
</apex:pageblock>
</apex:Form>
</apex:page>
Select
pick list example
<apex:page controller="selectlistexampl">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:outputLabel value="Select option"></apex:outputLabel>
<apex:selectList size="1" value="{!selected}" >
<apex:selectOptions value="{!options}" />
<apex:actionSupport event="onchange" action="{!selected}" reRender="res" />
</apex:selectList>
<apex:outputLabel value="{!result}" id="res" />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
<apex:page controller="selectlistexampl">
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:outputLabel value="Select option"></apex:outputLabel>
<apex:selectList size="1" value="{!selected}" >
<apex:selectOptions value="{!options}" />
<apex:actionSupport event="onchange" action="{!selected}" reRender="res" />
</apex:selectList>
<apex:outputLabel value="{!result}" id="res" />
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Select
page Renndered
<apex:page controller="javascriptList" renderAs="pdf">
<apex:image value="{!$Resource.krishnayerru}" />
<h1>
Products Purchased
</h1>
<table width="100%">
<tr style="background:#848484;">
<td>Name </td>
<td>Price</td>
<td>Quantity</td>
<td>Total</td>
</tr>
<apex:repeat value="{!selected}" var="a">
<tr >
<td>{!a.name}</td>
<td>{!a.price}</td>
<td>{!a.quant}</td>
<td>{!a.total}</td>
</tr>
</apex:repeat>
</table>
</apex:page>
SOQL
PAGINATION
<apex:page controller="SOQLPagination" >
<apex:form >
<apex:pageBlock title="Account Pagination" id="one">
<apex:pageBlockTable value="{!accs}" var="a">
<apex:column value="{!a.name}" />
<apex:column value="{!a.industry}" />
</apex:pageBlockTable>
<apex:pageBlockButtons location="bottom">
<apex:outputPanel >
<apex:inputText value="{!flimit}" size="2" />
of<apex:inputText value="{!acount}" size="2"/>
disabled="{!flimit <=0}" />
disabled="{!flimit+size > acount }" />
</apex:outputPanel>
<apex:commandButton value="Previous" action="{!previous}"/>
<apex:commandButton value="Next" action="{!next}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
STANDARD
OBJECT FIELDS TO VFPAGE FOR INSERt
<apex:page standardController="Account">
<apex:form >
<apex:pageBlock title="My Content" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="My Content Section" columns="2">
<apex:inputField value="{!Account.Name}"/>
<apex:inputField value="{!Account.SLA__c}"/>
<apex:inputField value="{!Account.SLASerialNumber__c}"/>
<apex:inputField value="{!Account.SLAExpirationDate__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
STANDARD
OBJECT FIELDS TO VFPAGE FOR INSERt
<apex:page standardController="Opportunity">
<apex:form >
<apex:pageBlock title="My Content" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
<apex:commandButton action="{!edit}" value="Edit"/>
<apex:commandButton action="{!delete}" value="Delete"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="My Content Section" columns="2">
<apex:inputField value="{!Opportunity.Name}"/>
<apex:inputField value="{!Opportunity.CloseDate}"/>
<apex:inputField value="{!Opportunity.StageName}"/>
<apex:inputField value="{!Opportunity.Resource__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
TAB PANEL
USING CSS
<apex:page standardController="Account" recordSetVar="items">
<style>
.tab1{
width:120px;
height:30px;
color:blue;
}
</style>
<apex:tabPanel >
<apex:tab label="PageBlockTable" labelWidth="100" styleClass="tab1">
<apex:pageBlock title="PageBlockTable">
<apex:pageBlockTable value="{!items}" var="a">
<apex:column value="{!a.name}" />
<apex:column value="{!a.industry}" />
</apex:pageBlockTable>
</apex:pageBlock>
</apex:tab>
<apex:tab label="DataTable" labelWidth="100" styleClass="tab1">
<apex:pageBlock title="DataTable">
<apex:dataTable value="{!items}" var="a">
<apex:column value="{!a.name}" />
<apex:column value="{!a.industry}" />
</apex:dataTable>
</apex:pageBlock>
</apex:tab>
<apex:tab label="DataList" labelWidth="100" styleClass="tab1" >
<apex:pageBlock title="DataList">
<apex:dataList value="{!items}" var="a">
{!a.name}
</apex:dataList>
</apex:pageBlock>
</apex:tab>
<apex:tab label="Repeat" labelWidth="100" styleClass="tab1">
<apex:pageBlock title="Repeat">
<apex:repeat value="{!items}" var="a">
{!a.name}
</apex:repeat>
</apex:pageBlock>
</apex:tab>
</apex:tabPanel>
</apex:page>
TESTEXAM
<apex:page controller="testexam">
<apex:form >
<apex:PageBlock >
<apex:outputLabel Value="Entername"></apex:outputLabel>
<apex:inputText value="{!Name}"/>
</apex:PageBlock>
<apex:pageblock >
<apex:OutputLabel value="Your Entered Name Is"></apex:OutputLabel>
<apex:pageblockButtons >
<apex:commandButton Value="Save Name" Action="{!getname}"/>
{!s}
</apex:pageblockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
NewAndExistingController2
<apex:page controller="NewAndExistingController2" tabstyle="Account">
<apex:form >
<apex:pageBlock >
<apex:pageMessages />
<apex:pageBlockSection >
<apex:inputField value="{!Account.name}"/>
<apex:outputField value="{!Account.name}"/>
<apex:inputField value="{!Account.phone}"/>
<apex:outputField value="{!Account.phone}"/>
<apex:inputField value="{!Account.industry}"/>
<apex:outputText value="{!Account.industry}"/>
<apex:outputText />
</apex:pageBlockSection>
<apex:pageBlock >
<Apex:pageBlockSection >
<apex:pageBlockSectionItem >
<apex:OutputLabel Value="Sim Type"></apex:OutputLabel>
<apex:selectList required="true" size="1">
<apex:selectOption itemValue="one" itemLabel="Airtel"></apex:selectOption>
<apex:selectOption itemValue="two" itemLabel="BSNl"></apex:selectOption>
<apex:selectOption itemValue="three" itemLabel="Idea"></apex:selectOption>
<apex:selectOption itemValue="one" itemLabel="Vodafone"></apex:selectOption>
</apex:selectList>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:OutputLabel Value="Locaton "></apex:OutputLabel>
<apex:selectList required="true" size="1" >
<apex:selectOption itemValue="one" itemLabel="AP"></apex:selectOption>
<apex:selectOption itemValue="two" itemLabel="Telangana"></apex:selectOption>
<apex:selectOption itemValue="three" itemLabel="Tamilanadu"></apex:selectOption>
<apex:selectOption itemValue="one" itemLabel="Karnataka"></apex:selectOption>
</apex:selectList>
</apex:pageBlockSectionItem>
</Apex:pageBlockSection>
</apex:pageBlock>
<apex:pageBlockButtons location="bottom" onmouseup="Submit Ka Button">
<apex:commandButton value="Save" action="{!save}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
<apex:page controller="yerru8">
<apex:form >
<apex:PageBlock Title="Regs">
<apex:PageBlockTable Value="{!Regs}" Var="y">
<apex:column value="{!y.First_Name__c}" />
<apex:column value="{!y.Last_Name__c}" />
<apex:column value="{!y.Mobile__c}" />
<apex:column value="{!y.Status__c}" />
</apex:PageBlockTable>
</apex:PageBlock>>
</apex:form>
</apex:page>
No comments:
Post a Comment