2013-07-26 112 views
2

我想用primeform 3.5的用户窗体,所有的组件都工作正常,除了selectonemenu,它不能正确呈现。Primefaces SelectOneMenu无法正确呈现文字

它的文本字段没有显示任何下拉字段的选择。

,因为我没有我不能发布图片太大声誉

代码

<p:panelGrid id="jobsGrid" columns="2" style="width:100%;margin-bottom:20px;margin-top:20px; margin-left:20px;margin-right:20px;text-align:left;"> 
    <f:facet name="header"> ----- Quick Job Posting -----</f:facet> 
    <h:outputText value="OLF Number " /> 
    <p:inputText value="#{jobs.jobDetail.OLF_No}" /> 
    <h:outputText value="RRF Number " /> 
    <p:inputText value="#{jobs.jobDetail.RRF_No}" /> 
    <h:outputText value="OLF Status " /> 
    <p:selectOneMenu value="#{jobs.jobDetail.OLF_Status}" style="margin-top:0px;margin-bottom:0px;height:5px;font-size:10px"> 
     <f:selectItem itemLabel="---- Select ----" itemValue="" /> 
     <f:selectItem itemLabel="Approved" itemValue="Approved" /> 
     <f:selectItem itemLabel="Pending Approval" itemValue="Pending Approval" /> 
     <f:selectItem itemLabel="New" itemValue="New" /> 
    </p:selectOneMenu> 

    <h:outputText value="RRF Type " /> 
    <p:selectOneMenu value="#{jobs.jobDetail.RRF_type}" style="margin-top:0px;margin-bottom:0px;height:5px;font-size:10px"> 
     <f:selectItem itemLabel="---- Select ----" itemValue="" /> 
     <f:selectItem itemLabel="Growth" itemValue="Growth" /> 
     <f:selectItem itemLabel="Replacement" itemValue="Replacement" /> 
    </p:selectOneMenu> 

屏幕截图

enter image description here

我该如何解决这个问题?

+0

后您的图像,并提供链接,我会上传图片 –

+0

感谢@jubinPatel,我有图片链接 –

+0

感谢@Sergio更新添加图像 –

回答

1

这在Primefaces 3.5中绝对是一个问题。我有完全相同的问题,降级到3.4解决了它。

作为一个数据点,值得注意的是渲染问题仅在通过p:remoteCommand导航到页面时才存在。正常的基于动作的导航工作正常,至少对我而言。

+0

另一个有趣的信息是,这似乎只是在谷歌浏览器中的一个问题,我只是尝试在Firefox和问题在那里消失了。 – argh1969

+0

在Primefaces 4.0中仍然存在问题 – argh1969

4

我加入以下CSS到我的网页此修正了这个问题:在我的selectonemenus

.ui-selectonemenu label.ui-selectonemenu-label{ 
    width:100% !important; 
} 

我也有固定的宽度。 希望这也有助于你的情况。 ;)在http://imageshack.us/