Posts

Showing posts from 2017
Image
Lightning Visualforce .NET Framework Coding Thoughts Integration Developer Certification Apex Code Sara Has No Limits Good Programmers Evaluate, Simplify, Automate and Document About No Limits About Sara Morgan Nettles Top 5 Tips for Improving Visualforce Pages July 14, 2014 7 Comments #1 – Reduce or eliminate view state   View State is not your friend when it comes to page performance, so if you do not need it (as in your page does need to persist data between page requests), then do not use it at all. This is especially true for pages that will run on the Salesforce1 mobile platform!!! How do you not use it all? Do not include the <apex:form> tag unless you absolutely have to . This tag should only be used when you are accepting input from the user, so if you are only displaying data to the user, you should not have a for...
What is View State? Since HTTP is a stateless protocol, any web application that needs to maintain state between page requests has to deal with how to handle View State. Visualforce handles it by using a hidden form element. Data in components and controllers are stored in an encrypted and hidden field on your page (see image below) that must be serialized and deserialized every time the Visualforce page is requested. Large view state sizes can quickly cause pages to suffer performance problems. Additionally, the Force.com platform limits your pages to a maximum view state size of 135Kb.
2. Transient Keyword – View State – Visualforce – Salesforce salesforce by Nitish Singhal Transient Keyword – View State – Visualforce – Salesforce We can use transient keyword with apex class’s instance variables when we want that values of those variables should not be transferred as part of the view state of visualforce page. This helps us reducing the view state of visualforce page. As we all know that, there is a limit of 135KB of view state and many times this “ Transient ” keyword helps us to reduce the view state. There are certain points that we should consider while using the transient keyword: The value of transient variable is only transferred from controller to visualforce page but not as part of view state. As the value is not part of view state, the changed value of that variable is not transferred back from visualforce page to controller when a new request is made by clicking a button or link. We should use the transient keyw...

salesforce

What is  Transient Variable in Salesforce? Transient Variable in Sales force:         Transient keyword to declare instance variable that can not be saved and should not transmitted as part of view state for visual force page. View state   maintains state of the Database between request and visual force page.      Given below example is use of transient variable where we have created two Date Time and populating. Refresh button is using for refresh the VF page however only time T2 will change at because of this is declare as transient. VF Pag   <apex:page controller="ExampleController">   T1: {!t1} <br/>   T2: {!t2} <br/>   <apex:form >     <apex:commandLink value="refresh"/>   </apex:form> </apex:page> Controller : public class ExampleController {     DateTime...