Primefaces对话框内的数据表行选择

时间:2015-01-13 09:13:56

标签: jsf primefaces datatable modal-dialog seam

我很抱歉我的英语。我有一个JBoss Seam项目并在用户界面中使用primefaces。我们有一个对话框并在数据表中。当我选择一行时会出现以下错误

ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost-127.0.0.1-8080-1) javax.resource.ResourceException: IJ000460: Error checking for a transaction
PersistenceException org.hibernate.exception.GenericJDBCException: Could not open connection

我想也许这个关于hibernate的错误但是当我厌倦了很多关于这个问题的方法我无法做到但是当我将对话框移动到新的xhtml页面时它已经完成了。我想使用对话框来代替新页面。我的错误在代码之后?

<h:form id="vehicleForm">
<p:commandButton id="selectClientButton" value="Musteri Sec" actionListener="#{clientFacade.clientSearchClear()}" />
</h:form>
<h:form id="selectClientForm">
    <p:dialog widgetVar="selectClientDialog" resizable="true" draggable="true" modal="true"  header="Arac Satis">
            <h:panelGrid columns="4">

                            <h:outputText value="Adi" />
                            <h:outputText value="Soy Adı" />
                            <h:outputText value="TC/Vergi No." />
                            <h:outputText value="" />

                            <p:inputText value="#{clientFacade.client.name}" />
                            <p:inputText value="#{clientFacade.client.lastName}" />
                            <p:inputText value="#{clientFacade.client.taxNo}" />
                            <p:commandButton value="ARA" update=":selectClientForm:clientListDT" />
            </h:panelGrid>

                    <p:dataTable id="clientListDT" rows="10" value="#{clientFacade.clientList}" var="client"  >

                        <p:column style="width:3%" >

                            <p:commandLink id="test" actionListener="#{vehicleStockFacade.selectClient(client.clientId)}" ajax="false" >
                                <h:graphicImage value="#{icon.icon_select_mine_small}" rendered="#{client.isMyClient}"  title="#{msg.choose}" width="15" height="15"/>
                                <h:graphicImage value="#{icon.icon_select_not_mine_small}" rendered="#{!client.isMyClient}"  width="15" height="15" />
                            </p:commandLink>    

                        </p:column>

                        <p:column>
                            <f:facet name="header" >
                                <h:outputText value="#{msg.client_name}" />
                            </f:facet>
                            <h:outputText value="#{client.name}" />
                        </p:column>

                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{msg.client_lastname}" />
                            </f:facet>
                            <h:outputText value="#{client.lastName}" />
                        </p:column>

                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{msg.tax_no}" />
                            </f:facet>
                            <h:outputText value="#{client.taxNo}" />
                        </p:column>

                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{msg.cell_phone}" />
                            </f:facet>
                            <h:outputText value="#{clientFacade.useMaskForPhone(client.mobilePhone)}" />
                        </p:column>

                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{msg.town}" />
                            </f:facet>
                            <h:outputText value="#{client.town}" />
                        </p:column>

                        <p:column>
                            <f:facet name="header" id="headerId" >
                                <h:outputText value="#{msg.address}" />
                            </f:facet>
                            <h:outputText value="#{client.addressLine1}" />
                        </p:column>

                        <p:column>
                            <f:facet name="header">
                                <h:outputText value="#{msg.post_code}" />
                            </f:facet>
                            <h:outputText value="#{client.postCode}" />
                        </p:column>

                    </p:dataTable>

            <f:facet name="footer">
                <p:commandButton value="Secimi Kaldir" action="#{vehicleStockFacade.removeClientFromVehicleStock()}" style="float:right;margin-bottom:5px" ajax="false" />              
            </f:facet>
        </p:dialog>

        </h:form>

0 个答案:

没有答案