title: JSF 2.0 can't render dialog from primefaces
body: <p>Lately i am having lots of issues with primefaces components, i dot know why. I use glassfishV3.0 and my primefaces version is 2.2.1
  My problem now is that i cant make the p:dialog of primefaces render when i click on a table row. I do almos exactly as it is done in their example: <a href="http://www.primefaces.org/showcase/ui/datatableComplex.jsf" rel="nofollow">http://www.primefaces.org/showcase/ui/datatableComplex.jsf</a></p>
  
  <p>I think my issue has something to do with some configuration, because i am also having troubles with other primefaces components. Can somebody give me a hand please and tell me what i am missing to be able to use primefaces components like thisone with no problems?
  Here is the code:</p>
  
  <p>THE JSF:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:t="http://myfaces.apache.org/tomahawk"
  xmlns:p="http://primefaces.prime.com.tr/ui"&gt;
      &lt;ui:composition template="WEB-INF/templates/BasicTemplate.xhtml"&gt;
  &lt;ui:define name="resultsForm"&gt;
  &lt;h:form enctype="multipart/form-data"&gt;
      &lt;h:inputText id="search" value="" /&gt;&lt;h:commandButton value="search"/&gt;               
  &lt;p:dataTable var="garbage" value="#{resultsController.allGarbage}"  dynamic="true" paginator="true" paginatorPosition="bottom" rows="10"  
               paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink}  {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
               rowsPerPageTemplate="5,10,15" selection="#{resultsController.garbage}" selectionMode="single"  
              onRowSelectUpdate="display" onRowSelectComplete="fileDialog.show()"&gt;            
  
              &lt;p:column sortBy="#{garbage.filename}" parser="string" filterBy="#{garbage.filename}" filterMatchMode="startsWith"&gt;  
              &lt;f:facet name="header"&gt;  
              &lt;h:outputText value="Filename" /&gt;  
              &lt;/f:facet&gt;  
              &lt;h:outputText value="#{garbage.filename}" /&gt;
               &lt;/p:column&gt; 
  
              &lt;p:column filterBy="#{garbage.description}" filterMatchMode="contains"&gt;  
              &lt;f:facet name="header"&gt;  
              &lt;h:outputText value="Description" /&gt;  
              &lt;/f:facet&gt;  
              &lt;h:outputText value="#{garbage.description}" /&gt;  
               &lt;/p:column&gt; 
  
              &lt;p:column sortBy="#{garbage.uploadDate}" parser="string"&gt;  
              &lt;f:facet name="header"&gt;  
              &lt;h:outputText value="Upload date" /&gt;  
              &lt;/f:facet&gt;  
              &lt;h:outputText value="#{garbage.uploadDate}" /&gt; 
               &lt;/p:column&gt;                
      &lt;/p:dataTable&gt; 
  
      &lt;p:dialog header="Modal Dialog" widgetVar="fileDialog" modal="true" height="200"&gt;    
  
      &lt;h:panelGrid id="display" columns="2" cellpadding="4"&gt;  
          &lt;h:outputText value="FileName:" /&gt;  
          &lt;h:outputText value="#{garbage.filename}" /&gt;  
  
          &lt;h:outputText value="Upload date:" /&gt;  
          &lt;h:outputText value="#{garbage.uploadDate}" /&gt;  
  
          &lt;h:outputText value="Description" /&gt;  
          &lt;h:outputText value="#{garbage.description}" /&gt; 
      &lt;/h:panelGrid&gt;           
  
      &lt;/p:dialog&gt; 
  
      &lt;/h:form&gt;
  &lt;/ui:define&gt;
      &lt;/ui:composition&gt;
  
      &lt;/html&gt;
  </code></pre>
  
  <p>THE Managed bean</p>
  
  <pre><code>@ManagedBean
  @ViewScoped
  public class ResultsController implements Serializable{
  
  @EJB
  private ISearchEJB searchEJB;
  
  private Garbage garbage;
  
  public List&lt;Garbage&gt; getAllGarbage() {
  
      List&lt;Garbage&gt; tmpGarbage = new ArrayList&lt;Garbage&gt;();
      for(Garbage g :searchEJB.findAllGarbage()) {
          tmpGarbage.add(g);
      }
      return tmpGarbage;
  }
  
  public Garbage getGarbage() {
      return garbage;
  }
  
  public void setGarbage(Garbage garbage) {
      this.garbage = garbage;
  }   
  </code></pre>
  
  <p>The JSF before is a composite page that i use inside this template</p>
  
  <pre class="lang-xml prettyprint-override"><code>      &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
        &lt;html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html"&gt;
        &lt;h:head&gt;
        &lt;title&gt;title&lt;/title&gt;
        &lt;script type="text/javascript"&gt;
         PrimeFaces.widget.Uploader.prototype._createPostParams = function() {
         var b = {};
           b[PrimeFaces.PARTIAL_REQUEST_PARAM] = true;
         b[PrimeFaces.PARTIAL_PROCESS_PARAM] = this.id;
         b[PrimeFaces.PARTIAL_SOURCE_PARAM] = this.id;
         b[PrimeFaces.VIEW_STATE] = PrimeFaces.ajax.AjaxUtils.encodeViewState();
         if (this.cfg.update) {
           b[PrimeFaces.PARTIAL_UPDATE_PARAM] = this.cfg.update
          }
          var a = PrimeFaces.getCookie("JSESSIONID");
          if (this.cfg.script.indexOf("jsessionid") == -1) {
          paramIndex = this.cfg.script.indexOf('?');
            if (paramIndex != -1) {
             this.cfg.script = this.cfg.script.substring(0, paramIndex)
             + ";jsessionid=" + a
             + this.cfg.script.substring(paramIndex);
        } else {
           this.cfg.script = this.cfg.script + ";jsessionid=" + a;
         }
         }
        b['cid'] = "#{javax.enterprise.context.conversation.id}";
       return b;
        };
       PrimeFaces.widget.Uploader.prototype.createPostParams =                  PrimeFaces.widget.Uploader.prototype._createPostParams;
       &lt;/script&gt;
       &lt;script type="text/javascript" src="/ primefaces_resource/2.1/yui/datasource/datasource-min.js"&gt;&lt;/script&gt; 
       &lt;script type="text/javascript"  src="/primefaces_resource/2.1/primefaces/paginator/paginator.js"&gt;&lt;/script&gt; 
       &lt;script type="text/javascript" src="/primefaces_resource/2.1/yui/datatable/datatable-min.js"&gt;&lt;/script&gt; 
       &lt;script type="text/javascript" src="/primefaces_resource/2.1/primefaces/datatable/datatable.js"&gt;&lt;/script&gt; 
       &lt;script type="text/javascript" src="/primefaces_resource/2.1/yui/swf/swf-min.js"&gt;&lt;/script&gt; 
       &lt;script type="text/javascript" src="/primefaces_resource/2.1/yui/charts/charts-min.js"&gt;&lt;/script&gt; 
       &lt;script type="text/javascript" src="/primefaces_resource/2.1/primefaces/charts/charts.js"&gt;&lt;/script&gt;
       &lt;/h:head&gt;
  
       &lt;body&gt; 
   &lt;ui:insert name="resultsForm"/&gt;
       &lt;/body&gt;
       &lt;/html&gt;
  </code></pre>
  
  <p>My web.xml configuration</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/pages/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;pages/index.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  &lt;servlet&gt;
  &lt;servlet-name&gt;Resource Servlet&lt;/servlet-name&gt;
  &lt;servlet-class&gt;org.primefaces.resource.ResourceServlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;Resource Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/primefaces_resource/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt; 
      &lt;filter&gt;
      &lt;filter-name&gt;PrimeFaces FileUpload Filter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.primefaces.webapp.filter.FileUploadFilter
      &lt;/filter-class&gt;        
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;PrimeFaces FileUpload Filter&lt;/filter-name&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p> </p>
  
  <p>In the table i above everithing works, just the sortBy function and the p:dialog doesnt work.
  This is a messages that is displayed at the eclipse console when i refresh the page:</p>
  
  <blockquote>
    <p>SEVERE: line 1:61 no viable alternative at character ';'</p>
  </blockquote>
  
  <p>I dont understand what it means, i think i have some kind of configuration problem rather than a syntax error. Ill be really happy if somebody could help me fix this please.</p>