remplir HashMap dans dataDefinitionList
Bonjour,
je rencontre un probleme au moment de populer une map (string,string).
j'utilise une liste de "dateTarif" qui est une classe ayant une date et une map.
l'orsque je fait valider mon formulaire , les dates entrée sont transmise mais pas les tarifs ne sont pas present dans le hashMap.
page JSF
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 27
|
<rich:dataDefinitionList var="variable" value="#{product.tarifs}">
<table>
<tr>
<td>
<h:outputText value="Date: " />
</td>
<td>
<a4j:outputPanel layout="block">
<rich:calendar value="#{variable.datee}" >
</a4j:outputPanel>
</td>
<td>
<h:outputText value="Tarif Adulte: " />
</td>
<td>
<h:inputText value="#{variable.tarif['tarifAdulte']}" />
</td>
<td>
<h:outputText value="Tarif Enfant: " />
</td>
<td>
<h:inputText value="#{variable.tarif['tarifEnfant']}" />
</td>
</table>
<rich:dataDefinitionList |
backing bean
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| public class ProductController {
private List <DateTarif> tarif=new ArrayList<DateTarif>();
public ProductController(){
DateTarif t1=new DateTarif();
tarif.add(t1);
tarif.add(t2);
}
} |
classe Date Tarif
Code:
1 2 3 4 5 6
| public class DateTarif {
private Date datee=new Date();
private Map<String,String> tarif = new HashMap<String,String>();
} |
merci d'avance pour vos reponses.