Salut tous le monde, j'ai une idée que je veux la développé mais j'ai pas l'outil nécessaire ou bien la connaissance parfaite d'environnement du web avec JSF.
Bon voilà ma besoin j'ai un datatable qui va afficher la liste des lots d'un marché
et voila la classe Lot.java
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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59 <h:form> <rich:panel style=" width : 100%;"> <f:facet name="header"> <h:panelGrid columns="1"> <h:outputText value="Liste des lots disponibles"/> </h:panelGrid> </f:facet> <rich:dataTable value="#{suiviLotBean.listLotDM}" var="lotdt" id="data" rows="8" style=" width : 100%;"> <rich:column sortBy="#{lotdt.id.lotReference}" filterBy="#{lotdt.id.lotReference}" filterEvent="onkeyup" label="lot id"> <f:facet name="header"> <h:outputText value="Id" /> </f:facet> <h:outputText value="#{lotdt.id.lotReference}" /> </rich:column> <rich:column sortBy="#{lotdt.lotLibelle}" filterBy="#{lotdt.lotLibelle}" filterEvent="onkeyup" label="Libelle"> <f:facet name="header"> <h:outputText value="Libellé" /> </f:facet> <h:outputText value="#{lotdt.lotLibelle}" /> </rich:column> <rich:column sortBy="#{lotdt.lotEtat}" filterBy="#{lotdt.lotEtat}" filterEvent="onkeyup" label="Etat"> <f:facet name="header"> <h:outputText value="Etat" /> </f:facet> <h:outputText value="#{lotdt.lotEtat}" /> </rich:column> <rich:column sortBy="#{lotdt.lotNombrePhases}" filterBy="#{lotdt.lotNombrePhases}" filterEvent="onkeyup" label="Nombre de phases"> <f:facet name="header"> <h:outputText value="Nombre de phases" /> </f:facet> <h:outputText value="#{lotdt.lotNombrePhases}" /> </rich:column> <rich:column> <f:facet name="header"> <h:outputText value="Operations" /> </f:facet> <h:panelGrid columns="2"> <a4j:commandLink action="#{suiviLotBean.getSelectionRow}" oncomplete="document.location.href='DetailsLot.jsf'"> <h:graphicImage value="../framGraphique/images/details.gif" alt="Detail" /> </a4j:commandLink> <a4j:commandLink action="#{suiviLotBean.getSelectionRow}" oncomplete="#{rich:component('modifieretat')}.show()"> <h:graphicImage value="../framGraphique/images/Edit.png" alt="Update" /> </a4j:commandLink> </h:panelGrid> </rich:column> </rich:dataTable> <rich:datascroller for="data" id="scroller" /> <div align="center"> <h:outputText value=" Nombre d'enregistrements :" /> <h:outputText id="compt" value="#{suiviLotBean.compteur}"/> </div> </rich:panel> </h:form>
et bein je veux faire un traitement sur les données récupérés par la base de données sur l'etat du lot (receptionner ou non réceptionner), si l'état est 'réceptionner' dans la DataTable on trouve à la place de le mot receptionner une image indique la réception du lot et si le lot est non réceptionné on trouve une autre image dans la dataTable.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 public class Lot{ private LotId id; private Marche marche; private String lotLibelle; private Integer lotMontantHt; private String lotEtat; private Set<Phase> phases = new HashSet<Phase>(0);
Tout Marche nickel pour l'affichage des données (la liste des lots disponible pour un marché donné) dans la dataTable.
Merci pour votre aide d'avance
Partager