Primefaces p:Plattenbreite Problem innerhalb in p:layout

Primefaces 3.5

Wenn ich p:dataTable im p:panel, panel kann nicht angezeigt werden-kompatibel Breite.
Problem ist table width ist größer als panel width wie unten Bild erfassen.

Primefaces p:Plattenbreite Problem innerhalb in p:layout

Wenn ich entfernen p:layout ist es ok.

Ich würde gerne panel with lager als table width. Kann es lösen, indem Sie mit jQuery?

panel.xhtml

<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:p="http://primefaces.org/ui">
    <h:head>
    </h:head>   
    <h:body>
        <p:layout fullPage="true">
            <p:layoutUnit position="west" size="260">
                left
            </p:layoutUnit>
            <p:layoutUnit position="north" size="50">
                header
            </p:layoutUnit>
            <p:layoutUnit position="center" resizable="true">
                <h:form enctype="multipart/form-data">
                            <p:panel header="Vehicle Information" id="vehicleInfoWizardPanel">  
                                <p:dataTable id="vehicleTable">
                                    <p:column headerText="Sr. No">
                                    </p:column>
                                    <p:column headerText="Registration No">
                                    </p:column>
                                    <p:column headerText="Model">
                                    </p:column>
                                    <p:column headerText="Engine No">
                                    </p:column>
                                    <p:column headerText="Chassis No">
                                    </p:column>
                                    <p:column headerText="Cubic Capacity">
                                    </p:column>
                                    <p:column headerText="Seating">
                                    </p:column>
                                    <p:column headerText="Weight (Ton)">
                                    </p:column>
                                    <p:column headerText="Sum Insured">
                                    </p:column>
                                    <p:column headerText="Product Type">
                                    </p:column>
                                    <p:column headerText="Add On">
                                    </p:column>
                                    <p:column headerText="Period (Month)">
                                    </p:column>
                                    <p:column headerText="Manufacture">
                                    </p:column>
                                    <p:column headerText="Type Of Body">
                                    </p:column>
                                </p:dataTable>
                            </p:panel>
                </h:form>
             </p:layoutUnit>
            <p:layoutUnit position="east" size="260">
                Right
            </p:layoutUnit>
            <p:layoutUnit position="south" size="40">
                footer
            </p:layoutUnit>
        </p:layout>
    </h:body>
</html>

update

Selbst wenn ich Plattenbreite von jquery, es ist immer wieder null.

var width = $("#vehicleInfoWizardPanel").width();
alert(width);

Aber, bekomme ich erstaunliche Punkt. Wenn ich entfernen h:form ist alles ok, ohne die Verwendung von jquery.

Warum nicht einfach die style Attribut p:panel und legen Sie die width (z.B. style = "width: 500px"). Die Größe zu ändern, wie gebraucht.
fixe Breite? Ich will 100% Breite, aber Es wird kompatibel sein mit p:layout Inhalt
Es war nur ein Vorschlag, der Breite 100% nicht funktioniert ?
Ich mochte, ist es nicht ok.

InformationsquelleAutor Zaw Than oo | 2013-08-01

Schreibe einen Kommentar