我的页面:---h:panelGrid不一致的单元格分配
某些东西导致panelGrid在几行中创建一个空单元格。
我想有一个可见的两列表,第一列标签,第二列一个inputText元素或带有工具提示的selectMenu。
我的解决方法是,创建一个3列表格,当panelGrid决定不创建一个空单元格时,添加一个<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
screenshot - you need 10 rep to post images
所以这是一个3列H:panelGrid的,但第三单元被拉紧东西
EDIT2:同行为与号码:panelGrid的
你可以上传的图像它看起来像什么?如果你使用p:panelGrid?你可以用硬编码文本创建一个更简单的例子,这样我们可以更容易地测试它吗? –
@ JaqenH'ghar:done :) – WurmD
3列意味着在每个第三个元素之后都有一个新的行开始......将不相关的东西移动到panelgrid之外,或者使用'h:panelgroup'对事物进行分组并将面板组计数为1元件 – Kukeltje