Friday, 17 August 2018

How to use ISBLANK function in visuaforce page ?

Hi All,

Just a brief what isblank method does.

isBlank(inputString)

Returns true if the specified String is white space, empty (''), or null; otherwise, returns false.
How to render a particular component based on the string value defined in the controller. if that string is null or blank dont rerder component.
In the class say the variable name is
Public String sStringBlankField{get;set;}  
In the visualforce page use it like below
 <apex:outputpanel  rendered = "{!len(sStringBlankField)>0 || sStringBlankField!=null}">
 </apex:outputpanel

No comments: