为什么我的命令按钮不能与selectOneMenu一起使用?

时间:2019-01-15 18:55:41

标签: jsf bootsfaces

我有以下页面:

    <b:form>
        <b:selectOneMenu colMd="4" value="#{currentUserController.currentUser}" converter="omnifaces.SelectItemsConverter">
            <f:selectItems value="#{currentUserController.users}" var="user" itemValue="#{user}" itemLabel="${user.name} ${user.firstName}"/>
        </b:selectOneMenu>
        <b:commandButton value="hey" action="#{currentUserController.login()}"></b:commandButton>
    </b:form>
    <b:form>
        <b:commandButton value="hey" action="#{currentUserController.login()}"></b:commandButton>
    </b:form>

第一个按钮不起作用。当我单击它时,没有重定向发生。 第二件作品。 我需要第一个工作,否则当前用户将无法初始化

我该如何解决?

编辑:当我单击第二个按钮时,控制器(bean)中的登录方法可以正确重定向到我的另一页。

0 个答案:

没有答案
相关问题