+ Start a Discussion
SharadSharad 

rendered attribute is not working

Following is the code, I am printing the value of {!noOfBids} just to make sure that function in controller is working fine and returning the correct value. It does return a value which is greater than 0, still the block does not show up. If I remove this condition, it shows fine. Is this a Bug or I am doing something incorrect.

 

{!noOfBids} <apex:pageBlock rendered="{!noOfBids} > 0"> <apex:pageblockTable value="{!formalBids}" var="bids" border="2" width="100%" > <apex:column .... /> <apex:column .... /> </apex:pageblockTable> </apex:pageBlock>

 

Best Answer chosen by Admin (Salesforce Developers) 
dchasmandchasman
Visualforce should ideally have given you a compile time error because your supplied expression does not result in a boolean value. Try switching to something like {!noOfBids > 0}.

All Answers

dchasmandchasman
Visualforce should ideally have given you a compile time error because your supplied expression does not result in a boolean value. Try switching to something like {!noOfBids > 0}.
This was selected as the best answer
SharadSharad

Thanks ! Your solution worked but earlier one did not produce any compile error as you mentioned.

 

Thanks for your help. Is there any way to adjust the height according to the page's content as I specified in my previous post :)

 

 

Thanks !

Sharad

mtbclimbermtbclimber
Please don't try to mix thread topics.  That makes it hard for people with a similar issue in the future to find the solution.