Posts

Showing posts from October, 2018

What are the types of bindings available in Salesforce Visualforce?

There are three types of bindings used in Visualforce. Data binding Action bindings Component bindings 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.

Interfaces salesforce

An  interface   is like a class in which none of the methods have been implemented—the method signatures are there, but the body of each method is empty. To use an interface, another class must implement it by providing a body for all of the methods contained in the interface. Interfaces can provide a layer of abstraction to your code. They separate the specific implementation of a method from the declaration for that method. This way you can have different implementations of a method based on your specific application. Defining an interface is similar to defining a new class. For example, a company might have two types of purchase orders, ones that come from customers, and others that come from their employees. Both are a type of purchase order. Suppose you needed a method to provide a discount. The amount of the discount can depend on the type of purchase order. You can model the general concept of a purchase order as an interface and have specific implementations fo...

How to resolve the View State Error ?

View State :   Visualforce pages that contain a form component also contain an encrypted, hidden form field that encapsulates the view state of the page. This view state is automatically created, and as its name suggests, it holds the state of the page - state that includes the components, field values, and controller state. In Visualforce, page state is persisted as a hidden form field that is automatically inserted into a form when the page gets generated. We call this the view state of the page. The view state captures the state of the page -- state of its associated controllers and extensions and the component tree on the page. The view state is posted back along with the other form data, which gives the server enough information to recreate the page state to which new changes can be applied . What is Contained in the View State: The data in the view state should be sufficient to recreate the state of the page when the postback is received. To do this, it stores the followin...