Skip to content

Instantly share code, notes, and snippets.

<!-- Page: -->
<apex:page controller="vfc_lineSeries" showHeader="false" readOnly="true">
<apex:chart height="400" width="700" data="{!data}">
<apex:axis type="Numeric" position="left" fields="data1,data2"
title="Opportunities Closed" grid="true"/>
<apex:axis type="Category" position="bottom" fields="name"
title="Month of the Year"/>
<apex:lineSeries title="Closed-Won" axis="left" xField="name" yField="data1"
fill="true" markerType="cross" markerSize="4" markerFill="#FF0000"/>
<apex:lineSeries title="Closed-Lost" axis="left" xField="name" yField="data2"
public class vfc_legend{
public vfc_legend(){
}
public List<PieWedgeData> getPieData() {
List<PieWedgeData> data = new List<PieWedgeData>();
List<AggregateResult> opps = [SELECT SUM(Amount) monthlyRevenue, COUNT(Name) numOppsClosedWon,
CALENDAR_MONTH(CloseDate) theMonth
<apex:page controller="vfc_legend" sidebar="true" showHeader="false">
<apex:chart height="270" width="350" data="{!pieData}">
<apex:pieSeries dataField="data" labelField="data"/>
<apex:legend position="right"/>
</apex:chart>
</apex:page>
public class vfc_inputtext{
public string usern{get; set;}
public string email{get; set;}
public vfc_inputsecret(){
usern = '';
email = '';
}
<!-- Page: -->
<apex:page controller="vfc_inputtext" showHeader="false">
<apex:form>
<apex:pageBlock mode="edit">
<apex:pageBlockButtons>
<apex:commandButton value="Register" action="{!register}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Enter Your Details" columns="1">
<apex:inputText value="{!usern}" label="Username : "/>
<apex:inputText value="{!email}" label="Email : "/>
public vfc_inputsecret{
public string usern{get; set;}
public string pswd{get; set;}
public vfc_inputsecret(){
usern = '';
pswd = '';
}
<!-- Page: -->
<apex:page controller="vfc_inputsecret" showHeader="false">
<apex:form>
<apex:pageBlock mode="edit">
<apex:pageBlockButtons>
<apex:commandButton value="Login" action="{!login}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection title="Enter Your Details" columns="1">
<apex:inputText value="{!usern}" label="Username : "/>
<apex:inputsecret value="{!pswd}" label="Password : "/>
<!-- Page: -->
<apex:page standardController="Account" showHeader="false">
<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.site}"/>
public class vfc_input {
public Integer anInt {get;set;}
public Date anDate {get;set;}
public DateTime anDateTime {get;set;}
public DateTime anDateTimeLocal {get;set;}
public String anMonth {get;set;}
public String anWeek {get;set;}
public Time anTime {get;set;}
public String anEmail {get;set;}
<apex:page controller="vfc_input" doctype="html-5.0"
showHeader="false" standardStylesheets="false" id="page">
<apex:form id="form"
html-oninput="out.value = document.getElementById('page:form:range').value">
Range Field : <apex:input id="range" value="{!anInt}" type="range"
html-min="0" html-max="30" html-step="1"/>
<output name="out">0</output>
<br />
Date : <apex:input id="date" value="{!anDate}" type="date" />
<br />