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
dbelwooddbelwood 

XHTML validation error showing up in apex:pageMessages tag

I've got a multi-step 1 page wizard and and an apex:pageMesages tag to display messages to the user.  When I add a confirm message on an action, I also get a Warning message in the tag stating  - "The reference to entity 'body' should end with ';' delimiter at line 7".

Any ideas?

Dan
mtbclimbermtbclimber
Can you post some simplified markup and a value for the message that introduces this error?

Thanks,
dbelwooddbelwood
Markup, as simplified as possible;
Code:
<apex:page id="page" controller="BookingViewController" showHeader="true" title="Booking View">
 <apex:styleSheet value="{!URLFOR($Resource.assets, 'css/css.css')}"/>
 
 <apex:outputPanel id="holder" layout="block" styleClass="main_holder">
  <apex:actionStatus layout="block" id="overlay">
   <apex:facet name="start">
    <apex:outputPanel layout="block">
     <apex:outputPanel layout="block" styleClass="content2">
      <apex:image value="{!URLFOR($Resource.assets, 'img/spin.gif')}"/>
      <h2>Processing...</h2>
     </apex:outputPanel>
     <apex:outputPanel layout="block" styleClass="overlay"/>
    </apex:outputPanel>
   </apex:facet>
  </apex:actionStatus>
  <apex:outputPanel layout="block" styleClass="logo">
   <apex:outputPanel layout="block" styleClass="right">
    <apex:image value="{!URLFOR($Resource.assets, 'img/logo_200.jpg')}"/>
   </apex:outputPanel>
  </apex:outputPanel>
  <apex:outputPanel layout="block" styleClass="clear_both"/>
  
  <apex:form id="form">
  <apex:pageMessages />
  <apex:outputPanel layout="block" styleClass="message errorM3" rendered="{!continueBooking}">
   <apex:image styleClass="msgIcon" id="error" value="/s.gif"/>
   
   Would you like to&nbsp;<apex:commandButton value="Continue" status="page:overlay" action="{!continueBooking}"/>&nbsp;or&nbsp;<apex:commandButton value="Cancel" status="page:overlay" action="{!cancelBooking}"/>
  </apex:outputPanel>
  <apex:outputPanel layout="block" id="search_bar" styleClass="accordion_bar orange"/>
  <apex:outputPanel id="search_content" layout="block" styleClass="accordion_open" rendered="{!NOT(searchPerformed)}"/>
  <apex:outputPanel layout="block" id="grid_bar" styleClass="accordion_bar green"/>
  <apex:outputPanel layout="block" id="grid_content" styleClass="accordion_open grid" rendered="{!AND(searchPerformed,NOT(gridSelected))}"/>
  <apex:outputPanel layout="block" id="agent_bar" styleClass="accordion_bar blue"/>
  <apex:outputPanel layout="block" id="agent_content" styleClass="accordion_open grid" rendered="{!AND(searchPerformed,gridSelected,NOT(agentSelected))}"/>
  <apex:outputPanel layout="block" id="assignment_bar" styleClass="accordion_bar yellow"/>
  <apex:outputPanel layout="block" id="assignment_content" styleClass="accordion_open grid" rendered="{!AND(searchPerformed,gridSelected,agentSelected, storeWorkSelected, NOT(individualWorkSelected))}"/>
  
  <apex:outputPanel layout="block" id="assignment_urn_content" styleClass="accordion_open grid" rendered="{!AND(searchPerformed,gridSelected,agentSelected,individualWorkSelected)}">
   <apex:outputPanel layout="block" styleClass="accordion_panel" rendered="{!NOT(noWorkLeftToAssign)}">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr>
           <td width="300" valign="top">
            <table border="0" cellpadding="0" cellspacing="0" class="urn">
              <tr class="store_row">
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td class="border_b">Date</td>
              </tr>
              <tr class="store_row">
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td class="border_b">Working in (T)his Grid, (O)ther Grid—</td>
              </tr>
              <tr class="store_row">
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td class="border_b">Store Hours</td>
              </tr>
              <tr class="store_row">
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>Net Availability</td>
              </tr>
              <apex:repeat value="{!selectedStores}" var="store">
              <tr class="store_row bucket">
                <td><c:TruncatedText text="{!store.store.retailer_object__r.Name}" length="30"/></td>
                <td><c:TruncatedText text="{!store.store.name}" length="30"/></td>
                <td><c:Formatted_Hours hours="{!store.totalHours}"/>{!store.spacer}</td>
              </tr>
              <apex:variable value="{!0}" var="index"/>
              <apex:repeat value="{!store.urns}" var="urn">
              <tr class="store_row {!IF(MOD(index,2)==0, 'odd', '')}">
                <td><c:TruncatedText text="{!urn.Client_Name__r.name}" length="30"/></td>
                <td><c:TruncatedText text="{!urn.Campaign_Line__r.Name}" length="30"/></td>
                <td><c:Formatted_Hours hours="{!urn.Hours__c}"/></td>
              </tr>
              <apex:variable value="{!index+1}" var="index"/>
              </apex:repeat>
              </apex:repeat>
         </table>
        </td> 
           <td width="*" valign="top"><apex:outputPanel layout="block" id="urn_checkboxes" styleClass="scroll_urn">
             <table border="0" cellpadding="0" cellspacing="0" class="urn td100">
              <tr class="title">
                <apex:repeat value="{!selectedDates}" var="dt">
       <td>{!LPAD(TEXT(Day(dt)),2,'0')}/{!LPAD(TEXT(Month(dt)),2,'0')}</td>
       </apex:repeat>
               </tr>
               <tr class="store_row">
                <apex:repeat value="{!selectedAgentAvailability}" var="availability">
       <td>
        {!availability.gridWork}
       </td>
       </apex:repeat>
      </tr>
              <tr class="store_row">
       <apex:repeat value="{!selectedWork}" var="wk">
       <td><c:Formatted_Hours hours="{!wk}"/></td>
       </apex:repeat>
      </tr>
               <tr class="store_row">
                  <apex:repeat value="{!selectedAgentAvailability}" var="availability">
       <td><c:Formatted_Hours hours="{!availability.hours}"/></td>
       </apex:repeat>
               </tr>
               
               <apex:variable var="index" value="{!0}"/>
               
               <apex:repeat value="{!storesWork}" var="work">
                
                <tr class="store_row {!IF(AND(MOD(index,2)==0, NOT(work.isHeaderRow)), 'odd', '')} {!IF(work.isHeaderRow, 'bucket', '')}" id="row_{!index}">
                 <apex:actionRegion renderRegionOnly="true">
                 <apex:repeat value="{!work.items}" var="item" id="row">
                 <td class="{!IF(item.workingHere, 'atstore', '')}">
                  <apex:outputPanel rendered="{!NOT(work.isHeaderRow)}">
                   <apex:actionStatus id="row_refresh" onstart="disable()" onstop="enable()"/>
                   <apex:includeScript value="{!URLFOR($Resource.assets, 'js/utils.js')}"/>
                   <apex:outputText value="X" rendered="{!NOT(item.available)}"/>
                   <apex:outputPanel >
                    <apex:inputCheckbox value="{!item.selected}" rendered="{!item.available}"/>
                    <apex:actionSupport action="{!item.selectItem}" event="onchange" rerender="urn_checkboxes" status="row_refresh"/>
                   </apex:outputPanel>
                  </apex:outputPanel>
                  <apex:outputPanel rendered="{!work.isHeaderRow}">
                   {!IF(item.workingHere, 'At Store', '')}
                  </apex:outputPanel>
                 </td>
                 </apex:repeat>
                 </apex:actionRegion>
                </tr>
               <apex:variable value="{!IF(NOT(work.isHeaderRow), index+1, 0)}" var="index"/>
               </apex:repeat>
               <tr class='store_row'>
       <td>&nbsp;</td>
      </tr>
     </table>
        </apex:outputPanel>
        </td>
         </tr>
       </table>
       <div align="right"><br />
        <apex:commandButton status="page:overlay" action="{!bookURNs}" value="Validate and Assign URN's" rendered="{!NOT(continueBooking)}" rerender="page:form"/>
    </div>
   </apex:outputPanel>
   <apex:outputPanel layout="block" styleClass="accordion_panel" rendered="{!noWorkLeftToAssign}">
    There is no work left to assign, please <apex:commandLink status="page:overlay" action="{!resetSearch}" value="Re-search" rerender="page:form"/> to find more work.
   </apex:outputPanel>
  </apex:outputPanel>
  </apex:form> 
 </apex:outputPanel>
</apex:page>

 the controller code snippet;
Code:
public PageReference bookURNs() {
  try {
   this.bookingImpl();
   ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.CONFIRM, 'Booking successful.'));
   this.search();
   this.selectedStores = StoreWork.collate([Select Store_Name__r.Grid__c, Store_Name__r.Grid__r.Name, Store_Name__c, Store_Name__r.Name, Store_Name__r.Retailer_Object__r.Name, Store_Name__r.Street_1__c, Store_Name__r.Street_2__c, Store_Name__r.City__c, Store_Name__r.Village__c, Store_Name__r.Town__c, Store_Name__r.Post_Code__c, Hours__c, Date__c, End_Date__c, Client_Name__r.Name, Campaign_Line__r.Name from URN__c Where Id in :this.urns and Store_Name__r.Grid__c =:this.selectedGridId Order By Store_Name__r.Name, Client_Name__r.Name], this.selectedAgentId, this.agents.startDate, this.agents.endDate);
   if (this.selectedStores.size() == 0) {
    this.noWorkLeftToAssign = true;
   }
   else {
    AgentAvailabilityCollection avail = new AgentAvailabilityCollection(this.urns, new List<Agent__c>{this.selectedAgent}, this.metadata.Start_Date__c, this.metadata.End_Date__c);
    this.selectedAgentAvailability = avail.availabilities[0].availabilities;
    avail.availabilities[0].populateGridWork(avail.dates, this.selectedGridId);
    this.storesWork = WorkGridRow.populate2(this.selectedStores, this.selectedDates, this.selectedAgentAvailability);
   }
  }
  catch (BookingException be) {
   if (!this.continueBooking) {
    ApexPages.addMessages(be);
    for (System.Exception e : this.bookingExceptions) {
     ApexPages.addMessages(e);
    }
   }
  }
  catch (System.Exception e) {
   ApexPages.addMessages(e);
  }
  
  return null;
 }