Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void sendCredentials() {
- DCIteratorBinding guiUsersIterator = ADFUtils.findIterator("GuiUsersView2Iterator");
- Row currentGuiUser = guiUsersIterator.getCurrentRow();
- if (currentGuiUser != null) {
- if (currentGuiUser.getAttribute("Email") != null && !"".equals(((String)currentGuiUser.getAttribute("Email")).trim())) {
- CallableStatement scStatement = null;
- try {
- scStatement = callSendEmailProcedure(currentGuiUser, scStatement);
- String sentEmail = (String)JSFUtils.resolveExpression("#{res.admin_edit_user_email_sent}");
- BuildixxUtils.addInfoMessage(sentEmail + ".", sentEmail + ".");
- } catch (Exception e) {
- BuildixxUtils.addErrorMessage(JSFUtils.resolveExpressionAsString("#{res.misc_error_occ}"));
- log.error("Error sending credentials!", e);
- } finally {
- try {
- if (null != scStatement)
- scStatement.close();
- } catch (SQLException ex) {
- ex.printStackTrace();
- log.error("Error with sending credentials", ex);
- BuildixxUtils.addErrorMessage(JSFUtils.resolveExpressionAsString("#{res.admin_error_ocurred}"));
- }
- }
- } else {
- String noEmail = (String)JSFUtils.resolveExpression("#{res.admin_edit_user_no_email}");
- BuildixxUtils.addErrorMessage(noEmail + ".", " ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement