Skip to main content

Posts

Showing posts from April, 2013

Dynamic Field Binding in Salesforce

This tip is useful when we are going to display different field for different users . We can avoid non empty field from displaying in visualforce page by using rendered property.   We can write  rendered="{!IF(NOT(ISNULL(Field)),true,false)}". If field has some value then condition becomes true , that means rendered is true . So field is displayed .  Its a simple one , then  what is the use of this tip ...?   Suppose we have 20 fields in an object and an user wants to display those fields which has some value . So we will do easily using rendered property . But we have to write rendered property in every field . is not this a clumsy one...?  We always write short code satisfying our requirement . what If we use that rendered property only once to solve our requirement. is not it easy...?   Here is my page code...   <apex:page controller="Renderfieldcontroller">   <apex:...