BrightSide Workbench Full Report + Source Code
org.turro.mail.zul.MailToControl Class Reference
Inheritance diagram for org.turro.mail.zul.MailToControl:
Collaboration diagram for org.turro.mail.zul.MailToControl:

Public Member Functions

void onSend ()
 
void onSendTest ()
 
 MailToControl ()
 
void afterCompose ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 53 of file MailToControl.java.

Constructor & Destructor Documentation

◆ MailToControl()

org.turro.mail.zul.MailToControl.MailToControl ( )

Definition at line 119 of file MailToControl.java.

119  {
120  Executions.createComponents("/WEB-INF/_zul/bs/comps/mailTo/mailToControl.zul", this, null);
121  Selectors.wireComponents(this, this, false);
122  Selectors.wireEventListeners(this, this);
123  }

Member Function Documentation

◆ afterCompose()

void org.turro.mail.zul.MailToControl.afterCompose ( )

Definition at line 126 of file MailToControl.java.

126  {
127  initComponents();
128  }

◆ onSend()

void org.turro.mail.zul.MailToControl.onSend ( )

Definition at line 71 of file MailToControl.java.

71  {
72  try {
73  IContact cfrom = Contacts.getContact(from.getEntity());
74  MailSenders.getPool()
75  .setRoot("/mailTo")
76  .setFrom(cfrom)
77  .addAssistants(recipients.getAssistants())
78  .put("iee", Entities.getController(entity.getEntity()))
79  .put("subject", subject.getValue())
80  .put("text", wikiText.getHtml())
81  .sendTemplate("mailTo", subject.getValue());
82  Clients.showNotification(I_.get("Comment was sent..."));
83  } catch (EmailException ex) {
84  Logger.getLogger(MailToControl.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
85  }
86  }
Here is the call graph for this function:

◆ onSendTest()

void org.turro.mail.zul.MailToControl.onSendTest ( )

Definition at line 89 of file MailToControl.java.

89  {
90  ContactList contacts = new ContactList();
91  contacts.add(Authentication.getIContact());
92  MailRecipients.selectRecipients(contacts, new Command() {
93  @Override
94  public Object execute(Context context) {
95  MailRecipients mr = (MailRecipients) context.get("component");
96  Collection<IContact> emails = mr.getRecipients();
97  if(emails != null) {
98  try {
99  IContact cfrom = Contacts.getContact(from.getEntity());
100  HashMap args = new HashMap();
101  MailSenders.getPool()
102  .setRoot("/mailTo")
103  .setFrom(cfrom)
104  .addContacts(emails)
105  .put("iee", Entities.getController(entity.getEntity()))
106  .put("subject", subject.getValue())
107  .put("text", wikiText.getHtml())
108  .sendTemplate("mailTo", subject.getValue());
109  Clients.showNotification(I_.get("Comment was sent..."));
110  } catch (EmailException ex) {
111  Logger.getLogger(MailToControl.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
112  }
113  }
114  return null;
115  }
116  });
117  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: