function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
prad_p25prad_p25 

unable to resolve this error

trying to create a VF page on adding product. the erroe is

Error: The element type "apex:pageblocktable" must be terminated by the matching end-tag "</apex:pageblocktable>". 

 

<apex:page standardController="opportunity" extensions="Opportunity_AddProductSet">
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"/>
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery-ui.min.js"/>

<apex:sectionHeader title="Add Product Set" subtitle="(!Opporunity.Name)">

  <apex:form id="selectProductSet">
  <!---error messagess-->
  <apex:pageMessage rendered="{!ISBLANK(opportunity.pricebook2.name)}" strength="3" severity="Error" title="Missing Pricebook" summary="Please select a pricebook">
  </apex:pageMessage>
    <apex:pageBlock title="Available Product Sets" mode="edit">
        <apex:pageBlockButtons location="top">
             <apex:actionStatus id="selectProductSetStatus">
               <apex:facet name="start">
                <apex:outputPanel layout="block">
                <apex:commandButton value="Save & Return" disabled="true"/>
                <apex:commandButton value="Cancel" disabled="true"/>
                <apex:image value="/img/loading.gif"/>
                </apex:outputPanel>
                </apex:facet>
             <apex:facet name="stop">
               <apex:outputPanel layout="block" style="vertical-align: middle;">
               <apex:commandButton value="Save & Return" action="(!Save)" disabled="(!productSetCount == 0)"/>
               <apex:commandButton value="Cancel" action="(!cancel)"/>

               <apex:outputPanel layout="block" style="float: right; padding-right: 1en;">
               <apex:inputText value="{!filterCriteria}" style="text-align: center;" disabled="{!productSetCount==0}"/>
               <apex:commandButton value="Filter" action="(!filterCriteriaChanged)" rerender="selectProductSet" status="selectProductSetStatus" disabled="(!ProducSetCount==0)"/>
               </apex:outputPanel>
               </apex:outputPanel>
             </apex:facet>
          </apex:actionStatus>
       </apex:pageBlockButtons>
<apex:pageBlockSection columns="1" collapsible="false" rendered="{!ISBLANK(productSetId)}">
    <apex:pageBlocktable var="productSet" value="{!productSetList}" rendered="{!productSetCount != 0}">
        <apex:column styleClass="actionColumn" headerClass="actionColumn" footerClass="actionColumn"/>
         <apex:facet name="header">Actions</apex:facet>
         <apex:commandLink styleClass="actionLink" value="Select" action="{!selectedProductset}" reRender="selectproductSet" status="selectproductSetStatus"/>
         <apex:param name="selected" value="{!productSet.Id}"/>
         </apex:commandLink>
       
         <apex:column value="{!productSet.Name}"/>
         <apex:column value="{!productSet.Campaign__r.Name}"/>
         <apex:column value="{!productSet.Region__c.Name}">
      <apex:column value="{!productSet.Total_Products__c.Name}"/>
      </apex:pageBlocktable>

   <apex:outputText value="No records to display." rendered="(!productSetCount == 0)" />
  </apex:pageBlockSection>
     
 <!--this setion is shown only after product is selected -->
 <apex:pageBlockSection title="Selected Product set" columns="2" collapsible="false" rendered="{!NOT(ISBLANK(productsetId))}">
 <apex:outputField value="{!productSet.Name"/>
 <apex:outputField value="{!productSet.Total_Products__c"/>
 <apex:outputField value="{!productSet.Campaign__c"/>
 <apex:outputPanel>
 <apex:outputField value="{!productSet.region__c"/>
 </apex:outputPanel>
 </apex:pageBlockSection>
 <apex:pageBlockSection title="Associated Products" columns="1" collapsible="false" rendered="{!NOT(ISBLANK(productSetId))}">
 <apex:pageBlockTable var="productSetItem" value="{!productsetItemList}">
      <apex:column value="{!productSetItem.Product__r.Name}"/>
      <apex:column value="{!productSetItem.Product_Code__c.Name}"/>
      <apex:column value="{!productSetItem.Product_Family__c.Name}"/>
      <apex:column value="{!productSetItem.Product_Quantity__c.Name}"/>
     <apex:column value="{!productSetItem.Product_Discount__c.Name}"/>
     </apex:column>
 </apex:pageBlockTable>
 </apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

RamboRambo

Dude,

           I have mentioned the mistakes in the comments.. Try this and chk whether de code works....

 

 

<apex:page standardController="opportunity" extensions="Opportunity_AddProductSet">
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"/>
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery-ui.min.js"/>
<!--The Section header did'nt have an end tag-->
<apex:sectionHeader title="Add Product Set" subtitle="(!Opporunity.Name)"/>

  <apex:form id="selectProductSet">
  <!---error messagess-->
  <apex:pageMessage rendered="{!ISBLANK(opportunity.pricebook2.name)}" strength="3" severity="Error" title="Missing Pricebook" summary="Please select a pricebook">
  </apex:pageMessage>
    <apex:pageBlock title="Available Product Sets" mode="edit">
        <apex:pageBlockButtons location="top">
             <apex:actionStatus id="selectProductSetStatus">
               <apex:facet name="start">
                <apex:outputPanel layout="block">
                <apex:commandButton value="Save & Return" disabled="true"/>
                <apex:commandButton value="Cancel" disabled="true"/>
                <apex:image value="/img/loading.gif"/>
                </apex:outputPanel>
                </apex:facet>
             <apex:facet name="stop">
               <apex:outputPanel layout="block" style="vertical-align: middle;">
               <apex:commandButton value="Save & Return" action="(!Save)" disabled="(!productSetCount == 0)"/>
               <apex:commandButton value="Cancel" action="(!cancel)"/>

               <apex:outputPanel layout="block" style="float: right; padding-right: 1en;">
               <apex:inputText value="{!filterCriteria}" style="text-align: center;" disabled="{!productSetCount==0}"/>
               <apex:commandButton value="Filter" action="(!filterCriteriaChanged)" rerender="selectProductSet" status="selectProductSetStatus" disabled="(!ProducSetCount==0)"/>
               </apex:outputPanel>
               </apex:outputPanel>
             </apex:facet>
          </apex:actionStatus>
       </apex:pageBlockButtons>
<apex:pageBlockSection columns="1" collapsible="false" rendered="{!ISBLANK(productSetId)}">
    <apex:pageBlocktable var="productSet" value="{!productSetList}" rendered="{!productSetCount != 0}">
        <apex:column styleClass="actionColumn" headerClass="actionColumn" footerClass="actionColumn"/>
         <apex:facet name="header">Actions</apex:facet>
        <!-- The command link tag was closed at the end of the tag and u were using another closure tag on line 41-->
         <apex:commandLink styleClass="actionLink" value="Select" action="{!selectedProductset}" reRender="selectproductSet" status="selectproductSetStatus">
         <apex:param name="selected" value="{!productSet.Id}"/>
         </apex:commandLink>
       
         <apex:column value="{!productSet.Name}"/>
         <apex:column value="{!productSet.Campaign__r.Name}"/>
         <apex:column value="{!productSet.Region__c.Name}"/>
      <apex:column value="{!productSet.Total_Products__c.Name}"/>
      </apex:pageBlocktable>

   <apex:outputText value="No records to display." rendered="(!productSetCount == 0)" />
  </apex:pageBlockSection>
     
 <!--this setion is shown only after product is selected -->
 <apex:pageBlockSection title="Selected Product set" columns="2" collapsible="false" rendered="{!NOT(ISBLANK(productsetId))}">
 <!--the output field values was not closed properly-->
 <apex:outputField value="{!productSet.Name}"/>
 <apex:outputField value="{!productSet.Total_Products__c}"/>
 <apex:outputField value="{!productSet.Campaign__c}"/>
 <apex:outputPanel>
 <apex:outputField value="{!productSet.region__c}"/>
 </apex:outputPanel>
 </apex:pageBlockSection>
 <apex:pageBlockSection title="Associated Products" columns="1" collapsible="false" rendered="{!NOT(ISBLANK(productSetId))}">
 <apex:pageBlockTable var="productSetItem" value="{!productsetItemList}">
      <apex:column value="{!productSetItem.Product__r.Name}"/>
      <apex:column value="{!productSetItem.Product_Code__c.Name}"/>
      <apex:column value="{!productSetItem.Product_Family__c.Name}"/>
      <apex:column value="{!productSetItem.Product_Quantity__c.Name}"/>
     <apex:column value="{!productSetItem.Product_Discount__c.Name}"/>
  <!--   </apex:column>-->
 </apex:pageBlockTable>
 </apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>