Visualforce Interview Questions and Answers
Using methods we can bind.
Getter:Will return value from controller to vf page
Setter:Will pass value from vf page to controller
Action:Will redirect to another page.
Q). What is the purpose of controllers?
Controllers
provide the data and actions that are available to a Visualforce page.
Q). Which
objects have associated standard controllers?
All
standard and custom objects that can be accessed via the API have associated
controllers
Q). What is
included with each standard controller?
Data: the
fields for the associated object record that are API accessible, including the
related records (5 up/1 down). Actions: save, delete, view, edit, cancel.
Q). When do you
need to go beyond a standard controller and code custom Apex?
If you
need data beyond the limits of what is available in the standard controller or
actions that go beyond the provided standard actions.
Q).Compare
and contrast custom controllers and controller extensions. How are they
the same? How are they different?
Both
allow for custom code to be used, allowing for custom data sets and custom
actions. Extensions leverage the existing data and actions within a
standard or custom controller. Custom controllers must contain all data
and actions that need to be executed by the page. Extensions that extend
standard controller allow for the pages which use those extensions to be used
in custom buttons, standard button overrides, and over declarative features.
Q), What
identifies a controller as being an extension?
The
controller must declare a constructor which takes another controller
explicitly. For example: public
myControllerExtension(ApexPages.StandardController stdController) {this.acct =
(Account)stdController.getRecord(); }
Q). Why
are properties helpful in controllers
Properties
can automatically create standard getters and setters while still allowing for
their customizations. They save you from both writing the tedious code and
reading the clutter when reviewing code.
Q).In what
order do methods fire within a controller?
The only
rule is that setters fire before action methods. Aside from that, there
is no guaranteed order.
Q).What are
some Apex classes that are commonly used within controllers?
StandardController,
SelectOption, PageReference, Message, etc.
Q). How are wizard controllers
different from other controllers?
The two
main issues is that they must handle multiple pages and they must maintain the
state across those pages.
Q). What are
the effects of using the transient key word?
The
transient key word prevents the data from being saved into the view
state. This should be used for very temporary variables.
Q). When
is a component controller required for custom components?
A
component controller is required when business logic is required to decide how
to render the component.
Q), What kind
of content can be included in a Visualforce page?
Any
content that can be rendered in a browser (HTML, JavaScript, etc.).
Q). What
do {!expressions} refer to when used in Visualforce components?
Expressions
refer to either data or actions that are made available to the page from the
controller
Q).What
are the ways that Visualpages can be incorporated into the rest of your user
interface?
Basically,
via links, buttons, tabs, and inline frames.
Q), Is it
always necessary to know Apex to create Visualforce pages? When does it
become necessary?
No,
it is not always necessary. You can use standard controllers and VF
component tags to accomplish quite a bit. Apex becomes necessary when you
need either a custom set of data or custom actions to be available from the
page.
Q). What are attributes? What is
the syntax for including them?
Attributes
are modifiers to the main tag that belong after the tag name in the start
tag. The syntax is attributeName=“attributeValue”
Q). What are three types of bindings used in
Visualforce? What does each refer to?
Data bindings refer to the data set in the
controller.
Action
bindings refer to action methods in the controller.
Component
bindings refer to other Visualforce components
Q).What is
the main difference between using dataTable vs. pageBlockTable tags?
PageBlock:
For default salesforce standard format.
dataTable:To design customformats
Q).Which
tag is used with both radio buttons and picklists to create the selectable
values?
<Apex:selectoption>
tag
Q).How
many controllers can a page have? Where is the controller for a page
assigned?
One main
controller (of course, it could have extensions or custom components could have
controllers, etc.). The controller is assigned in the <apex:page>
tag.
Q).There are
a series of layout components that all help recreate the traditional Salesforce
page layout style very easily. What name do they share?
pageBlock.
Q), Which
tags should be used to automatically bring in the Salesforce label and default
widget for a field?
Q). What are static resources?
Static
resources are a new type of storage in Salesforce specifically designed for use
in Visualforce pages. They are ways to store images, flash files,
stylesheets, and other web resources on the Salesforce servers that can be
cached for better page performance.
Q). What are
some examples of JavaScript Events?
Q). What
is AJAX typically used for in Visualforce
AJAX is
primarily used for partial page updates in Visualforce. In s-controls,
the AJAX toolkit was the soap (XML over HTTP) client that gave you access to
the force.com Web Services API.
Q). What is
the purpose of <script> tags?
Script
tags allow you to create JavaScript (or other types) functions that can be used
within your pages
Q), What are
the different AJAX action tags? What does each do?
·
actionStatus:
used to display start and stop statuses of AJAX requests.
·
actionSupport:
used to call a second component when an event happens to the first component.
·
actionPoller:
similar to actionSupport, but the event is based on a timer instead of a user
action.
·
actionFunction:
provides support for invoking a controller action from JavaScript code using an
AJAX request by defining a new JavaScript function.
·
actionRegion:
used to demarcate which parts of the page the server should reprocess.
Q), How
can you create partial page refreshes?
Basically,
you need to define the section of the page that is going to refresh (typically
with a panel of sorts), and then define the event that will cause the
refresh. The method changes depending on if the area being refreshed is
the same as the one handling the event. It also depends on if you are
just processing something on the server, or if you need the UI to change.
Q). Which tag
is used with both radio buttons and picklists to create the selectable values?<apex:selectOption>
Q). What is the purpose of creating attributes on
components?
By
allowing the component to take parameters via an attribute, you can make the
component more flexible and reusable
Q). How can you access visualforce
components values into a JavaScript?
Using Component
global variable, we can access visualforce components in javascript. Let us
suppose, we want to use id of an apex field with id=”afield”.
So, we
can use the {!$Component.afield} syntax to use properties of the field in
javascript.
Let us
suppose, we want to store the field’s value in java script, then we can use
like below:
<script>
Var a =’ document.getElementById('{!$component.afield}').value’;
</script>
Q), What
are the Gov Limits in Salesforce.com?
Because
Apex runs in a multitenant environment, the Apex runtime engine strictly
enforces a number of limits to ensure that runaway
scripts do not monopolize shared resources. These limits, or governors,
track and enforce the statistics outlined in the following table. If a script
ever exceeds a limit, the associated governor issues a runtime exception that
cannot be handled.
Governor
limits can be extended from release to release.
Trigger
|
Class
|
Test
|
|
Total number of SOQL’s
|
20
|
100
|
100
|
Total number
of
SOSL’s
|
0
|
20
|
20
|
Total number of records Retrieved by single SOQL
Query
|
1000
|
10000
|
500
|
Total number of records Retrieved by single SOSL
Query
|
0
|
200
|
200
|
Total Number Of Call out Methods
|
10
|
10
|
10
|
Total number of send email methods allowed
|
10
|
10
|
10
|
Total Heap Size
|
300000 Bytes
|
3MB
|
1.5MB
|
Q).What are the Global
Key words?
We have global keywords like component,User,url,current page
etc., to access various values from
components on page, from user object or from url or from current page
fields. To access value from each source, we have different global keywords.
One such keyword is explained in above question(!$component)
Various global keywords are:
i. URL
ii.USER
iii. PROFILE
iv. Resource
v. Component
vi.Current
page
vii.Page reference etc.
13 comments:
Hi, I have all latest dumps of salesforce for all types of salesforce exams if anyone wants you can mail me at
sfdcconsultant25@gmail.com
These are original questions from the certification exam and very useful to pass the exam.
I have all latest dumps of following exams
90% questions come from it
Salesforce Administrator (ADM 201)
Salesforce Sales Cloud Consultant (CON 201)
Salesforce Service Cloud Consultant
Platform Developer I
App Builder
Immediately i will sent dumps latest one,which helps you to pass
I will give you as-surety for all latest dumps
Excellent blog admin, really helpful to me. I have bookmarked this page for my future reference. Share more like this.
Salesforce Training in Chennai | Salesforce Training
Excellent blog admin, this is what I have looked for.
Salesforce Course in Chennai | Salesforce Training in Chennai
Helpful post.
Aws Certification in Chennai
Excellent blog admin. This is what I have looked for, share more like this.
AWS Course in Chennai
One of the best blogs that I have read till now. Thanks for your contribution in sharing such a useful information. Waiting for your further updates.
IELTS Coaching in Chennai
IELTS Training in Chennai
IELTS Coaching Centre in Chennai
Best IELTS Coaching in Chennai
IELTS Coaching Center in Chennai
Best IELTS Coaching Centres in Chennai
IELTS Classes near me
This is really too useful and have more ideas and keep sharing many techniques. Eagerly waiting for your new blog keep doing more.
cloud computing courses in bangalore
cloud computing training in bangalore
Aws Training in Bangalore
Aws Course in Bangalore
cloud training in bangalore
cloud computing institutes in bangalore
best cloud computing institute in bangalore
Thank you for sharing such great information very useful to us.
Cloud Computing Training in Delhi
For all Latest Salesforce dumps trusted by many clients reach out to Rakesh -rakesh.sdna@gmail.com
I will provide dumps with answers and it gets updated after every release.
I also have exact screenshots from the exam for few exams.
Wonderful article, thanks for putting this together! This is obviously one great post
nice blog.
salesforce-training-in-kukatpally
salesforce-training-in-hyderabad
salesforce-training-in-madhapur
salesforce-training-in-kphb
salesforce-training-in-hitechcity
Great Article
IEEE Projects on Cloud Computing
Final Year Projects for CSE
JavaScript Training in Chennai
JavaScript Training in Chennai
Salesforce is such a flexible platform, it is certainly possible to build a database and data structure that represents the workflows that are inherent in fundraising, LP administration, investor management, deal tracking, and portfolio management.
Salesforce Service Cloud
Post a Comment