Salesforce Q&A Part 6:

Visualforce Q&A:

Q) Mention the components used by you in normal VF pages.
Ans. The following components were used in my VF pages.
<apex:page/>
<apex:pageBlock/>
<apex:pageBlockSection/>
<apex:pageBlockTable/>
<apex:repeat/>
<apex:commandButton/>
<apex:commandLink/>
<apex:includeScript />
<apex:inputField. />
<apex:outputLabel/field/panel  /> etc.

Q) Difference between PageTable and Data Table.
Ans. 
PageBlockTable
DataTable
It must be defined in pageblock/pageblocksection.
Anywhere in the page.
standard styles sheets can be used for designing a VF page. custom style sheets can be used.
It has the  required attribute "value". There is no required value.
Column headers  will be displayed automatically. Need to specify column headers explicitly.

Q) What are the controllers used in Vf page?
Ans. Standard controller, Custom controller and Controller extensions

Q) What is Standard list controller? 

Standard List controller is used for displaying the records in VF page in pagination by adding an attribute in 'recordVar = true'.

Q) Controller vs Extensions.
Controller can Exist with or without Extensions.
Extensions needs a controller with which it will be extended.

Q) Why are Controllers/Extensions used?
They are used to provide control over data with implemented business logic to the end user or the data that has to be saved to data models(sObjects).

Q) What are Ajax methods? 
Ajax methods are small JS/Jquery implementation that supports partial page changes without  a full page refresh.

Q) Difference b/w Action function and action support.
Action support is used to control any JS action on vf page. Action support tend to call a method from Apex for control/logic.

Q) Example of Ajax used in VF.
Action Region, Action support, Action function, Action poller etc.

Q) How to reduce view state?
By using transient keywords to variables not required in view, Avoiding nested for loops and effective SOQL queries.

Q) What is VF remoting?
VF remoting is used to display larger set of data in VF page by using @RemoteAction in static Apex method.

Comments

Popular posts from this blog

Salesforce Q&A Part 1:

Salesforce Q&A Part 2:

Salesforce Q&A Part 7: