【发布时间】:2019-04-02 08:26:07
【问题描述】:
按照 PrimeFaces getting-started page 上给出的说明,我看到来自 SelectOneMenu 的奇怪渲染。它看起来不像我期望的那样。有谁知道为什么?
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:body>
<h:form>
<p:selectOneMenu id ="selectOneMenuCategorie" value="#{selectOneController.categorieSelected}" >
<f:selectItem itemLabel="Select One" noSelectionOption="true"/>
<f:selectItems value="#{selectOneController.categorieList}"
var = "c" itemLabel="#{c.libelle}" itemValue="#{c}"/>
<f:ajax render="selected_item1"/>
</p:selectOneMenu>
<h:outputText id="selected_item1" value="#{selectOneController.categorieSelected.libelle}"></h:outputText>
</h:form>
</h:body>
</html>
【问题讨论】:
-
您的 primefaces 似乎尚未安装。因为我已经在我的项目中运行了您的代码并且它可以工作。显示您的控制台。
标签: primefaces