[JSF][hibernete] valeur par défaut pour Input

Fermé
zirconias Messages postés 11 Date d'inscription mercredi 17 décembre 2008 Statut Membre Dernière intervention 3 juillet 2011 - 12 juil. 2010 à 13:50
zirconias Messages postés 11 Date d'inscription mercredi 17 décembre 2008 Statut Membre Dernière intervention 3 juillet 2011 - 12 juil. 2010 à 14:18
bonjour,
j'aimerais savoir comment faire pour afficher une valeur par défaut dans un
 
<f:view>
     <h:form>
            <h:panelGrid columns="2">
                
                LOGING<h:inputText id="login" value="#{authentification.c.password}" />
                    
                MOT DE PASSE<h:inputText id="mdp" value="#{authentification.c.password}"/>
                Type <h:selectOneListbox  id="type"  value="#{authentification.c.type}">
                    <f:selectItem itemValue="User" itemLabel="user"/>
                    <f:selectItem itemValue="admin" itemLabel="admin"/>
                    </h:selectOneListbox>
                </h:panelGrid>
                <h:commandButton value="Ajouter" action='#{authentification.modifier}'/>
        </h:form>
    </f:view>
</code

je veux remplire ces champs  avec 
<code>
${sessionScope.compte.login} <br />
            ${sessionScope.compte.password}<br />
            ${sessionScope.compte.type}

qui ont été rempli depuis un tag personnalisé :
<%@tag  import="Mon.app.loc.metier.bo.Compte" %>
<%@tag  import="Mon.app.loc.metier.ManagedBO.authentification" %>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
     <%
        Compte c=new Compte();
        c.setLogin(request.getParameter("id"));
        authentification auth= new authentification();
        auth.setC(c);
        c= auth.findCompte();
session.setAttribute("compte", c);
%> 
A voir également:

1 réponse

zirconias Messages postés 11 Date d'inscription mercredi 17 décembre 2008 Statut Membre Dernière intervention 3 juillet 2011 1
12 juil. 2010 à 14:18
UP svp
0