在从托管bean的页面加载期间设置jsf InputSecret的值 [英] Setting the value for jsf InputSecret during page load from the managed bean
问题描述
我正在创建一个数据库设置jsf页面,该页面显示页面加载期间属性文件中的值.然后,用户更新页面,然后按Submit,属性文件中的值将更新.
I am creating a database setting jsf page which shows the value from the properties file during the page load. The users then updates the page and press submit and the value get updated in the properties file.
我遵循了Balusc提供的解决方案
I followed this solution provided by Balusc
并在支持bean的构造函数中设置值.
and set the value in the constructor of the backing bean.
public DbSettingsBean()
{
this.setUserName(helper.getValueForProperty("user_name"));
this.setPassword(helper.getValueForProperty("password"));
}
虽然我设法在页面加载期间显示了属性文件中的用户名.在页面加载期间,我无法显示密码的inputsecret值.它保持空白.
While I managed to show the user name from the properties file during page load. I am unable to show the value of inputsecret for password during the page load. It remains blank.
还有其他方法可以在页面加载期间显示密码吗?
Is there any other way to show password during page load?
我正在使用JSF RI 1.2和Richfaces 3.3.2
I am using JSF RI 1.2 and Richfaces 3.3.2
预先感谢
推荐答案
<h:inputSecret value="#{bean.password}" redisplay="true" />