0

マイページ: ---

何かが原因で、panelGrid が複数の行に空のセルを作成しています。

最初の列にラベル、2 番目の列に inputText 要素、またはツールチップ付きの selectMenu を表示する 2 列のテーブルが必要です。

私の回避策はこれでした。3列のテーブルを作成し、panelGridが空のセルを作成しないことを決定した場合、 a を追加して、<br></br>そうするように促します。

            <h:panelGrid columns="3" style="text-align:left">
                <p:remoteCommand name="startJobActivate" actionListener="#{provisioningBean.startJobActivate}" />

                <h:outputLabel for="longitudeIdAct" value="Longitude: " />
                <p:inputText id="longitudeIdAct" value="#{provisioningBean.longitude}" title="Longitude" />
                <p:watermark for="longitudeIdAct" value="Longitude" />

                <h:outputLabel id="equipmentDropMenuActLabel" for="equipmentDropMenuAct" value="#{provisioningBean.accessDeviceLabel}" />
                <p:selectOneMenu id="equipmentDropMenuAct" value="#{provisioningBean.equipment}" title="Not needed for CSI or SIP"
                    disabled="#{provisioningBean.equipDisabled}" style="width: 100% !important">
                    <f:selectItem itemLabel=" Equipment" itemValue="" noSelectionOption="true" />
                    <f:selectItems value="#{provisioningBean.equipments}" />
                </p:selectOneMenu>
                <p:tooltip for="equipmentDropMenuAct" />

                <h:outputLabel for="rangeActId" value="Range: " />
                <p:spinner id="rangeActId" value="#{provisioningBean.rangeAct}" min="1" title="Amount of telephone numbers to provide" size="3"
                    disabled="#{provisioningBean.rangeDisabled}" />
                <br></br>
            </h:panelGrid>

これはバグですか?ここで何が欠けていますか?

編集:ああ、きちんと!私は最小限の例を作成することができましたが、それでも同じ問題があります:D https://gist.github.com/WurmD/f3cb45669e6871acc77462f34891862f

スクリーンショット - 画像を投稿するには 10 人の担当者が必要です

これは 3 列の h:panelGrid ですが、3 番目のセルが何かに占有されています。

EDIT2: p:panelGrid と同じ動作

4

1 に答える 1

1

この回答をありがとう、Kukeltje:

h:panelGrid columns="3" は、「3 番目の要素ごとに新しい行を開始する」ことを意味します

したがって、透かし (およびその他の非表示の要素) を h:panelGrid の外に配置するか、h:panelGroup を使用して、テーブル内の 1 つのセルのみを占有する必要があるものをグループ化します。

<p:remoteCommand name="startJobActivate" actionListener="#{provisioningBean.startJobActivate}" />
<p:panelGrid columns="2" style="text-align:left">
    <h:outputLabel for="orderIdAct" value="Order Number: *" />
    <p:inputText id="orderIdAct" value="#{provisioningBean.orderNumberAct}" label="orderId" title="Order Number" />

    <h:outputLabel for="customerNameIdAct" value="Customer: *" />
    <h:panelGroup>
        <!-- h:panelGroup to group things that should only occupy 1 cell in the table -->
        <p:inputText id="customerNameIdAct" value="#{provisioningBean.customerName}" title="Customer Name" />
        <p:watermark for="customerNameIdAct" value="Customer Name" id="watermarkcustomerNameIdAct" />
    </h:panelGroup>

</p:panelGrid>
<p:panel id="executePanelAct">
    <p:commandButton value="Execute Activation" id="actvateButton" update=":form:growl" styleClass="executeButton" />
</p:panel>
<!-- Items that don't need to be in panelGrid -->
<p:watermark for="orderIdAct" value="Order Number" id="watermarkorderIdAct" />
于 2016-09-26T09:04:42.460 に答える