Note that there are some explanatory texts on larger screens.

plurals
  1. PONot able to display the dialog box in primefaces
    primarykey
    data
    text
    <p>4 and JSF 2.1 , Tomcat6 for a sample application. I was trying to show a dailog box when clicked on a image inside a ui:composition. But it is not getting displayed. And if i run that without using the ui:composition> it is working fine.</p> <p>This is my code</p> <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt; &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:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"&gt; &lt;h:head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;script type="text/javascript" src="scripts/jquery-1.7.1.min.js"&gt;&lt;/script&gt; &lt;/h:head&gt; &lt;h:body&gt; &lt;p:dialog id="dialog" header="Login" widgetVar="dlg"&gt; &lt;h:form&gt; &lt;h:outputText value="hi"&gt;&lt;/h:outputText&gt; &lt;!-- &lt;h:panelGrid columns="2" cellspacing="5" &gt; &lt;h:outputLabel value="OsName" style="color:black"&gt;&lt;/h:outputLabel&gt; &lt;h:inputText value="#{productBean.osName}"&gt;&lt;/h:inputText&gt; &lt;h:outputLabel value="OsFamily" style="color:black"&gt;&lt;/h:outputLabel&gt; &lt;h:inputText value="#{productBean.osFamily}"&gt;&lt;/h:inputText&gt; &lt;h:outputLabel value="OsDescription" style="color:black"&gt;&lt;/h:outputLabel&gt; &lt;h:inputText value="#{productBean.osDescription}"&gt;&lt;/h:inputText&gt; &lt;h:outputLabel value="OsGuid" style="color:black"&gt;&lt;/h:outputLabel&gt; &lt;h:inputText value="#{productBean.osGuid}"&gt;&lt;/h:inputText&gt; &lt;h:outputLabel value="MajorVersion" style="color:black"&gt;&lt;/h:outputLabel&gt; &lt;h:inputText value="#{productBean.majorVersion}"&gt;&lt;/h:inputText&gt; &lt;h:outputLabel value="minorVersion" style="color:black"&gt;&lt;/h:outputLabel&gt; &lt;h:inputText value="#{productBean.minorVersion}"&gt;&lt;/h:inputText&gt; &lt;h:outputLabel value="BuildVersion" style="color:black"&gt;&lt;/h:outputLabel&gt; &lt;h:inputText value="#{productBean.buildVersion}"&gt;&lt;/h:inputText&gt; &lt;h:outputLabel value="OsServicepack" style="color:black"&gt;&lt;/h:outputLabel&gt; &lt;h:inputText value="#{productBean.osServicepack}"&gt;&lt;/h:inputText&gt; &lt;h:outputLabel value="OsRevision" style="color:black"&gt;&lt;/h:outputLabel&gt; &lt;h:inputText value="#{productBean.osRevision}"&gt;&lt;/h:inputText&gt; &lt;h:commandButton value="Back" action="#{productBean.product}" styleClass="button1" &gt;&lt;/h:commandButton&gt; &lt;h:commandButton value="Next" action="#{productBean.productcustomer}" styleClass="button1" &gt;&lt;/h:commandButton&gt; &lt;/h:panelGrid&gt; --&gt; &lt;/h:form&gt; &lt;/p:dialog&gt; &lt;ui:composition template="/pages/templates/layout.xhtml"&gt; &lt;ui:define name="body" &gt; &lt;h:form prependId="false"&gt; &lt;div class="widget"&gt; &lt;p:dataTable var="car" paginator="true" rows="10" &gt; &lt;f:facet name="header"&gt; List of Cars &lt;/f:facet&gt; &lt;p:columnGroup type="header"&gt; &lt;p:row styleClass="edit"&gt; &lt;p:column rowspan="3" headerText="Model" sortBy="Model" filterBy="Model" width="" /&gt; &lt;p:column rowspan="3" headerText="Year" sortBy="Year" filterBy="Year"/&gt; &lt;p:column rowspan="3" headerText="Company" sortBy="Company" filterBy="Company"/&gt; &lt;p:column rowspan="3" headerText="Color" sortBy="Color" filterBy="Color"/&gt; &lt;p:column colspan="3" headerText="Actions" /&gt; &lt;/p:row&gt; &lt;p:row styleClass="edit"&gt; &lt;p:column&gt;&lt;f:facet name="header"&gt;&lt;h:outputLink onclick="showStatus()" title="Edit"&gt; &lt;p:graphicImage value="/images/b_edit.png" /&gt;&lt;/h:outputLink&gt; &lt;/f:facet&gt;&lt;/p:column&gt; &lt;p:column&gt;&lt;f:facet name="header"&gt;&lt;h:outputLink onclick="showStatus()" title="Delete"&gt; &lt;p:graphicImage value="/images/b_drop.png" /&gt;&lt;/h:outputLink&gt; &lt;/f:facet&gt;&lt;/p:column&gt; &lt;p:column&gt;&lt;f:facet name="header"&gt;&lt;h:outputLink onclick="dlg.show()" title="View"&gt; &lt;p:graphicImage value="/images/search-icon.png" /&gt;&lt;/h:outputLink&gt; &lt;/f:facet&gt;&lt;/p:column&gt; &lt;/p:row&gt; &lt;/p:columnGroup&gt; &lt;/p:dataTable&gt; &lt;/div&gt; &lt;/h:form&gt; &lt;/ui:define&gt; &lt;/ui:composition&gt; &lt;/h:body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload