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
|
<a4j:form>
<a4j:region>
<table width="100%">
<tr>
<td align="right"><h:outputText value="#{aimBundle.AccountNumber} " /> <h:inputText id="accountNumber"
value="#{aimBean.accountNumber}" /> <h:commandLink value="#{aimBundle.Search}" action="#{aimBean.loadList}" reRender="table" /></td>
</tr>
</table>
<script type="text/javascript">
var row;
</script>
<rich:dataTable value="#{aimBean.aimDataList}" var="aim" rows="8" rowKeyVar="row" id="table"
ajaxKeys="#{aimBean.rowsToUpdate}" rendered="#{aimBean.aimDataListSize != 0}" >
<rich:column style="white-space:nowrap;">
<f:facet name="header">
<h:outputText value="#{aimBundle.Name}" />
</f:facet>
<h:outputText value="#{aim.name}" styleClass="gridElement" />
</rich:column>
<rich:column id="alias">
<f:facet name="header">
<h:outputText value="#{aimBundle.Alias}" />
</f:facet>
<rich:message for="aliasInput" style="color:red"></rich:message>
<h:outputText value="#{aim.alias}" rendered="#{not aim.inEditMode}" styleClass="gridElement" />
<h:inputText id="aliasInput" value="#{aimBean.currentItem.alias}" rendered="#{aim.inEditMode or aim.inCreateMode}"
required="true" requiredMessage="The alias must not be empty">
<rich:ajaxValidator event="onchange" reRender="buttonColumn" />
</h:inputText>
</rich:column>
<rich:column style="white-space:nowrap;">
<f:facet name="header">
<h:outputText value="#{aimBundle.Password}" />
</f:facet>
<h:outputText value="#{aim.password}" id="password" styleClass="gridElement"
rendered="#{not aim.inEditMode and not empty aim.alias}" />
<a4j:commandLink action="#{aimBean.resetPassword}" value="Reset Password" reRender="table, resetPasswordPanel"
rendered="#{aim.inEditMode and not empty aim.alias}"
oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('resetPasswordPanel')}.show()">
<f:setPropertyActionListener value="#{aim}" target="#{aimBean.currentItem}" />
<f:setPropertyActionListener value="#{row}" target="#{aimBean.currentRow}" />
</a4j:commandLink>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="#{aimBundle.Email}" />
</f:facet>
<rich:message for="emailInput" style="color:red"></rich:message>
<h:outputText value="#{aim.email}" id="email" styleClass="gridElement" />
<h:inputText id="emailInput" value="#{aimBean.currentItem.email}" rendered="#{aim.inCreateMode}" required="true"
requiredMessage="The email must not be empty">
<f:validator validatorId="checkvalidemail" />
<rich:ajaxValidator event="onchange" reRender="buttonColumn" />
</h:inputText>
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="#{aimBundle.LOB}" />
</f:facet>
<h:outputText value="#{aim.lob}" id="lob" styleClass="gridElement" />
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="#{aimBundle.SecLvl}" />
</f:facet>
<h:outputText value="#{aim.cltLvl}" id="cltLvl" styleClass="gridElement" />
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="#{aimBundle.LastAccess}" />
</f:facet>
<h:outputText value="#{aim.lastAccess}" id="lastAccess" styleClass="gridElement" />
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="#{aimBundle.PhoneNumber}" />
</f:facet>
<h:outputText value="#{aim.phoneNumber}" id="phoneNumber" styleClass="gridElement" />
</rich:column>
<rich:column style="text-align: center;">
<f:facet name="header">
<h:outputText value="#{aimBundle.Status}" />
</f:facet>
<h:graphicImage value="../images/Active.gif"
rendered="#{aim.activeStatus and not (aim.inEditMode or aim.inCreateMode)}" />
<h:graphicImage value="../images/Inactive.gif"
rendered="#{not aim.activeStatus and not (aim.inEditMode or aim.inCreateMode)}" />
<h:selectBooleanCheckbox value="#{aimBean.currentItem.activeStatus}" rendered="#{aim.inEditMode}" />
</rich:column>
<rich:column style="white-space:nowrap;" id="buttonColumn">
<a4j:commandLink id="editLink" action="#{aim.setInEditMode}" reRender="table"
rendered="#{not aim.inEditMode and not empty aim.alias}">
<h:outputText value="#{aimBundle.ButtonEdit}" />
<f:setPropertyActionListener value="#{aim}" target="#{aimBean.currentItem}" />
<f:setPropertyActionListener value="#{row}" target="#{aimBean.currentRow}" />
</a4j:commandLink>
<a4j:commandLink id="createShowLink" action="#{aim.setInCreateMode}" reRender="table"
rendered="#{not (aim.inEditMode or aim.inCreateMode) and empty aim.alias}">
<h:outputText value="#{aimBundle.ButtonCreate}" />
<f:setPropertyActionListener value="#{aim}" target="#{aimBean.currentItem}" />
<f:setPropertyActionListener value="#{row}" target="#{aimBean.currentRow}" />
</a4j:commandLink>
<a4j:commandLink value="#{aimBundle.ButtonSave}" id="saveLink" action="#{aimBean.store}" reRender="table"
rendered="#{aim.inEditMode and not empty aim.alias}">
<f:setPropertyActionListener value="#{aim}" target="#{aimBean.currentItem}" />
<f:setPropertyActionListener value="#{row}" target="#{aimBean.currentRow}" />
</a4j:commandLink>
<a4j:commandLink id="createLink" action="#{aimBean.storeNew}" reRender="table, passwordPanel"
rendered="#{aim.inCreateMode}"
oncomplete="if (#{facesContext.maximumSeverity==null}) #{rich:component('passwordPanel')}.show()">
<h:outputText value="#{aimBundle.ButtonCreate}" />
<f:setPropertyActionListener value="#{aim}" target="#{aimBean.currentItem}" />
<f:setPropertyActionListener value="#{row}" target="#{aimBean.currentRow}" />
</a4j:commandLink>
<h:panelGroup rendered="#{aim.inEditMode or aim.inCreateMode}">
<h:outputText value="|" style="padding: 0px 3px;" />
</h:panelGroup>
<a4j:commandLink ajaxSingle="true" id="cancelLink" action="#{aim.setNotEditMode}" reRender="table"
rendered="#{aim.inEditMode or aim.inCreateMode}">
<h:outputText value="Cancel" />
</a4j:commandLink>
</rich:column>
</rich:dataTable>
</a4j:region>
</a4j:form>
<rich:modalPanel id="passwordPanel" width="513" height="300" moveable="false" resizeable="false">
<f:facet name="header">
<h:outputText value="User Created" />
</f:facet>
<a4j:keepAlive beanName="aimBean" />
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="../images/cancel.gif" id="resetHidelink" styleClass="hidelink" />
<rich:componentControl for="passwordPanel" attachTo="resetHidelink" operation="hide" event="onclick" />
</h:panelGroup>
</f:facet>
<h:panelGroup>
<h:outputText value="The user " />
<h:outputText value="#{aimBean.currentItem.name}" />
<h:outputText value=" with alias " />
<h:outputText value="#{aimBean.currentItem.alias}" />
<h:outputText value="is created" />
<br />
<h:outputText value="The Tempory Password is : " />
<h:outputText value="#{aimBean.currentItem.newPassword}" style="font-weight: bold; font-size: larger;" />
<br />
</h:panelGroup>
</rich:modalPanel>
<rich:modalPanel id="resetPasswordPanel" width="513" height="300" moveable="false" resizeable="false">
<f:facet name="header">
<h:outputText value="Password Reset" />
</f:facet>
<a4j:keepAlive beanName="aimBean" />
<f:facet name="controls">
<h:panelGroup>
<h:graphicImage value="../images/cancel.gif" id="hidelink" styleClass="hidelink" />
<rich:componentControl for="resetPasswordPanel" attachTo="hidelink" operation="hide" event="onclick" />
</h:panelGroup>
</f:facet>
<h:panelGroup>
<h:outputText value="The user " />
<h:outputText value="#{aimBean.currentItem.name}" />
<h:outputText value=" with alias " />
<h:outputText value="#{aimBean.currentItem.alias}" />
<h:outputText value="has new tempory password" />
<br />
<h:outputText value="The Tempory Password is : " />
<h:outputText value="#{aimBean.currentItem.newPassword}" style="font-weight: bold; font-size: larger;" />
<br />
</h:panelGroup>
</rich:modalPanel> |
Partager