New resizeble datatable in M3

UI Components for JSF
Post Reply
loright
Posts: 42
Joined: 10 Aug 2011, 09:55

12 Sep 2011, 13:09

Hello, i update primefaces to 3.0.M3 and my datatable look very strange. The table isn't expanded on all screen. If to remove parameter resize ="true" then the table is normally displayed on all screen. As if manually to set width of columns the width doesn't change, but the arrows showing possibility of sorting according to any column are moved.

Code: Select all

<p:dataTable id="table"
                 var="fileAnalyzeResult"
                 value="#{fileUploadController.model}"
                 dynamic="true"
                 paginator="true" rows="5"
                 paginatorTemplate=" {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown} "
                 rowsPerPageTemplate="5,10,15"
                 selection="#{fileUploadController.selectedResults}"
            >
            <p:column selectionMode="multiple" />
            <p:column sortBy="#{fileAnalyzeResult.fileName}" style="width:30%">
                <f:facet name="header">
                    <h:outputText value="File name" />
                </f:facet>
                <h:outputText value="#{fileAnalyzeResult.fileName}" />
            </p:column>
            <p:column sortBy="#{fileAnalyzeResult.resourceType}" style="width:20%">
                <f:facet name="header">
                    <h:outputText value="Type" />
                </f:facet>
                <h:outputText value="#{fileAnalyzeResult.resourceType}" />
            </p:column>
            <p:column sortBy="#{fileAnalyzeResult.correctUpload}" style="width: 15%">
                <f:facet name="header" >
                    <h:outputText value="Status" />
                </f:facet>
                <h:outputText value="#{fileAnalyzeResult.correctUpload}" /> <br/>
                <h:outputText value="#{fileAnalyzeResult.errorMessage}" />
            </p:column>
            <p:column style="width:15%">
                <f:facet name="header">
                    <h:outputText value="Rubric" />
                </f:facet>
                <h:outputText value="Unknown" />
            </p:column>
            <p:column style="width:20%">
                <f:facet name="header">
                    <h:outputText value="action" />
                </f:facet>
                <h:panelGrid id="actionButtons" columns="3"  border="0">
                    <p:commandButton value="Open file"
                                     actionListener="#{fileUploadController.showData}"
                            >
                        <f:setPropertyActionListener value="#{fileAnalyzeResult}" target="#{fileUploadController.selectResult}" />
                    </p:commandButton>
                    <p:commandButton image="ui-icon ui-icon-search"
                                     update=":errorForm:errorTable"
                                     oncomplete="errorDialog.show()"
                            >
                        <f:setPropertyActionListener value="#{fileAnalyzeResult}" target="#{fileUploadController.selectResult}" />
                    </p:commandButton>
                    <p:fileUpload id="fileReUploader"
                                   fileUploadListener="#{fileUploadController.reUpload}"
                                   label="Reload"
                                   auto="true"
                                   value="#{fileAnalyzeResult}"
                                   target="#{fileUploadController.selectResult}"
                                   zindex="#{fileAnalyzeResult.numberInTable}"
                                   update=":tableForm"
                                   dynamic="true"
                             />
                 </h:panelGrid>
             </p:column>
</p:dataTable>
Primefaces 3.0 M3 + Tomcat 7.0.19
Primefaces 3.4 + JBoss 6.1. Final

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 61 guests