You need to sign in to do that
Don't have an account?
KeithJ
rendered attribute for pageBlockSection not working for me
Hi there.
I am utilizing the pageBlockSection component and would like to render
it if a selectList (dynamically populated) is not empty.
Alas, it will not work.
Below is the section of my VF page that shows the pageBlockSection with the rendered attribute. I have double checked
and the variable isProductCategoryNotNone changes accordingly, but the pageBlockSection always remains invisble....
Any ideas? I use this variable earlier in my code to show another list and it works fine but wont work for the pageBlockSection.
Thanks
I am utilizing the pageBlockSection component and would like to render
it if a selectList (dynamically populated) is not empty.
Alas, it will not work.
Below is the section of my VF page that shows the pageBlockSection with the rendered attribute. I have double checked
and the variable isProductCategoryNotNone changes accordingly, but the pageBlockSection always remains invisble....
Any ideas? I use this variable earlier in my code to show another list and it works fine but wont work for the pageBlockSection.
Thanks
Code:
<!-- Define the Products List now... -->
<apex:pageBlockSectionItem >
<apex:outputPanel id="productLabelPanel">
<apex:outputLabel value="Products" for="productsList" rendered="{!isProductCategoryNotNone}" />
</apex:outputPanel>
<apex:outputPanel id="productListPanel">
<apex:selectList value="{!selectedProduct}" multiSelect="false" size="1" rendered="{!isProductCategoryNotNone}" id="productsList">
<!-- Add the products to the page for the selected Category -->
<apex:selectOptions value="{!allProducts}" />
<!-- Add an actionSupport to query for all Constituents for the selected product -->
<apex:actionSupport event="onchange" action="{!queryForSKUs}" status="queryStatus" rerender="SKUTable" />
</apex:selectList>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection title="Available SKU's" columns="1" rendered="{!isProductCategoryNotNone}">
<apex:pageBlockTable columns="5" id="SKUTable" var="skuRecord" value="{!skuRecordsList}">
<apex:column>
Thanks for the reply.
I'm looking to use a pageBlockSection instead of an outputPanel.
I can't understand why it won't work.
Seems straightforward and the debug log shows that the boolean is changing as required...
Had to do a rerender on the outermost pageBlock.
Why....? I have no idea, but it works
Make sense? A little confusing at first but you have to make sure that what you're rerendering on your page is actually going to be there.
It does make sense in fact.
I'll make sure to duly note that one for future reference.
I'm sure this kind of thing will come up again and again,
Best regards
Hi KeithJ,
How to rerender at the outermost pageBlock in your case ?
Thank you !