webtier@glassfish.java.net

[JSF] intializing inputSecret field with a bean value

From: Pascal Maugeri <pascal.maugeri_at_gmail.com>
Date: Wed, 14 Oct 2009 13:09:00 +0200

Hi

(Let me know if the following is not appropriate to this mailing-list).

I don't manage to have an inputSecret field initialized with a bean value.

For instance the following does work (the field shows the existing
password):

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

[...]

                <h:inputText value="#{userBean.password}" required="true" >
                    <f:validator validatorId="UserPasswordValidator"/>
                </h:inputText>

but replacing inputText with inputSecret, the field is not initialized with
the bean attribute value:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

[...]

                <h:inputSecret value="#{userBean.password}" required="true"
>
                    <f:validator validatorId="UserPasswordValidator"/>
                </h:inputSecret>

Is there any limitation with inputSecret field that prevents an
initialization ?

Regards,
Pascal