bonjour,
j'aimerais savoir comment faire pour afficher une valeur par défaut dans un
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 
<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>
je veux remplire ces champs avec
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
${sessionScope.compte.login} <br />
            ${sessionScope.compte.password}<br />
            ${sessionScope.compte.type}
qui ont été rempli depuis un tag personnalisé :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
<%@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);
%>