Bonjours,
svp j'ai dans ma page xhtml deux composant primefaces d'upload d'un fichier(composant1, composant 2);
Mon problème c'est quant je sélectionne un fichier dans le composant1 il est détecter aussi par le composant 2
Composant 1
composant 2
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <h:form id="uploadImage" enctype="multipart/form-data"> <p:fileUpload fileUploadListener="#{outillageController.handleFileUploadImage}" mode="advanced" multiple="false" showButtons="true" update=":outil:photo" sizeLimit="1000000000" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" cancelLabel="Annuler" label="Choisir" style="font-size: x-small"/> </h:form>
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 <h:form id="upload" enctype="multipart/form-data"> <!--multiple="true"--> <h:panelGrid columns="1" width="100%"> <h:panelGrid columns="2" width="100%"> <h:outputLabel value="Fichier :"/> <p:fileUpload fileUploadListener="#{outillageController.handleFileUpload}" mode="advanced" multiple="false" showButtons="true" sizeLimit="1000000000" allowTypes="/(\.|\/)(gif|jpe?g|png|pdf)$/" cancelLabel="Annuler" label="Choisir" style="font-size: x-small"/> </h:panelGrid> <h:panelGrid columns="2" width="60%"> <h:outputLabel value="#{bundle.CreateDocumentLabel_codeDocument}" /> <h:outputLabel value="#{outillageController.codeFichierAuto}" title="#{bundle.CreateDocumentTitle_codeDocument}"> <p:ajax event="keyup" /> </h:outputLabel> </h:panelGrid> </h:panelGrid> </h:form>
Partager