Bonjour,
je suis tjs dans mon appli VWP et je rencontre maintenant des soucis pour lier mon formulaire à mon Bean. J'ai trouvé sur le net la syntaxe mais elle ne correspond pas au JSP de VWP.
Exemple, voici le code d'index.jsp dans un projet Web :
Et voici la meme (avec un lien bidon en plus) avec VWP :
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 <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <h1>JSP Page</h1> </body> </html>
Y a t il un moyen d'avoir la meme syntaxe dans le VWP ? Car celle proposé n'est vraiment pas claire pour moi et je n'arrive pas a faire des choses de ce type :
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
17
18
19 <?xml version="1.0" encoding="UTF-8"?> <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf"> <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/> <f:view> <webuijsf:page binding="#{Page1.page1}" id="page1"> <webuijsf:html binding="#{Page1.html1}" id="html1"> <webuijsf:head binding="#{Page1.head1}" id="head1"> <webuijsf:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/> </webuijsf:head> <webuijsf:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid"> <webuijsf:form binding="#{Page1.form1}" id="form1"> <webuijsf:hyperlink actionExpression="#{Page1.hyperlink2_action}" binding="#{Page1.hyperlink2}" id="hyperlink2" style="left: 288px; top: 168px; position: absolute" text="Ajouter un produit !!"/> </webuijsf:form> </webuijsf:body> </webuijsf:html> </webuijsf:page> </f:view> </jsp:root>
<h:commandButton value="Creer" action="#{BeanProduit.actionCreer}"/>
ou
<h:inputText value="#{BeanProduit.nom}" id="nom"/>
Merci !
Partager