Thanks, issue #2 works fine when using the .jar theme file.
Concerning issue #1:
I tried the hole day making Primefaces 2.2 final work with my existing project - I had no luck. The project works fine with PF 2.2 RC2 (like mentioned by smallya) but throws the mentioned exception in many scenarios. It's like also described by smallya, the exception is thrown in pages, dialogs dataTable etc. I couldn't narrow the failure down to the reason. Nearly in all my pages I use dataTable, dialog, menubar, panel. I use session scoped back beans. These often call (stateless) EJBs which are the only components with direct database access.
I'm using Glassfish 3.0.1 and Mojarra 2.0.4.
Here is an example:
The following a page is working properly:
Code: Select all
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:ui="http://java.sun.com/jsf/facelets"
template="/template.xhtml">
<ui:define name="head">
</ui:define>
<ui:define name="body">
<h:form prependId="false">
<p:growl id="growl" showDetail="true" life="5000" />
<h:panelGrid style="margin-top: 5px; margin-bottom: 5px">
<h:outputLabel value="Bestandsführung > Bestandsführung > Bestand pflegen" style="font-size: 12px;" />
</h:panelGrid>
<p:panel id="pnlSearchInv" header="Suchen" widgetVar="pnlSearch" style="width: 1000px" >
<h:panelGrid columns="4" style="font-size: 10px">
<h:outputLabel value="Kategorie" for="txt_categId"></h:outputLabel>
<h:selectOneMenu id="txt_categId" value="#{invInventory.searchParams.categId}">
<f:selectItem noSelectionOption="true" itemValue="" itemLabel=""/>
<f:selectItems value="#{applicationBean.listCategories}" var="item" itemLabel="#{item.categId}: #{item.categName}" itemValue="#{item.categId}" />
</h:selectOneMenu>
<h:outputLabel value="Hersteller" for="txt_producerId"></h:outputLabel>
<h:selectOneMenu id="txt_producerId" value="#{invInventory.searchParams.producerId}">
<f:selectItem noSelectionOption="true" itemValue="" itemLabel=""/>
<f:selectItems value="#{applicationBean.listProducers}" var="item" itemLabel="#{item.producerId}: #{item.producerName}" itemValue="#{item.producerId}" />
</h:selectOneMenu>
<h:outputLabel value="Artikel-Nr." for="txt_aId"></h:outputLabel>
<h:inputText id="txt_aId" value="#{invInventory.searchParams.artId}"/>
<h:outputLabel value="Artikelname" for="txt_artName"></h:outputLabel>
<h:inputText id="txt_artName" value="#{invInventory.searchParams.artName}"/>
<h:outputLabel value="Aktiv?"></h:outputLabel>
<h:selectOneMenu value="#{invInventory.searchParams.active}" style="font-size: 10px; " >
<f:selectItem noSelectionOption="true" itemValue="" itemLabel=""/>
<f:selectItem itemValue="True" itemLabel="Ja" />
<f:selectItem itemValue="False" itemLabel="Nein" />
</h:selectOneMenu>
<h:outputLabel value="Neu?"></h:outputLabel>
<h:selectOneMenu value="#{invInventory.searchParams.aNew}" style="font-size: 10px; " >
<f:selectItem noSelectionOption="true" itemValue="" itemLabel=""/>
<f:selectItem itemValue="True" itemLabel="Ja" />
<f:selectItem itemValue="False" itemLabel="Nein" />
</h:selectOneMenu>
<h:outputLabel value="Bildbezeichnung" for="txt_imageDesc"></h:outputLabel>
<h:inputText id="txt_imageDesc" value="#{invInventory.searchParams.imageDesc}"/>
<h:outputLabel value="Material" for="txt_matId"></h:outputLabel>
<h:selectOneMenu id="txt_matId" value="#{invInventory.searchParams.matId}">
<f:selectItem noSelectionOption="true" itemValue="" itemLabel=""/>
<f:selectItems value="#{applicationBean.listMaterials}" var="item" itemLabel="#{item.matId}: #{item.matDesc}" itemValue="#{item.matId}" />
</h:selectOneMenu>
<h:outputLabel value="Variante" for="txt_varId"></h:outputLabel>
<h:selectOneMenu id="txt_varId" value="#{invInventory.searchParams.sizeId}">
<f:selectItem noSelectionOption="true" itemValue="" itemLabel=""/>
<f:selectItems value="#{applicationBean.listSizes}" var="item" itemLabel="#{item.producerId.producerName} Id: #{item.sizeId} | #{item.size2} | #{item.size3}" itemValue="#{item.sizeId}" />
</h:selectOneMenu>
<h:outputLabel value="Angebot?"></h:outputLabel>
<h:selectOneMenu value="#{invInventory.searchParams.specialOffer}" style="font-size: 10px; " >
<f:selectItem noSelectionOption="true" itemValue="" itemLabel=""/>
<f:selectItem itemValue="True" itemLabel="Ja" />
<f:selectItem itemValue="False" itemLabel="Nein" />
</h:selectOneMenu>
<h:outputLabel value="Farbe" for="txt_colorId"></h:outputLabel>
<h:selectOneMenu id="txt_colorId" value="#{invInventory.searchParams.colorId}">
<f:selectItem noSelectionOption="true" itemValue="" itemLabel=""/>
<f:selectItems value="#{applicationBean.listColors}" var="item" itemLabel="#{item.colorId}: #{item.colordescList[0].colorName}" itemValue="#{item.colorId}" />
</h:selectOneMenu>
<h:outputLabel value="Barcode" ></h:outputLabel>
<h:inputText value="#{invInventory.searchParams.barcode}"/>
<h:outputLabel value="Lagerort" for="txt_locId"></h:outputLabel>
<h:selectOneMenu id="txt_locId" value="#{invInventory.searchParams.locId}">
<f:selectItem noSelectionOption="true" itemValue="" itemLabel=""/>
<f:selectItems value="#{applicationBean.listInvlocations}" var="item" itemLabel="#{item.locId}: #{item.locName}" itemValue="#{item.locId}" />
</h:selectOneMenu>
<h:outputLabel value="nur Bestand ungleich 0" for="txt_chkNonZero"></h:outputLabel>
<h:selectBooleanCheckbox id="txt_chkNonZero" value="#{invInventory.searchParams.invNonZero}" />
</h:panelGrid>
<p:commandButton id="btnSearch" ajax="false" action="#{invInventory.searchInventory}" value="Suchen" image="findIcon" style="font-size: 10px" />
</p:panel>
<h:panelGrid>
<p:ajaxStatus style="width:16px;height:16px;">
<f:facet name="start">
<h:graphicImage value="resources/images/sysImg/ajaxloading.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
<p:dataTable id="invTab" var="inv" value="#{invInventory.invList}" selection="#{invInventory.selectedInvs}"
selectionMode="multiple" emptyMessage="Es wurden keine Bestandspositionen gefunden." paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="10,20,50" paginatorAlwaysVisible="false" rows="10" style="font-size: 10px; width: 100%;" >
<f:facet name="header">
Stammdaten: Bestandspositionen
</f:facet>
<p:column headerText="Hersteller" styleClass="tabColumnStd" >
<h:outputText value="#{inv.variantcolor.variant.articlemat.article.producerId.producerName}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="ArtNr." styleClass="tabColumnStd" >
<h:outputText binding="#{invInventory.selectedAIdComp}" value="#{inv.inventoryPK.AId}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="ArtName" styleClass="tabColumnStd" >
<h:outputText value="#{inv.variantcolor.variant.articlemat.article.AName}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="Mat.Id" styleClass="tabColumnStd">
<h:outputText binding="#{invInventory.selectedMatIdComp}" value="#{inv.inventoryPK.matId}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="GrößeId" styleClass="tabColumnStd">
<h:outputText binding="#{invInventory.selectedVarIdComp}" value="#{inv.inventoryPK.varId}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="FarbeId" styleClass="tabColumnStd">
<h:outputText binding="#{invInventory.selectedColorIdComp}" value="#{inv.inventoryPK.colorId}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="FarbeName" styleClass="tabColumnStd">
<h:outputText value="#{inv.variantcolor.color.colordescList[0].colorName}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="LagerortId" styleClass="tabColumnStd">
<h:outputText binding="#{invInventory.selectedLocIdComp}" value="#{inv.inventoryPK.locId}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="Bestand" styleClass="tabColumnStd" >
<h:inputText value="#{inv.nbOnStock}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="nächste Lieferung" styleClass="tabColumnStd" >
<p:calendar inputStyle="width: 60px" value="#{inv.nextReplDate}" locale="DE" showOtherMonths="true" navigator="true" pattern="dd.MM.yyyy" style="font-size: 10px; width: 40px" />
</p:column>
<f:facet name="footer">
<p:toolbar style="font-size: 10px;" >
<p:toolbarGroup align="center">
<p:commandButton image="tickIcon" actionListener="#{invInventory.applyAllInventory}" update="invTab,growl" title="Änderungen übernehmen" style="font-size: 8px" />
<p:divider/>
<p:commandButton value="markierte löschen" image="deleteIcon" onclick="delInvConf.show();" title="markierte Datensätze löschen" />
<p:divider/>
<p:commandButton image="addIcon" update="pnlAssignInv" oncomplete="dlgAssignInv.show()" title="hinzufügen" />
</p:toolbarGroup>
</p:toolbar>
</f:facet>
</p:dataTable>
<p:confirmDialog message="Sollen wirklich alle markierten Bestandspositionen entfernt werden?" hideEffect="explode"
header="Bestandspositionen entfernen" severity="alert" widgetVar="delInvConf" >
<p:commandButton value="Ja" update="invTab,growl" oncomplete="delInvConf.hide()"
actionListener="#{invInventory.deleteInvAll}" />
<p:commandButton value="Nein" onclick="delInvConf.hide()" type="button" />
</p:confirmDialog>
<p:dialog header="Neue Bestandsposition(en) definieren" widgetVar="dlgAssignInv" closeListener="#{invInventory.handleNewDlgClose}" position="center" resizable="true" minWidth="700" height="700" >
<p:panel id="pnlNewInv" header="Farbe(n) wählen" >
<h:panelGrid columns="2" styleClass="dlgCommon" style="margin-bottom: 10px">
<h:outputLabel value="Artikel-Nr."></h:outputLabel>
<h:inputText value="#{invInventory.tmpNewInvForArtId}"/>
<h:outputLabel value="Mat.Id" ></h:outputLabel>
<h:selectOneMenu value="#{invInventory.tmpNewInvForMatId}" >
<f:selectItems value="#{applicationBean.listMaterials}" var="item" itemLabel="#{item.matId}: #{item.matDesc}" itemValue="#{item.matId}" />
</h:selectOneMenu>
<h:outputLabel value="GrößeId" ></h:outputLabel>
<h:selectOneMenu value="#{invInventory.tmpNewInvForVarId}" >
<f:selectItems value="#{applicationBean.listSizes}" var="item" itemLabel="#{item.producerId.producerName} Id: #{item.sizeId} | #{item.size2} | #{item.size3}" itemValue="#{item.sizeId}" />
</h:selectOneMenu>
<p:commandButton value="zugeordnete Farben anzeigen" actionListener="#{invInventory.setNewVariantcolorList}" update="pnlVariantcolorTemplateTab"/>
</h:panelGrid>
<h:panelGrid id="pnlVariantcolorTemplateTab">
<p:dataTable id="variantcolorTemplateTab" var="variantcolor" value="#{invInventory.tmpNewInvForVcs}" selection="#{invInventory.tmpNewSelectedVcs}"
selectionMode="multiple" emptyMessage="Es wurden keine Farben gefunden." style="font-size: 10px; width: 100%;" >
<f:facet name="header">
Farben-Zuordnung
</f:facet>
<p:column headerText="ArtNr." styleClass="tabColumnStd" >
<h:outputText value="#{variantcolor.variantcolorPK.AId}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="ArtName" styleClass="tabColumnStd" >
<h:outputText value="#{variantcolor.variant.articlemat.article.AName}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="Mat.Id" styleClass="tabColumnStd">
<h:outputText value="#{variantcolor.variantcolorPK.matId}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="GrößeId" styleClass="tabColumnStd">
<h:outputText value="#{variantcolor.variantcolorPK.varId}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="FarbeId" styleClass="tabColumnStd">
<h:outputText value="#{variantcolor.variantcolorPK.colorId}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="FarbeName" styleClass="tabColumnStd">
<h:outputText value="#{variantcolor.color.colordescList[0].colorName}" styleClass="tabColumnVal" />
</p:column>
</p:dataTable>
</h:panelGrid>
<h:panelGrid columns="2">
<h:outputLabel value="Lagerort" ></h:outputLabel>
<h:selectOneMenu value="#{invInventory.tmpNewInvForLocId}">
<f:selectItems value="#{applicationBean.listInvlocations}" var="item" itemLabel="#{item.locId}: #{item.locName}" itemValue="#{item.locId}" />
</h:selectOneMenu>
<h:outputLabel value="Bestand"></h:outputLabel>
<h:inputText value="#{invInventory.tmpNewInvNb}"/>
</h:panelGrid>
<p:commandButton value="neue Bestandspositionen für ausgewählte Farben erstellen" title="neue Betandspositionen erstellen" actionListener="#{invInventory.setNewInv}" update="invTab,growl" oncomplete="dlgAssignInv.hide()" />
</p:panel>
</p:dialog>
</h:panelGrid>
</h:form>
</ui:define>
</ui:composition>
Here is a - even less complex - page is not working and throws the above mentioned exception:
Code: Select all
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:ui="http://java.sun.com/jsf/facelets"
template="/template.xhtml">
<ui:define name="head">
</ui:define>
<ui:define name="body">
<h:form prependId="false">
<p:growl id="growl" showDetail="true" life="5000" />
<h:panelGrid style="margin-top: 5px; margin-bottom: 5px">
<h:outputLabel value="Bestandsführung > Bestandsführung > Lagerorte definieren" style="font-size: 12px;" />
</h:panelGrid>
<h:panelGrid>
<p:ajaxStatus style="width:16px;height:16px;">
<f:facet name="start">
<h:graphicImage value="resources/images/sysImg/ajaxloading.gif" />
</f:facet>
<f:facet name="complete">
<h:outputText value="" />
</f:facet>
</p:ajaxStatus>
<p:dataTable id="invlocTab" var="invloc" value="#{invInvlocation.invlocList}" selection="#{invInvlocation.selectedInvlocs}"
selectionMode="multiple" emptyMessage="Es wurden keine Lagerorte gefunden." paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="10,20,50" paginatorAlwaysVisible="false" rows="10" style="font-size: 10px; width: 100%;" >
<f:facet name="header">
Stammdaten: Lagerorte
</f:facet>
<p:column headerText="LagerortId" styleClass="tabColumnStd">
<h:outputText binding="#{invInvlocation.selectedInvlocIdComp}" value="#{invloc.locId}" styleClass="tabColumnVal" />
</p:column>
<p:column headerText="Lagerort Name" >
<h:inputText size="30" value="#{invloc.locName}" styleClass="tabColumnVal" />
</p:column>
<p:column>
<p:commandButton id="btnApplyInvloc" image="tickIcon" actionListener="#{invInvlocation.applyInvlocation}" update="invlocTab,growl" title="Änderungen übernehmen" style="font-size: 8px" />
</p:column>
<f:facet name="footer">
<p:toolbar style="font-size: 10px;" >
<p:toolbarGroup align="center">
<p:commandButton value="markierte löschen" image="deleteIcon" onclick="delInvlocConf.show();" title="markierte Datensätze löschen" />
<p:divider/>
<p:commandButton image="addIcon" actionListener="#{invInvlocation.prepareNewInvloc}" update="pnlAssignInvloc" oncomplete="dlgAssignInvloc.show()" title="hinzufügen" />
</p:toolbarGroup>
</p:toolbar>
</f:facet>
</p:dataTable>
<p:confirmDialog message="Sollen wirklich alle markierten Lagerorte entfernt werden?" hideEffect="explode"
header="Lagerorte entfernen" severity="alert" widgetVar="delInvlocConf" >
<p:commandButton value="Ja" update="invlocTab,growl" oncomplete="delInvlocConf.hide()"
actionListener="#{invInvlocation.deleteInvlocAll}" />
<p:commandButton value="Nein" onclick="delInvlocConf.hide()" type="button" />
</p:confirmDialog>
<p:dialog header="Neuen Lagerort definieren" widgetVar="dlgAssignInvloc" closeListener="#{invInvlocation.handleNewDlgClose}" position="center" resizable="true" minWidth="700" height="500" >
<p:panel id="pnlAssignInvloc">
<h:panelGrid id="pnlNewInvloc" rendered="#{invInvlocation.renderPnlNewInvloc}" columns="2" style="width: 400px">
<h:outputText value="LagerortId" />
<h:outputText value="#{invInvlocation.newInvloc.locId}" />
<h:outputText value="Lagerort Name *" />
<h:inputText size="30" value="#{invInvlocation.newInvloc.locName}" />
</h:panelGrid>
<p:commandButton value="speichern" actionListener="#{invInvlocation.setNewInvloc}" update="invlocTab,growl" oncomplete="dlgAssignInvloc.hide()"/>
</p:panel>
</p:dialog>
</h:panelGrid>
</h:form>
</ui:define>
</ui:composition>
The exception occurs on the second page if you either show the "dlgAssignInvloc" dialog (i. e. the second one in the source) or if you click the first commandButton of the confirmationDialog (this is strange because exactly the same dialog works on the first page I posted above).
Any ideas on that issue are very appriciated!
Martin