2 Replies Latest reply on Apr 23, 2010 12:07 PM by Ray Wilson

    modalPanel will not open

    Ray Wilson Newbie

      I have the following modalPanel that is rendered when the page is first shown.  Every thing works fine.  When someone selects an option in the  select one menu, the a4j:include area is rerendered correctly.  The problem I have is when the panel is closed, it cannot be opened again.  I have an a4j:commandLink that sets the renderAlertSeachDialog to true and reRenders the a4jPnlDialogs tag.  I put a breakpoint in the actionListener and it is executed but the ajax rerender fails.  I  have used this method many times to show and hide modalPanels before and it works perfectly.  This is the first panel I have used with the a4j:include.

       

      When I put in a a4j:log on the page with level="WARN" (browser is Google Chrome and IE8) I get the following when I try to open the modalPanel.

       

      error[2:37:53,638]: Error parsing XML
      error[2:37:53,638]: Parse Error: Document is empty

       

      Below I include the modalPanel code and one of the aj4:include views. Sorry about the formatting but that is how it pasted.

       

      Thanks for any help you can provide.  I have been trying to figure this one out for a week.

       

       

       

      <a4j:outputPanel id="a4jPnlDialogs">

       

       

      <rich:modalPanel id="alertSearchModalDialog" autosized="true" showWhenRendered="true" rendered="#{alertCloseOutTableBean.renderAlertSearchDialog}">

       

      <f:facet name="header">

       

      <h:outputLabel value="Alert Search" />

       

      </f:facet>

       

       

      <f:facet name="controls">

       

      <h:panelGroup>

       

      <h:form id="formCloseAlertSearchDialog">

       

      <a4j:commandLink id="lnkCloseCarSearchDialog" actionListener="#{alertCloseOutTableBean.actionHideAlertSearchDialog}" ajaxSingle="true" reRender="a4jPnlDialogs">

       

      <h:graphicImage id="imgCloseCloseInformationDialog" value="/images/close.png" style="border: none" />

       

      </a4j:commandLink>

       

      </h:form>

       

      </h:panelGroup>

       

      </f:facet>

       

      <h:panelGrid id="pnlSearchTypeMain" columns="1" columnClasses="columnCenter">

       

      <h:form id="formSearchType">

       

      <h:panelGrid id="pnlSearchType" columns="2">

       

      <h:outputText value="Search Type" styleClass="rich-text-header" style="white-space: nowrap"/>

       

      <h:selectOneMenu value="#{alertSearchBean.searchType}" style="width: 150px">

       

      <f:selectItems value="#{alertSearchBean.searchTypes}"/>

       

      <a4j:support id="a4jSupportSearchTypeChanged" event="onchange" actionListener="#{alertSearchBean.actionSearchTypeChanged}" reRender="a4jIncSearchViews" status="ajaxStatus"/>

       

      </h:selectOneMenu>

       

      </h:panelGrid>

       

      </h:form>

       

      <rich:separator height="5" lineType="beveled"/>

       

      <a4j:include id="a4jIncSearchViews" viewId="#{alertSearchBean.filterViewId}" keepTransient="true"></a4j:include>

       

      </h:panelGrid>

       

      </rich:modalPanel>

       

      </a4j:outputPanel>

      *****************************************************************************************************************************

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      <?

       

       

      xml version="1.0" encoding="ISO-8859-1"

      ?>

      <%@

       

       

      page language="java" contentType=

      "text/html; charset=ISO-8859-1"

       

       

      pageEncoding="ISO-8859-1"

      %>

      <!

       

       

      DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"

      >

      <%@

       

       

      taglib uri="http://java.sun.com/jsf/html" prefix="h"

      %>

      <%@

       

       

      taglib uri="http://java.sun.com/jsf/core" prefix="f"

      %>

      <%@

       

       

      taglib uri="http://richfaces.org/a4j" prefix="a4j"

      %>

      <%@

       

       

      taglib uri="http://richfaces.org/rich" prefix="rich"

      %>

      <

       

       

      html xmlns="http://www.w3.org/1999/xhtml"

      >

      <

       

       

      head

      >

      <

       

       

      meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"

      />

      <

       

       

      title>Alert Search Blank</title

      >

      </

       

       

      head

      >

      <

       

       

      body

      >

       

       

      <f:subview id="searchBlankView"

      >

       

       

      <h:form id="frmAlertSearchBlank"

      >

       

       

      <h:panelGrid id="pnlBlankMain" columns="1"

      >

       

       

      <rich:spacer width="400" height="200"

      />

       

       

      <f:facet name="footer"

      >

       

       

      <rich:toolBar width="100%"

      >

       

       

      <rich:toolBarGroup location="right"

      >

       

       

      <a4j:commandButton id="btnCancel" actionListener="#{alertCloseOutTableBean.actionHideAlertSearchDialog}" ajaxSingle="true" reRender="a4jPnlDialogs" value="Cancel" type="button" style="width: 50px"

      />

       

       

      </rich:toolBarGroup

      >

       

       

      </rich:toolBar

      >

       

       

      </f:facet>

       

       

      </h:panelGrid

      >

       

       

      </h:form

      >

       

       

      </f:subview

      >

      </

       

       

      body

      >

      </

       

       

      html

      >