You need to sign in to do that
Don't have an account?
bujji
Regarding Apex Message tab
Hi,
i have a field called "err" which of type 'String' in controller if its value is null then i have to display some message in visual force page. If it is not null than no message has to be displayed.
How can we do it. I tried but i am not getting.
<apex:pageMessage summary="{!Err}" severity="warning" rendered="IF(ISBLANK({!Err}),true,false)" id="errID" />
It is urgent.
Thanks,
Bujji
Hi ,
You can easily do this with rerenedred
<apex:form >
<apex:pageBlock id="header">
<apex:pageMessage summary="hello this is message" severity="warning" rendered="{!lstCon.size>0}" id="errID" />
</apex:pageBlock>
<apex:commandButton value="myBtn" reRender="header" action="{!populateData}"/>
</apex:form>
</apex:page>
And your class
public with sharing class AllCasesCon {
public PageReference populateData() {
lstCon=[select id,firstname,lastname from contact limit 10000];
return null;
}
public list<contact> lstCon{get;set;}
public String AllCasess { get; set; }
public user cuser{get;set;}
public AllCasesCon(){
lstCon=new list<Contact>();
}
}
All Answers
Try this and let me know if it works :
<apex:pageMessage summary="{!Err}" severity="warning" rendered="{!AND(Err != Null, Err != '')}" id="errID" />
Hi,
There is no true,false options. even though it is not working.
Bujji.
Hi,
Please tell me suppose if i have a command button, if click the button than some page block section item has to display else it should not and intially it will be in disabled mode.
Is it possible.
Thanks,
Bujji
Are you rerendering the section you want to show and hide on click of the button? You need to re-render the sections in order for rendered to work if your data is changing from server side.
Hi ,
You can easily do this with rerenedred
<apex:form >
<apex:pageBlock id="header">
<apex:pageMessage summary="hello this is message" severity="warning" rendered="{!lstCon.size>0}" id="errID" />
</apex:pageBlock>
<apex:commandButton value="myBtn" reRender="header" action="{!populateData}"/>
</apex:form>
</apex:page>
And your class
public with sharing class AllCasesCon {
public PageReference populateData() {
lstCon=[select id,firstname,lastname from contact limit 10000];
return null;
}
public list<contact> lstCon{get;set;}
public String AllCasess { get; set; }
public user cuser{get;set;}
public AllCasesCon(){
lstCon=new list<Contact>();
}
}