You need to sign in to do that
Don't have an account?
Roger Pavelle
Several PanelGrid/PanelGroup questions
I am having several issues when using a combination of PanelGrid and PanelGroup:
1) I have two PanelGroup tags inside the PanelGrid. How to I get them to both top align?
2) How do I get the two PanelGroups to fit nicely on a page. While I could try setting the width attribute, I am planning on putting this page into a mobile app and therefore don't want to specify something that may not be practical in use.
3) One of the PanelGroup tags has many collapsible PageBlockSection tags. When I added them to the PanelGroup they no longer collapse. What do I need to do to make them collapsible once again?
Thanks.
1) I have two PanelGroup tags inside the PanelGrid. How to I get them to both top align?
2) How do I get the two PanelGroups to fit nicely on a page. While I could try setting the width attribute, I am planning on putting this page into a mobile app and therefore don't want to specify something that may not be practical in use.
3) One of the PanelGroup tags has many collapsible PageBlockSection tags. When I added them to the PanelGroup they no longer collapse. What do I need to do to make them collapsible once again?
Thanks.
Here you go. Feel free to tweak it as needed.
I didn't format it so you can see partly what I did (all lines that are not formatted)
Thx
All Answers
1) I have two PanelGroup tags inside the PanelGrid. How to I get them to both top align?
top align? Well, just make sure the PanelGrid has at least 2 columns.
2) How do I get the two PanelGroups to fit nicely on a page. While I could try setting the width attribute, I am planning on putting this page into a mobile app and therefore don't want to specify something that may not be practical in use.
fit nicely on a page? nicely a relative term, if 1) is working I assume then it fits nicely.
3) One of the PanelGroup tags has many collapsible PageBlockSection tags. When I added them to the PanelGroup they no longer collapse. What do I need to do to make them collapsible once again?
Can you provide code samples? I don't have any issues with collapsible pageblocksection inside of Panelgroup.
Thx
<apex:panelGrid columns="2" >
<apex:panelGroup >
<apex:outputPanel styleClass="black" layout="block">
<apex:pageBlockSection title="Edibility Filters" columns="1" collapsible="true">
<apex:inputCheckbox label="Choice" id="edibilityChoiceChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="0"/>
</apex:actionSupport>
</apex:inputCheckbox>
<apex:inputCheckbox label="Good" id="edibilityGoodChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="1"/>
</apex:actionSupport>
</apex:inputCheckbox>
<apex:inputCheckbox label="Iffy" id="edibilityIffyChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="2"/>
</apex:actionSupport>
</apex:inputCheckbox>
<apex:inputCheckbox label="Avoid" id="edibilityAvoidChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="3"/>
</apex:actionSupport>
</apex:inputCheckbox>
</apex:pageBlockSection>
</apex:outputPanel>
Below is a screenshot from the page preview. Note that the Search Results is correctly in the second panel, but is not showing up at the top of the panel. Also, the two panels only seem to take up half of the screen (which also causes the checkbox labels to wordwrap). Also, as I mentioned in the original email, the section labels should be collapsible, but they don't collapse when you click on them.
Thx
The collapsible works fine for me:
By the way, I suggest you post your issues separately as 3 questions: and provide enough information for the folks helping to be able to answer your questions.
Thx
1) Note that the Search Results is correctly in the second panel, but is not showing up at the top of the panel.
What search results, what top panel?
2) Also, the two panels only seem to take up half of the screen (which also causes the checkbox labels to wordwrap).
Which 2 panels?
3) Also, as I mentioned in the original email, the section labels should be collapsible, but they don't collapse when you click on them.
It works for me (see screen print) so it's likely not the PanelGroup that is causing the issue.
<apex:page setup="false" controller="BoleteController" sidebar="false">
<apex:form >
<apex:pageBlock title="Bolete Filtered Search">
<apex:panelGrid columns="2" >
<apex:panelGroup >
<apex:outputPanel styleClass="black" layout="block">
<apex:pageBlockSection title="Edibility Filters" columns="1" collapsible="true">
<apex:inputCheckbox label="Choice" id="edibilityChoiceChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="0"/>
</apex:actionSupport>
</apex:inputCheckbox>
...
<apex:inputCheckbox label="Avoid" id="edibilityAvoidChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="3"/>
</apex:actionSupport>
</apex:inputCheckbox>
</apex:pageBlockSection>
</apex:outputPanel>
<!--end Edibility filters-->
<apex:outputPanel styleClass="black" layout="block">
<apex:pageBlockSection title="Pore Filters" columns="1">
<apex:pageBlockSection title="Pore Color Filters: Primary Pore Color Is..." columns="1">
<apex:inputCheckbox label="Red, Pink, Purple or Orange" id="poreColorRedChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="4"/>
</apex:actionSupport>
</apex:inputCheckbox>
...
<apex:inputCheckbox label="Black, Dark Brown or Dark Gray" id="poreColorBlackChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="8"/>
</apex:actionSupport>
</apex:inputCheckbox>
</apex:pageBlockSection>
<apex:pageBlockSection title="Pore Size Filters" columns="1">
<apex:inputCheckbox label="Pores Tiny" id="poreSizeTinyChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="9"/>
</apex:actionSupport>
</apex:inputCheckbox>
<apex:inputCheckbox label="Pores Huge" id="poreSizeHugeChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="10"/>
</apex:actionSupport>
</apex:inputCheckbox>
</apex:pageBlockSection>
<apex:pageBlockSection title="Pore Staining Filters: Pores..." columns="1">
<apex:inputCheckbox label="Do Not Stain in 30 Seconds" id="poreStainNoChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="11"/>
</apex:actionSupport>
</apex:inputCheckbox>
...
<apex:inputCheckbox label="Stain Other Than Blue" id="poreStainOtherChk" >
<apex:actionSupport action="{!setChkBoxValue}" event="onchange" rerender="bolete_list">
<apex:param name="boxNum" value="13"/>
</apex:actionSupport>
</apex:inputCheckbox>
</apex:pageBlockSection>
</apex:pageBlockSection>
</apex:outputPanel>
<!--end Pore filters-->
...
</apex:panelGroup>
<apex:panelGroup >
<!-- bolete search result list -->
<apex:pageBlock title="Search Results" id="bolete_list">
<apex:outputText >{!showResultSize} of {!showRecordSize} records displayed</apex:outputText>
<br/>
<apex:pageBlockTable value="{! Boletes }" var="bol" style="width: 100%">
<apex:column width="75">
<apex:outputLink value="/apex/boleteDetailView?id={!bol.Id}" id="viewLink">
View
</apex:outputLink>
</apex:column>
<apex:column width="75">
<apex:image id="imageURL" url="{!bol.ImageURL__c}" height="75"/>
</apex:column>
<apex:column value="{! bol.genus__c }">
<apex:facet name="header">
<apex:commandLink action="{! sortByGenus }" reRender="bolete_list">Genus
</apex:commandLink>
</apex:facet>
</apex:column>
<apex:column value="{! bol.species__c }">
<apex:facet name="header">
<apex:commandLink action="{! sortBySpecies }" reRender="bolete_list">Species
</apex:commandLink>
</apex:facet>
</apex:column>
<apex:column value="{! bol.Common__c }"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:panelGroup>
</apex:panelGrid>
</apex:pageBlock>
</apex:form>
</apex:page>
Here's another screenprint that better shows the two panels. I want the search results to show up at the top of the panel (same height as the Pore Filters is showing):
What is it you ultimately want it to look like?
You can paste it in Paint and rearrange to you desire state.
Based on that I can give you pointers.
Thx
And, as I mentioned, for some reason the collapsible sections don't collapse, so I want that working again as well.
Here you go. Feel free to tweak it as needed.
I didn't format it so you can see partly what I did (all lines that are not formatted)
Thx
Was there also something to move the Search Results panel to the top of the page?
Glad it all worked out. Be sure to choose best answer to indicate this question is resolved.
Thx