8

After doing some changes to the view by adding apex:pageblocksection and apex:pageblocksectionitem i am getting the error as given below. Am i doing anything wrong here? Any suggestions please.

<apex:pageBlockSectionItem> may have no more than 2 child components

    <div id="accordion">
        <h3>Input - Please enter selection Parameters</h3>
            <div>
                <apex:pageblocksection columns="4">
                    <apex:pageblocksectionitem>
                        <table width="100%" border="0" height="200px">
                            <thead>
                                    <tr>
                                        <th colspan="2">Filters</th>
                                    </tr>
                            </thead>
                            <tr>
                                <td colspan="2"><hr /></td>
                            </tr>

                            <tr>
                                <td>Account Name:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtAccName"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Account Rating:</td>
                                <td>
                                    <apex:selectList value="{!SelectRating}" size="1">
                                            <apex:selectOptions value="{!RatingList}"></apex:selectOptions>
                                        </apex:selectList>
                                </td>
                            </tr>
                            <tr>
                                <td>Partner Type</td>
                                <td>
                                    <apex:selectList value="{!SelectPartner}" size="1">
                                            <apex:selectOptions value="{!PartnerTypeList}"></apex:selectOptions>
                                        </apex:selectList>
                                </td>
                            </tr>
                            <tr>
                                <td>Account Number (SFDC):</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtSFDCAccNum"/>
                                </td>
                            </tr>
                            <tr>
                                <td>SAP Account Number:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtSAPAccNum"/>
                                </td>
                            </tr>
                            <tr>
                                <td>State Code:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtStateCode"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Postal Code:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtPostalCode"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Phone Number:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtPhoneNum"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Fax Number:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtFaxNum" />
                                </td>
                            </tr>

                            <tr>
                                <td colspan="3" align="center">
                                    <apex:commandButton action="{!SearchAccount}" value="Search" id="btnSearch"/>
                                </td>
                            </tr>

                        </table>
                    </apex:pageblocksectionItem>                            

                    <apex:pageblocksectionitem>                     
                        <table border="0" width="100%">
                        <thead>
                                <tr>
                                    <th colspan="2">Harmonize</th>
                                </tr>
                        </thead>
                        <tr>
                            <td colspan="2"><hr /></td>
                        </tr>

                        <tr>
                            <td colspan="2">
                                <!-- <apex:selectRadio value="{!harmonizeParam}" >
                                    <apex:selectOption itemValue="AccNum" itemlabel="Account Number"/>
                                    <apex:selectOption itemValue="Addr" itemlabel="Address"/>
                                </apex:selectRadio>-->
                                Account Name: &nbsp;<apex:inputCheckbox value="{!AccNum}"/>
                            </td>
                        </tr>

                        <tr height="45px">
                            <td colspan="2">
                                Address: &nbsp;<apex:inputCheckbox value="{!AccNum}"/>
                            </td>
                        </tr>
                        <tr height="48px">
                            <td colspan="2">
                                Phone #: &nbsp;<apex:inputCheckbox value="{!AccNum}"/>
                            </td>
                        </tr>
                        <tr height="48px">
                            <td colspan="2">
                                Fax #: &nbsp;<apex:inputCheckbox value="{!AccNum}"/>
                            </td>
                        </tr>

                    </table>
                </apex:pageblocksectionitem>
            </apex:pageblocksection>
        </div>
        </div>
4
  • 4
    Wrap it in an outputpanel SectionItem -> Outputpanel -> stuff
    – Eric
    Sep 10, 2014 at 11:57
  • 1
    @Eric Would you like to add it as an answer? Sep 10, 2014 at 12:01
  • @Eric. Thanks. i tried the approach which you suggested and it is working fine.
    – Bforce
    Sep 10, 2014 at 13:20
  • @mast0r -- Done
    – Eric
    Sep 10, 2014 at 18:15

1 Answer 1

10

Wrap it in an outputpanel SectionItem -> Outputpanel -> stuff

<apex:pageblocksectionitem>
     <apex:outputpanel>
                        <table width="100%" border="0" height="200px">
                            <thead>
                                    <tr>
                                        <th colspan="2">Filters</th>
                                    </tr>
                            </thead>
                            <tr>
                                <td colspan="2"><hr /></td>
                            </tr>

                            <tr>
                                <td>Account Name:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtAccName"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Account Rating:</td>
                                <td>
                                    <apex:selectList value="{!SelectRating}" size="1">
                                            <apex:selectOptions value="{!RatingList}"></apex:selectOptions>
                                        </apex:selectList>
                                </td>
                            </tr>
                            <tr>
                                <td>Partner Type</td>
                                <td>
                                    <apex:selectList value="{!SelectPartner}" size="1">
                                            <apex:selectOptions value="{!PartnerTypeList}"></apex:selectOptions>
                                        </apex:selectList>
                                </td>
                            </tr>
                            <tr>
                                <td>Account Number (SFDC):</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtSFDCAccNum"/>
                                </td>
                            </tr>
                            <tr>
                                <td>SAP Account Number:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtSAPAccNum"/>
                                </td>
                            </tr>
                            <tr>
                                <td>State Code:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtStateCode"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Postal Code:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtPostalCode"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Phone Number:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtPhoneNum"/>
                                </td>
                            </tr>
                            <tr>
                                <td>Fax Number:</td>
                                <td>
                                    <apex:inputText style="width:300px;" value="{!AccName}" id="txtFaxNum" />
                                </td>
                            </tr>

                            <tr>
                                <td colspan="3" align="center">
                                    <apex:commandButton action="{!SearchAccount}" value="Search" id="btnSearch"/>
                                </td>
                            </tr>

                        </table>
</apex:outputpanel>
                    </apex:pageblocksectionItem>                            

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.