使用BootsFaces的JSF。 BootsFaces无法正常工作

时间:2018-08-23 12:23:55

标签: jsf bootsfaces

在我的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>

1 个答案:

答案 0 :(得分:0)

您错误地使用了b:inputText。您不应该在其中包装h:inputText。您可以使用b:inputText标签绑定值:

<b:inputText label="First name:"
             labelStyle="width:80px;"
             value="#{studentBean.firstName}"/>

另请参阅: