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
| <rich:modalPanel id="addRole" height="470" width="600"
resizeable="false">
<f:facet name="header">
<h:outputText value="Attribution des rôles de l'utilisateur" />
</f:facet>
<f:facet name="controls">
<h:graphicImage value="/images/close.gif" style="cursor:pointer"
onclick="Richfaces.hideModalPanel('addRole')" />
</f:facet>
<h:form id="attr">
<table width="100%" height="10%">
<tr>
<td width="50%" height="20" align="center" bgcolor="#e3eefa"
style="font-size: 11px; font-weight: bold">
<h:outputText value="Login" />
</td>
<td width="50%" height="20" bgcolor="#fff0ff"
style="font-size: 11px; font-weight: lighter">
<h:outputText id="modRoleTxtLogin" value="#{userGroupe.login}" />
</td>
</tr>
</table>
<rich:spacer height="10" />
<rich:separator lineType="dotted" height="4" width="100%" />
<rich:spacer height="10" />
<h:panelGrid columns="2" id="panel">
<rich:pickList id="modRolePickList" sourceListWidth="255"
showButtonsLabel="false" targetListWidth="200" listsHeight="150"
value="#{roleUsr.selection}">
<f:selectItems value="#{roleEtat.listIntituleRole}" />
</rich:pickList>
<a4j:commandButton id="valider" image="/images/valider.gif"
title="Valider" action="#{roleUsr.saveRole}"
reRender="modRoleListDroit,treeUserRole">
</a4j:commandButton>
</h:panelGrid>
<rich:panelBar height="195">
<rich:panelBarItem label="Les rôles actuels pour cet utilisateur"
name="Roles">
<rich:dataTable id="modRoleListDroit" width="550"
value="#{roleUserEtat.listRoleUserEtatParLogin}" var="item">
<rich:column width="270">
<h:outputText value="#{item.intitulerole}" />
</rich:column>
<rich:column width="100">
<h:outputText
value="#{item.etatroleusr=='1'?'ACTIVÉ':item.etatroleusr=='0'?'DÉSACTIVÉ':''}" />
</rich:column>
<rich:column width="35">
<a4j:commandButton image="/images/ok.jpg"
style="cursor:pointer; width:20 ; length:20" title="Activer"
action="#{roleUsr.activerRoleUsr}" ajaxSingle="true"
reRender="modRoleListDroit,treeUserRole">
<f:setPropertyActionListener value="#{item.idroleusr}"
target="#{roleUsr.idroleusr}" />
</a4j:commandButton>
</rich:column>
<rich:column width="35">
<a4j:commandButton image="/images/no.jpg"
style="cursor:pointer; width:20 ; length:20"
title="Désactiver" ajaxSingle="true"
action="#{roleUsr.desactiverRoleUsr}"
reRender="modRoleListDroit,treeUserRole">
<f:setPropertyActionListener value="#{item.idroleusr}"
target="#{roleUsr.idroleusr}" />
</a4j:commandButton>
</rich:column>
<rich:column width="30">
<a4j:commandButton image="/images/delete.gif"
style="cursor:pointer; width:20 ; length:20"
title="Supprimer" ajaxSingle="true"
action="#{roleUsr.deleteRoleUsr}"
reRender="modRoleListDroit,treeUserRole,modRolePickList">
<f:setPropertyActionListener value="#{item.idroleusr}"
target="#{roleUsr.idroleusr}" />
</a4j:commandButton>
</rich:column>
</rich:dataTable>
</rich:panelBarItem>
</rich:panelBar>
</h:form>
</rich:modalPanel> |
Partager