解决h:inputSecret在被重新渲染后密码丢失!<转>


下面代码在在出发后 <h:inputSecret>中的密码被清空
<h:inputSecret id='password' size='50' maxlength='128' value='#{register.password}' required='true'>
    <a:support event='onblur' reRender='passwordDecoration' bypassUpdates='true' ajaxSingle='true' />
</h:inputSecret>

解决办法是添加 redisplay="true"属性,如下:
<h:inputSecret id="password" size="50" maxlength="128" value="#{register.password}" redisplay="true" required="true">
    <a:support event="onblur" reRender="passwordDecoration" bypassUpdates="true" ajaxSingle="true" />
</h:inputSecret>

你可能感兴趣的:(input)