【发布时间】:2016-08-26 03:34:21
【问题描述】:
我正在尝试使用 PrimeFaces inputText 文本框来获取用户输入。即使我添加了占位符属性,文本也没有出现在文本框中。我需要为此包含任何库吗?下面是我的jsf页面。
<ui:composition template="/template/master-layout.xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<ui:define name="head"> test header </ui:define>
<ui:define name="meta">
<f:metadata>
<f:event type="preRenderView" listener="#{HomeBean.initPage}"></f:event>
</f:metadata>
</ui:define>
<ui:define name="mainContainer">
<div class="row">
<div class="col-sm-12">
<p:inputText placeholder="Your ID" styleClass="form-control service-input-border" maxlength="20" id="Id"
value="#{homeBean.Id}"></p:inputText>
</div>
</div>
</ui:define>
</ui:composition>
【问题讨论】:
标签: jsf-2 primefaces