Hello à tous,
Voici un aperçu de ma table (qui est aussi ma vue au format XHTML).
La colone Total n'existe pas dans ma DB, elle est créée depuis mon XHTML.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 <p:column> <f:facet name="header"> <h:outputText value="TOTAL"/> </f:facet> <h:outputText value="#{expendReportController.total}"/> </p:column>
Je tente dans un 1er temps de multiplier les Km par le TxCoefDeplacement.
Voici mon controller.
Merci à tous :-)
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
20
21 private ExpendReport total; @PostConstruct public void init() { this.total = new ExpendReport(); } public ExpendReport getTotal() { return total; } public void setTotal(ExpendReport total) { this.total = total; } public double totalLigne() { double totalL; totalL = total.getKm() * total.getTxCoefDeplacement(); return totalL; }
Partager