vf ppt (1)

18

Upload: preeti-mohanty

Post on 02-Feb-2015

522 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Vf ppt (1)
Page 2: Vf ppt (1)

Agenda

Visualforce Overview

Visualforce Benefits

Visualforce Page Architecture

Page 3: Vf ppt (1)

Visualforce System Architecture (Development Mode)

Page 4: Vf ppt (1)

Visualforce System Architecture (User Mode)

Page 5: Vf ppt (1)

Visualforce benefits

User-friendly development

Integration with other Web-based user interface

technologies

Model-View-Controller (MVC) style development

Concise syntax

Automatically upgradeable

Page 6: Vf ppt (1)

Model View Controller Pattern

Page 7: Vf ppt (1)

Visualforce – MVC Breakdown

Page 8: Vf ppt (1)

Developers can use Visualforce pages to:

Override standard buttons, such as the New button for

accounts, or the Save button for contacts

Override tab overview pages, such as the Accounts

tab home page

Define custom tabs

Create dashboard components or custom help pages

Customize, extend, or integrate the sidebars in the

Service Cloud console (custom console components)

Page 9: Vf ppt (1)

Displaying Field Values with Visualforce

Visualforce pages use the same expression language

as formulas—that is, anything inside {! } is evaluated as

an expression that can access values from records that

are currently in context. For example, you can display

the current user's first name by adding the {!

$User.FirstName} expression

Page 10: Vf ppt (1)

Controllers

A Visualforce controller is a set of instructions that

specify what happens when a user interacts with the

components specified in associated Visualforce

markup, such as when a user clicks a button or link.

Controllers also provide access to the data that should

be displayed in a page, and can modify component

behavior.

Types of Controllers :-

1. Standard Controller

2. Custom Controller

3. Extension

Page 11: Vf ppt (1)

Controllers

Visualforce markup can use the following types of

controller extension and custom controller methods:

• Action

• Getter

• Setter

Page 12: Vf ppt (1)

Order of Execution in a Visualforce Page

There are two types of Visualforce page requests:

• A get request is an initial request for a page either made

when a user enters an URL or when a link or button is

clicked that takes the user to a new page.

• A postback request is made when user interaction

requires a page update, such as when a user clicks on

a Save button and triggers a save action.

Page 13: Vf ppt (1)

Order of Execution in a Visualforce Page get request.

Page 14: Vf ppt (1)

Order of Execution in a Visualforce Page Post Request.

Page 15: Vf ppt (1)

Using JavaScript and CSS in Visualforce Pages

Using JavaScript in Visualforce pages gives you

access to a wide range of existing JavaScript

functionality,

Page 16: Vf ppt (1)

Some Tags of VisualForce :-

1. <apex:page> calls an action when the page is loaded

2. <apex:actionFunction> defines a new JavaScript function that

calls an action

3. <apex:stylesheet value="{!$Resource.<filename>}"/>

4. <apex:outputText>

5. <apex:commandButton> creates a button that calls an action

6. <apex:commandLink> creates a link that calls an action

7. <apex:actionSupport> makes an event (such as “onclick”,

“onmouseover”, and so on) on another, named component,

call an action.

Page 17: Vf ppt (1)

Some Tags of VisualForce :-

8. <apex:pageBlock >

9. <apex:pageBlockTable value="{!accounts}" var="a">

10. <apex:column value="{!a.name}"/>

11. <apex:form id="theForm">

Page 18: Vf ppt (1)

Demos