You need to sign in to do that
Don't have an account?
Sascha Deinert
Rendered doesn't work
Hi,
If I try to rendered the code below it doesn't work.
If I show me size of the list I will get the value 1, but nothing is happen.
Where is the mistake?
I tried it also with != NULL .isempty etc., the same problem.
Thanks,
Sascha
If I try to rendered the code below it doesn't work.
If I show me size of the list I will get the value 1, but nothing is happen.
Where is the mistake?
I tried it also with != NULL .isempty etc., the same problem.
<div id="accDetailL"> <apex:pageblock title="Unternehmen Detail" id="pbAccDL"> <apex:pageblocktable value="{!AccDList2}" var="AccD" rendered="{!IF(AccDList2.size != 0, true, false)"> <apex:column style="font-size:16pt; font-weight: bold" headerValue="" value="{!AccD.Name}"/> </apex:pageblocktable> <apex:pageblocktable value="{!AccDList2}" var="AccD" columnswidth="50%, 25%, 25%"> <apex:column value="{!AccD.BillingStreet}"/> <apex:column value="{!AccD.BillingPostalCode}"/> <apex:column value="{!AccD.BillingCity}"/> </apex:pageblocktable> </apex:pageblock>
Thanks,
Sascha
All Answers
Just try the below code,
Is rendering needs to happen on page load ?
Thanks,
Singh
doesn't work.
@Dilip,
Ok, but how can I do that?
I add the line RETURN ApexPage.CurrentPage, but the block is not rerendered.
But I don't know why it not works, because I have in the same page the code below in it works fine.
Just one is different, I can use NULL this is with the code above not possible.
Thanks,
Sascha
There is no need of the two methods, try something like this:
<apex:pageBlock >
<apex:pageBlockTable value="{!acclist}" var="acc" rendered="{!acclist.size != 0}">
<apex:column value="{!acc.Name}"/>
</apex:pageBlockTable>
</apex:pageBlock>
public List<Account> acclist {get; set;}
public vfRenderedExtension(ApexPages.StandardController controller) {
acclist = [Select Id, Name from Account Limit 1];
}
There is no need of IF condition in the Rendered attribute and also no need of pageRef as well. just make sure the list is declared as property.
If I add the code to my controller I get the error
Invalid constructor name: vfRenderedExtension
All my classes and methods are in a customcontroller.
vfRenderedExtension is constructor in my class.
You modify that according to your class name
Rerender doesn't work, but the size of the list is 1, but nothing is happen.