Pb récupération propriété d'un formulaire
Bonjour,
Je n'arrive pas à récupérer dans mon DispatchAction une propriété (motif) de mon formbean (goToPlanning) mise à jour dans mon formulaire.
JSP :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| <html:form action="/managePlanning">
<div id="planningjournee">
<layout:textarea key="nature_consult"
name="goToPlanning"
property="motif"
isRequired="false"
size="35"
rows="3"
layout="false"
styleId="idMotif"
/>
<layout:row>
<layout:collection name="goToPlanning" property="planningApresMidi" id="item"
styleClass="FORM" title="">
<layout:collectionItem title=" " style="width:100px">
<bean:define id="actionAdd" >
<bean:message key="planning.addRDVApresMidi"/>
</bean:define>
<html:link action="/managePlanning.do?horaire=${item.key}" paramId="reqCode" paramName="actionAdd" indexed="">
Insérer RDV
</html:link>
</layout:collectionItem>
</layout:collection>
</layout:row>
</div> |
mon Action :
Code:
1 2
| GoToPlanning GTP = (GoToPlanning) form;
String motif = GTP.getMotif(); |
Il doit manquer un submit pour pouvoir récupérer cette valeur? mais je ne sais pas comment.
Sinon j'ai essayé de passer par du javascript :
Code:
1 2 3
| function setMotif(target) {
alert(target);
document.goToPlanning[1].motif.value=target;} |
Mon alert m'affiche bien la bonne valeur, mais dans mon action la propriété motif est toujours vide.
Je commence un peu à sécher là...
Merci d'avance pour votre aide!