【问题标题】:Press Enter doesn't work in h:inputSecret按 Enter 在 h:inputSecret 中不起作用
【发布时间】:2010-11-19 09:41:35
【问题描述】:

我和那个人有同样的问题:Enter Key Press behave like Submit in JSF 所以我的 Enter 按钮在h:inputSecret 中也不起作用。

他得到的答案对我来说还不够。我想为你添加一些代码:

     <h:form>
        <div class="box-login runny-bg round-corners" >
            <h6><h:outputText value="Bitte melden Sie sich an" styleClass="seperator text-center" /></h6>
            <br />
            <h:outputLabel for="name" value="Name" />
            <h:inputText id="name"  value="#{loginData.name}" />
            <h:outputLabel for="pw" value="Password" />
            <h:inputSecret id="pw"  value="#{loginData.pw}" />
            <h:outputLabel for="remember" value="Remember me" />
            <h:selectBooleanCheckbox id="remember" value="#{loginData.remember}"/>
            <br />
            <br />
            <div class="buttons left">
                <h:commandLink type="submit" action="#{loginController.login}" >
                   <h:outputText value=" Login" />
                </h:commandLink>
                <br />
            </div>
        </div>

    </h:form>

我该如何解决这个问题?

【问题讨论】:

    标签: jsf jsf-2


    【解决方案1】:

    您可以使用&lt;ice:inputSecret&gt; 来执行此操作:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-04-20
      • 2014-06-30
      • 1970-01-01
      • 1970-01-01
      • 2017-12-04
      • 1970-01-01
      • 1970-01-01
      • 2020-04-09
      相关资源
      最近更新 更多