我的input.xhtml文件中有如下代码,它接受用户的输入。但是这个BootsFaces代码不起作用,如果有人以前遇到过这个问题,请有人帮我解决。
<b:form id="studentForm" styleClass="form-horizontal">
<h:panelGrid columns="1" cellpadding="5">
<b:inputText label="E-mail:" labelStyle="width:80px;">
<f:facet name="prepend">
<h:inputText value="#{studentBean.firstName}" styleClass="form-control" />
</f:facet>
</b:inputText>
</h:panelGrid>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<b:commandButton value="Create" action="#{studentBean.createStudentForm}" styleClass="btn btn-default" />
</div>
</div>
</b:form>发布于 2018-08-24 13:05:20
您使用的b:inputText不正确。您不应该在其中包装一个h:inputText。可以使用b:inputText标记绑定该值:
<b:inputText label="First name:"
labelStyle="width:80px;"
value="#{studentBean.firstName}"/>另请参阅:
https://stackoverflow.com/questions/51985746
复制相似问题