Advertisement
psi_mmobile

Untitled

Oct 28th, 2019
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. public static void sendCredentials() {
  2. DCIteratorBinding guiUsersIterator = ADFUtils.findIterator("GuiUsersView2Iterator");
  3. Row currentGuiUser = guiUsersIterator.getCurrentRow();
  4. if (currentGuiUser != null) {
  5. if (currentGuiUser.getAttribute("Email") != null && !"".equals(((String)currentGuiUser.getAttribute("Email")).trim())) {
  6. CallableStatement scStatement = null;
  7. try {
  8. scStatement = callSendEmailProcedure(currentGuiUser, scStatement);
  9. String sentEmail = (String)JSFUtils.resolveExpression("#{res.admin_edit_user_email_sent}");
  10. BuildixxUtils.addInfoMessage(sentEmail + ".", sentEmail + ".");
  11. } catch (Exception e) {
  12. BuildixxUtils.addErrorMessage(JSFUtils.resolveExpressionAsString("#{res.misc_error_occ}"));
  13.  
  14. log.error("Error sending credentials!", e);
  15. } finally {
  16. try {
  17. if (null != scStatement)
  18. scStatement.close();
  19. } catch (SQLException ex) {
  20. ex.printStackTrace();
  21. log.error("Error with sending credentials", ex);
  22. BuildixxUtils.addErrorMessage(JSFUtils.resolveExpressionAsString("#{res.admin_error_ocurred}"));
  23. }
  24. }
  25. } else {
  26. String noEmail = (String)JSFUtils.resolveExpression("#{res.admin_edit_user_no_email}");
  27. BuildixxUtils.addErrorMessage(noEmail + ".", " ");
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement