IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JSF Java Discussion :

Désactiver un commandButton après avoir cliqué


Sujet :

JSF Java

  1. #1
    Membre éclairé
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    279
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 279
    Par défaut Désactiver un commandButton après avoir cliqué
    Bonjour,

    Lorsque je clic sur le bouton "export", je fais un export des lignes d'une table vers un fichier Excel.

    Ce traitement peut etre long en fonction du nombre de lignes de la table (prend plus d'une minute)

    Au cours de l'export, je veux desactiver le button pour ne pas re-cliquer (refaire le traitement en cours) et le réactiver à la fin de l'export

    Pendant l'export le navigateur montre qu'il y'a un traitement en cours non terminé (c'est normal parceque ca correspond au submit)

    J'ai utiliser un boolean pour desactiver mais le commandButton ne se met pas à jour, pareil avec un binding; voici le code jsf utiliser :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    <h:commandButton styleClass="inputbtn" style="margin-left:2px" 
    							value="#{bundle['prompt.notesDeService.recherchePrixTransport.exporterPrix']}"
    							action="#{recherchePrixTransport.bean.exporter}"  
    							rendered="#{recherchePrixTransport.bean.saisieValide}"
    							disabled="#{recherchePrixTransport.bean.exportButtonClicked}"
    							actionListener="#{recherchePrixTransport.bean.exporterListener}"
    							binding="#{recherchePrixTransport.bean.exportButton}"/>
    Je ne sais pas s'il y'a une solution pour desactiver le button en cours du traitement

  2. #2
    Membre expérimenté
    Inscrit en
    Décembre 2009
    Messages
    282
    Détails du profil
    Informations forums :
    Inscription : Décembre 2009
    Messages : 282
    Par défaut
    Rajoute un onclick juste ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    <h:commandButton styleClass="inputbtn" style="margin-left:2px" 
    							value="#{bundle['prompt.notesDeService.recherchePrixTransport.exporterPrix']}"
    							onclick="this.disabled = true; "
    							action="#{recherchePrixTransport.bean.exporter}"  
    							rendered="#{recherchePrixTransport.bean.saisieValide}"
    							disabled="#{recherchePrixTransport.bean.exportButtonClicked}"
    							actionListener="#{recherchePrixTransport.bean.exporterListener}"
    							binding="#{recherchePrixTransport.bean.exportButton}"/>

  3. #3
    Membre éclairé
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    279
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 279
    Par défaut
    Citation Envoyé par ticroch Voir le message
    Rajoute un onclick juste ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    <h:commandButton styleClass="inputbtn" style="margin-left:2px" 
    							value="#{bundle['prompt.notesDeService.recherchePrixTransport.exporterPrix']}"
    							onclick="this.disabled = true; "
    							action="#{recherchePrixTransport.bean.exporter}"  
    							rendered="#{recherchePrixTransport.bean.saisieValide}"
    							disabled="#{recherchePrixTransport.bean.exportButtonClicked}"
    							actionListener="#{recherchePrixTransport.bean.exporterListener}"
    							binding="#{recherchePrixTransport.bean.exportButton}"/>
    En ajout "onclick" le bouton se desactive mais l'action n'est pas eu lieu...ca ne se passe rien apres le clic sur le commandButton

  4. #4
    Membre expérimenté
    Inscrit en
    Décembre 2009
    Messages
    282
    Détails du profil
    Informations forums :
    Inscription : Décembre 2009
    Messages : 282
    Par défaut
    Ah c'est que le onclick a du écraser l'autre évènement ... Je ne connais pas trop JSF donc je peux pas t'aider dsl, je sais faire ces trucs la juste en JavaScript ....

  5. #5
    Rédacteur
    Avatar de romaintaz
    Homme Profil pro
    Java craftsman
    Inscrit en
    Juillet 2005
    Messages
    3 790
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Java craftsman
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2005
    Messages : 3 790
    Par défaut
    Le problème est le suivant :
    quand l'utilisateur clique sur le bouton, celui-ci va se désactiver avant de traiter la demande (i.e. l'envoi du formulaire). Or en se désactivant, il refusera de traiter la demande

    Pour résoudre ton problème, il te suffit de décaler la désactivation du bouton de quelques dizaines de ms, ce qui empêchera donc l'utilisateur de cliquer à nouveau sur le bouton, mais qui n'empêchera pas la soumission du formulaire.

    Pour ce faire :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    <h:commandButton ... onclick="disableMe(this.id);"/>
     
    <script type="text/javascript">
    function disableMe(btnId) {
        setTimeout("document.getElementById('" + btnId + "').disabled = true;", 10);
    }
    </script>
    (oui, il y a des façons plus élégantes de faire, mais bon)
    Nous sommes tous semblables, alors acceptons nos différences !
    --------------------------------------------------------------
    Liens : Blog | Page DVP | Twitter
    Articles : Hudson | Sonar | Outils de builds Java Maven 3 | Play! 1 | TeamCity| CitConf 2009
    Critiques : Apache Maven

  6. #6
    Membre éclairé
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    279
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 279
    Par défaut
    Merci Romain, le bouton se désactive et l'action se fait correctement.

    ça me reste seulement à le réactiver quand l'action se termine automatiquement

    Citation Envoyé par romaintaz Voir le message
    Le problème est le suivant :
    quand l'utilisateur clique sur le bouton, celui-ci va se désactiver avant de traiter la demande (i.e. l'envoi du formulaire). Or en se désactivant, il refusera de traiter la demande

    Pour résoudre ton problème, il te suffit de décaler la désactivation du bouton de quelques dizaines de ms, ce qui empêchera donc l'utilisateur de cliquer à nouveau sur le bouton, mais qui n'empêchera pas la soumission du formulaire.

    Pour ce faire :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    <h:commandButton ... onclick="disableMe(this.id);"/>
     
    <script type="text/javascript">
    function disableMe(btnId) {
        setTimeout("document.getElementById('" + btnId + "').disabled = true;", 10);
    }
    </script>
    (oui, il y a des façons plus élégantes de faire, mais bon)

  7. #7
    Rédacteur
    Avatar de romaintaz
    Homme Profil pro
    Java craftsman
    Inscrit en
    Juillet 2005
    Messages
    3 790
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Java craftsman
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2005
    Messages : 3 790
    Par défaut
    Si c'est un commandButton "basique" (donc non Ajax), tu n'as pas à t'en faire, car toute la page sera rafraichie, et donc le bouton sera de nouveau actif.

    Sinon, il suffit d'écrire la même fonction, mais en mettant xxx.disabled = false; et d'affecter l'appel de cette fonction JavaScript à l'événement "oncomplete" (si c'est un composant Richfaces)
    Nous sommes tous semblables, alors acceptons nos différences !
    --------------------------------------------------------------
    Liens : Blog | Page DVP | Twitter
    Articles : Hudson | Sonar | Outils de builds Java Maven 3 | Play! 1 | TeamCity| CitConf 2009
    Critiques : Apache Maven

  8. #8
    Membre éclairé
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    279
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 279
    Par défaut
    Citation Envoyé par romaintaz Voir le message
    Si c'est un commandButton "basique" (donc non Ajax), tu n'as pas à t'en faire, car toute la page sera rafraichie, et donc le bouton sera de nouveau actif.

    Sinon, il suffit d'écrire la même fonction, mais en mettant xxx.disabled = false; et d'affecter l'appel de cette fonction JavaScript à l'événement "oncomplete" (si c'est un composant Richfaces)
    Non, j'utilise le composant standard de JSF, apres la fin du traitement, la page est actualisé mais pas le bouton

  9. #9
    Rédacteur
    Avatar de romaintaz
    Homme Profil pro
    Java craftsman
    Inscrit en
    Juillet 2005
    Messages
    3 790
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Yvelines (Île de France)

    Informations professionnelles :
    Activité : Java craftsman
    Secteur : Finance

    Informations forums :
    Inscription : Juillet 2005
    Messages : 3 790
    Par défaut
    Je ne comprends pas bien. Si la page se réactualise entièrement, cela doit inclure le bouton, non ? Tu veux dire qu'une fois l'action terminée, le bouton reste inactif ?

    Peux-tu nous montrer le code de ta page ?
    Nous sommes tous semblables, alors acceptons nos différences !
    --------------------------------------------------------------
    Liens : Blog | Page DVP | Twitter
    Articles : Hudson | Sonar | Outils de builds Java Maven 3 | Play! 1 | TeamCity| CitConf 2009
    Critiques : Apache Maven

  10. #10
    Membre éclairé
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    279
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 279
    Par défaut
    Citation Envoyé par romaintaz Voir le message
    Je ne comprends pas bien. Si la page se réactualise entièrement, cela doit inclure le bouton, non ? Tu veux dire qu'une fois l'action terminée, le bouton reste inactif ?

    Peux-tu nous montrer le code de ta page ?
    Oui, il reste incatif, voici le code du bouton exporter et au dessous le code complet de la page :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
     
     
    <h:panelGrid columns="1">
    	<h:commandButton styleClass="inputbtn" style="margin-left:2px"
    		id="btnExport"
    		value="#{bundle['prompt.notesDeService.recherchePrixTransport.exporterPrix']}"
    	action="#{recherchePrixTransport.bean.exporter}"
    	rendered="#{recherchePrixTransport.bean.saisieValide}"
    	actionListener="#{recherchePrixTransport.bean.exporterListener}"
    	onclick="disableMe(this.id);"
    	/>
     
    </h:panelGrid>
    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
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
     
     
    <%@ page import="com.stva.domaine.referentiel.TypeTiers"%>
    <%@ taglib prefix="tiles" uri="/WEB-INF/struts-tiles.tld"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <%@ taglib uri="/WEB-INF/tomahawk.tld" prefix="t"%>
    <%@ taglib prefix="ig"
    	uri="http://www.infragistics.com/faces/netadvantage"%>
    <%@ taglib prefix="finder" uri="/WEB-INF/jsf-finder.tld"%>
     
    <!--   <%=this.getClass().getName()%> ===================================== -->
     
    <tiles:insert
    	page="/contents/faces/transports/prix/viewNoteDeService.jsp" />
     
    <script type="text/javascript">
    	function disableMe(btnId) {
        setTimeout("document.getElementById('" + btnId + "').disabled = true;", 10);
    }
    </script>
     
    <h:panelGrid width="100%"
    	rendered="#{!recherchePrixTransport.bean.avecTrafic}">
    	<f:verbatim>
    		<div class="bodypart">
    			<hr>
    	</f:verbatim>
    	<h:outputText styleClass="info"
    		value="#{bundle['infos.jsf.global.header']}" />
    	<h:outputText styleClass="infoLine"
    		value="#{bundle['errors.gestionprix.aucuntrafic']}" />
    	<f:verbatim>
    		<hr>
    		</div>
    	</f:verbatim>
    </h:panelGrid>
     
    <h:form id="recherchePrixTransport" enctype="multipart/form-data"
    	rendered="#{recherchePrixTransport.bean.avecTrafic}">
     
    	<ig:tabView id="tabMultiRecherche"
    		selectTabItemListener="#{recherchePrixTransport.bean.changePanel}">
    		<ig:tabItem id="tabRecherche"
    			value="#{bundle['title.notesDeService.recherchePrixTransport.ongletRecherche']}"
    			selected="#{recherchePrixTransport.bean.recherchePrix}">
    			<h:panelGrid headerClass="caption" columns="1" border="0"
    				rendered="#{recherchePrixTransport.bean.recherchePrix}"
    				cellpadding="0" cellspacing="0" columnClasses="td" width="100%">
    				<f:facet name="header">
    					<h:panelGroup>
    						<h:outputText
    							value="#{bundle['prompt.notesDeService.recherchePrixTransport.caption']}" />
    					</h:panelGroup>
    				</f:facet>
     
     
    				<h:column>
    					<h:panelGrid headerClass="caption" columns="2" border="1"
    						cellpadding="0" cellspacing="0" columnClasses="th-150, td"
    						width="100%">
    						<h:column>
    							<h:outputText
    								value="#{bundle['prompt.relations.relation.label.type']}" />
    						</h:column>
    						<h:column>
    							<h:panelGroup
    								rendered="#{!recherchePrixTransport.bean.typeValide}">
    								<h:selectOneMenu required="true" id="selectTypeRelation"
    									value="#{recherchePrixTransport.bean.type}">
    									<f:selectItems value="#{recherchePrixTransport.bean.comboType}" />
    								</h:selectOneMenu>
    								<h:commandLink type="submit"
    									action="#{recherchePrixTransport.bean.valideType}">
    									<h:graphicImage value="/common/images/ok.gif" />
    								</h:commandLink>
    							</h:panelGroup>
    							<h:panelGroup
    								rendered="#{recherchePrixTransport.bean.typeValide}">
    								<h:outputText value="#{recherchePrixTransport.bean.libelleType}" />
    								<h:commandLink type="submit"
    									action="#{recherchePrixTransport.bean.annuleType}">
    									<h:graphicImage value="/common/images/can.gif" />
    								</h:commandLink>
    							</h:panelGroup>
    						</h:column>
    					</h:panelGrid>
    				</h:column>
    				<h:column rendered="#{recherchePrixTransport.bean.viewPointA}">
    					<h:panelGrid headerClass="caption" columns="2" border="1"
    						cellpadding="0" cellspacing="0" columnClasses="th-150, td"
    						width="100%">
    						<h:column>
    							<h:outputText
    								value="#{recherchePrixTransport.bean.libelleHeaderPointA}" />
    						</h:column>
    						<h:column>
    							<h:panelGroup
    								rendered="#{!recherchePrixTransport.bean.pointAValide}">
    								<h:selectOneMenu immediate="true" onchange="submit()"
    									id="selectPointA"
    									valueChangeListener="#{recherchePrixTransport.bean.filtrerListesCombo}"
    									value="#{recherchePrixTransport.bean.pointA}">
    									<f:selectItems
    										value="#{recherchePrixTransport.bean.comboPointA}" />
    								</h:selectOneMenu>
    							</h:panelGroup>
    						</h:column>
    					</h:panelGrid>
    				</h:column>
     
     
    				<h:column rendered="#{recherchePrixTransport.bean.viewPointB}">
    					<h:panelGrid headerClass="caption" columns="2" border="1"
    						cellpadding="0" cellspacing="0" columnClasses="th-150, td"
    						width="100%">
    						<h:column>
    							<h:outputText
    								value="#{recherchePrixTransport.bean.libelleHeaderPointB}" />
    						</h:column>
    						<h:column>
    							<h:panelGroup
    								rendered="#{!recherchePrixTransport.bean.pointBValide}">
    								<h:selectOneMenu immediate="true" required="true"
    									id="selectPointB" value="#{recherchePrixTransport.bean.pointB}">
    									<f:selectItems
    										value="#{recherchePrixTransport.bean.comboPointB}" />
    								</h:selectOneMenu>
    							</h:panelGroup>
    						</h:column>
    					</h:panelGrid>
    				</h:column>
    				<h:column rendered="#{recherchePrixTransport.bean.viewPointC}">
    					<h:panelGrid headerClass="caption" columns="2" border="1"
    						cellpadding="0" cellspacing="0" columnClasses="th-150, td"
    						width="100%">
    						<h:column>
    							<h:outputText
    								value="#{recherchePrixTransport.bean.libelleHeaderPointC}" />
    						</h:column>
    						<h:column>
    							<h:panelGroup
    								rendered="#{!recherchePrixTransport.bean.pointCValide}">
    								<h:selectOneMenu immediate="true" required="true"
    									id="selectPointC" value="#{recherchePrixTransport.bean.pointC}">
    									<f:selectItems
    										value="#{recherchePrixTransport.bean.comboPointC}" />
    								</h:selectOneMenu>
    							</h:panelGroup>
    						</h:column>
    					</h:panelGrid>
    				</h:column>
    				<h:column rendered="#{recherchePrixTransport.bean.viewService}">
    					<h:panelGrid headerClass="caption" columns="2" border="1"
    						cellpadding="0" cellspacing="0" columnClasses="th-150, td"
    						width="100%">
    						<h:column>
    							<h:outputText
    								value="#{bundle['prompt.notesDeService.ajoutePrixTransport.label.service']}" />
    						</h:column>
    						<h:column>
    							<h:panelGroup
    								rendered="#{!recherchePrixTransport.bean.serviceValide}">
    								<h:selectOneMenu immediate="true" id="selectService"
    									value="#{recherchePrixTransport.bean.service}">
    									<f:selectItems
    										value="#{recherchePrixTransport.bean.comboService}" />
     
    								</h:selectOneMenu>
    							</h:panelGroup>
    						</h:column>
    					</h:panelGrid>
    				</h:column>
    				<h:column rendered="#{recherchePrixTransport.bean.viewSens}">
    					<h:panelGrid headerClass="caption" columns="2" border="1"
    						cellpadding="0" cellspacing="0" columnClasses="th-150, td"
    						width="100%">
    						<h:column>
    							<h:outputText
    								value="#{bundle['prompt.notesDeService.ajoutePrixTransport.label.sens']}" />
    						</h:column>
    						<h:column>
    							<h:panelGroup
    								rendered="#{!recherchePrixTransport.bean.sensValide}">
    								<h:selectOneMenu immediate="true" id="selectSens"
    									value="#{recherchePrixTransport.bean.sens}">
    									<f:selectItems value="#{recherchePrixTransport.bean.comboSens}" />
    								</h:selectOneMenu>
    							</h:panelGroup>
    						</h:column>
    					</h:panelGrid>
    				</h:column>
    			</h:panelGrid>
     
    			<h:column>
    				<h:panelGrid columns="1" border="0" cellpadding="0" cellspacing="0"
    					width="100%">
    					<h:column>
    						<h:panelGroup>
    							<h:commandButton styleClass="inputbtn"
    								rendered="#{recherchePrixTransport.bean.saisieValide}"
    								value="#{bundle['prompt.relations.rechercheRelations.button.rechercher']}"
    								action="#{recherchePrixTransport.bean.recherche}" />
    							<h:commandButton styleClass="inputbtn"
    								rendered="#{recherchePrixTransport.bean.saisieValide}"
    								value="#{bundle['prompt.notedeservice.prixservtransp.reinitialiser']}"
    								actionListener="#{recherchePrixTransport.bean.reinitialiserTableauPrixListener}"
    								action="#{recherchePrixTransport.bean.reinitialiserTableauPrix}" />
    						</h:panelGroup>
    					</h:column>
    				</h:panelGrid>
    			</h:column>
     
     
    			<h:panelGrid headerClass="caption" footerClass="footertable"
    				columns="1" border="0" columnClasses="td" width="100%">
    				<f:facet name="header">
    					<h:panelGroup>
    						<h:outputText
    							value="#{bundle['prompt.notesDeService.recherchePrixTransport.listeresultats.caption']}" />
    						<h:commandLink action="#{recherchePrixTransport.bean.ajoute}">
    							<h:graphicImage value="/common/images/plus.gif" />
    						</h:commandLink>
    					</h:panelGroup>
    				</f:facet>
     
    				<h:panelGrid columns="2">
     
    					<h:panelGrid columns="2" width="100%"
    						rendered="#{recherchePrixTransport.bean.etatNDS eq 1}">
     
    						<t:inputFileUpload accept="true" id="myFileId" size="50"
    							value="#{recherchePrixTransport.bean.fichier}" storage="file"
    							required="false"
    							rendered="#{recherchePrixTransport.bean.saisieValide}" />
     
    						<h:commandButton styleClass="inputbtn"
    							value="#{bundle['prompt.notesDeService.recherchePrixTransport.importerPrix']}"
    							action="#{recherchePrixTransport.bean.importer}"
    							rendered="#{recherchePrixTransport.bean.saisieValide}" />
    					</h:panelGrid>
     
    					<h:panelGrid columns="1">
    						<h:commandButton styleClass="inputbtn" style="margin-left:2px"
    							id="btnExport"
    							value="#{bundle['prompt.notesDeService.recherchePrixTransport.exporterPrix']}"
    							action="#{recherchePrixTransport.bean.exporter}"
    							rendered="#{recherchePrixTransport.bean.saisieValide}"
    							actionListener="#{recherchePrixTransport.bean.exporterListener}"
    							onclick="disableMe(this.id);"
    							/>
     
    					</h:panelGrid>
    				</h:panelGrid>
     
    				<h:column>
    					<ig:gridView id="prixTransport"
    						binding="#{recherchePrixTransport.bean.gridViewPrixTransport}"
    						dataKeyName="index" pageSize="5">
    						<ig:column sortBy="libelleService">
    							<f:facet name="header">
    								<h:outputText
    									value="#{bundle['prompt.notesDeService.ajoutePrixTransport.label.service']}" />
    							</f:facet>
    							<h:outputText value="#{DATA_ROW.libelleService}" />
    						</ig:column>
     
     
    						<ig:column sortBy="libelleNom">
    							<f:facet name="header">
    								<h:outputText
    									value="#{bundle['prompt.notesDeService.ajoutePrixTransport.label.nom']}" />
    							</f:facet>
    							<h:outputText value="#{DATA_ROW.libelleNom}" />
    						</ig:column>
     
    						<ig:column sortBy="libelleTransporteur1">
    							<f:facet name="header">
    								<h:outputText
    									value="#{recherchePrixTransport.bean.libelleHeaderColTransporteur1}" />
    							</f:facet>
    							<h:outputText value="#{DATA_ROW.libelleTransporteur1}" />
    						</ig:column>
     
    						<ig:column sortBy="prix">
    							<f:facet name="header">
    								<h:outputText
    									value="#{bundle['prompt.notesDeService.ajoutePrixTransport.label.prix']}" />
    							</f:facet>
    							<h:outputText value="#{DATA_ROW.prix}">
    								<f:convertNumber minFractionDigits="2" />
    							</h:outputText>
    						</ig:column>
     
    						<ig:column>
    							<h:panelGroup>
    								<h:commandLink type="submit"
    									rendered="#{!recherchePrixTransport.bean.suppression}"
    									actionListener="#{recherchePrixTransport.bean.edite}"
    									action="#{recherchePrixTransport.bean.edite}">
    									<h:graphicImage value="/common/images/edit.gif" />
    								</h:commandLink>
    								<h:commandLink type="submit"
    									rendered="#{!recherchePrixTransport.bean.suppression}"
    									actionListener="#{recherchePrixTransport.bean.supprime}">
    									<h:graphicImage value="/common/images/del.gif" />
    								</h:commandLink>
    								<h:commandLink type="submit"
    									rendered="#{recherchePrixTransport.bean.suppression && DATA_ROW.index == recherchePrixTransport.bean.indexToDelete}"
    									actionListener="#{recherchePrixTransport.bean.valideSupprime}">
    									<h:graphicImage value="/common/images/ok.gif" />
    								</h:commandLink>
    								<h:commandLink type="submit"
    									rendered="#{recherchePrixTransport.bean.suppression && DATA_ROW.index == recherchePrixTransport.bean.indexToDelete}"
    									actionListener="#{recherchePrixTransport.bean.annuleSupprime}">
    									<h:graphicImage value="/common/images/can.gif" />
    								</h:commandLink>
    							</h:panelGroup>
    						</ig:column>
    					</ig:gridView>
    				</h:column>
    				<f:facet name="footer">
    					<h:panelGroup>
    						<h:outputText
    							value="#{bundle['prompt.notesDeService.recherchePrixTransport.resultat.size']}" />
    						<h:outputText
    							value="#{recherchePrixTransport.bean.listePrixTransportSize}" />
    					</h:panelGroup>
    				</f:facet>
    			</h:panelGrid>
    		</ig:tabItem>
     
    		<ig:tabItem id="tabGenerationPrix"
    			value="#{bundle['title.notesDeService.recherchePrixTransport.ongletGeneration']}"
    			selected="#{!recherchePrixTransport.bean.recherchePrix}">
    			<h:panelGrid headerClass="caption" columns="1" border="0"
    				rendered="#{!recherchePrixTransport.bean.recherchePrix}"
    				cellpadding="0" cellspacing="0" columnClasses="td" width="100%">
    				<f:facet name="header">
    					<h:panelGroup>
    						<h:outputText
    							value="#{bundle['prompt.notesDeService.recherchePrixTransport.generationPrix.title']}" />
    					</h:panelGroup>
    				</f:facet>
    				<h:column>
    					<h:panelGrid headerClass="caption" columns="2" border="1"
    						cellpadding="0" cellspacing="0" columnClasses="th-150, td"
    						width="100%">
    						<h:column>
    							<h:outputText
    								value="#{bundle['prompt.notesDeService.recherchePrixTransport.generationPrix.modeleReference']}" />
    						</h:column>
    						<h:column>
    							<h:panelGroup>
    								<ig:dropDownList id="igselectMarqueReference"
    									dataSource="#{recherchePrixTransport.bean.comboMarqueRef}"
    									valueChangeListener="#{recherchePrixTransport.bean.marqueRefSelected}"
    									value="#{recherchePrixTransport.bean.marqueRef}"
    									smartRefreshIds="selectModeleReference" />
    								<h:selectOneMenu id="selectModeleReference"
    									value="#{recherchePrixTransport.bean.modeleRef}">
    									<f:selectItems
    										value="#{recherchePrixTransport.bean.comboModeleRef}" />
    								</h:selectOneMenu>
    							</h:panelGroup>
    						</h:column>
    						<h:column>
    							<h:outputText
    								value="#{bundle['prompt.notesDeService.recherchePrixTransport.generationPrix.modeleCible']}" />
    						</h:column>
    						<h:column>
    							<h:panelGroup>
    								<ig:dropDownList id="igselectMarqueCible"
    									dataSource="#{recherchePrixTransport.bean.comboMarqueCible}"
    									valueChangeListener="#{recherchePrixTransport.bean.marqueCibleSelected}"
    									value="#{recherchePrixTransport.bean.marqueCible}"
    									smartRefreshIds="selectModeleCible" />
    								<h:selectOneMenu id="selectModeleCible"
    									value="#{recherchePrixTransport.bean.modeleCible}">
    									<f:selectItems
    										value="#{recherchePrixTransport.bean.comboModeleCible}" />
    								</h:selectOneMenu>
    							</h:panelGroup>
    						</h:column>
    					</h:panelGrid>
    				</h:column>
    				<h:column>
    					<h:commandButton styleClass="inputbtn"
    						value="#{bundle['prompt.notesDeService.recherchePrixTransport.generationPrix.button']}"
    						action="#{recherchePrixTransport.bean.genererPrixModele}" />
    				</h:column>
    			</h:panelGrid>
     
    		</ig:tabItem>
    	</ig:tabView>
     
     
    </h:form>
     
     
    <!-- / <%=this.getClass().getName()%> ===================================== -->

Discussions similaires

  1. Problème après avoir cliqué sur le bouton de débogage
    Par nogard dans le forum Qt Creator
    Réponses: 0
    Dernier message: 22/04/2011, 20h37
  2. Réponses: 1
    Dernier message: 15/01/2010, 16h41
  3. Cacher un bouton après avoir cliqué dessus
    Par baila dans le forum IHM
    Réponses: 8
    Dernier message: 09/10/2007, 18h29
  4. Réponses: 2
    Dernier message: 04/03/2007, 19h40
  5. Réponses: 1
    Dernier message: 22/08/2006, 13h07

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo