BrightSide Workbench Full Report + Source Code
org.turro.students.www.EditResponseControl Class Reference
Inheritance diagram for org.turro.students.www.EditResponseControl:
Collaboration diagram for org.turro.students.www.EditResponseControl:

Public Member Functions

void onText ()
 
void onAddStudent ()
 
void onSave ()
 
void onCancel ()
 
String getContextPath ()
 
void setContextPath (String contextPath)
 
void setResponse (Response response)
 
Response getResponse ()
 
- Public Member Functions inherited from org.turro.elephant.TemplateControl
void setRootTmpl (String rootTmpl)
 
void setTmpl (String tmpl)
 
void afterCompose ()
 

Protected Member Functions

void doFinally ()
 

Detailed Description

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

Definition at line 47 of file EditResponseControl.java.

Member Function Documentation

◆ doFinally()

void org.turro.students.www.EditResponseControl.doFinally ( )
protected

Reimplemented from org.turro.elephant.TemplateControl.

Definition at line 116 of file EditResponseControl.java.

116  {
117  super.doFinally();
118  checkResponse();
119  initComponents();
120  }

◆ getContextPath()

String org.turro.students.www.EditResponseControl.getContextPath ( )

Definition at line 98 of file EditResponseControl.java.

98  {
99  return contextPath;
100  }

◆ getResponse()

Response org.turro.students.www.EditResponseControl.getResponse ( )

Definition at line 110 of file EditResponseControl.java.

110  {
111  checkResponse();
112  return response;
113  }

◆ onAddStudent()

void org.turro.students.www.EditResponseControl.onAddStudent ( )

Definition at line 63 of file EditResponseControl.java.

63  {
64  response.addStudent(Contacts.getContact(studentCombobox.getObjectValue()));
65  updateStudents();
66  }
void addStudent(IContact contact)
Definition: Response.java:142
Here is the call graph for this function:

◆ onCancel()

void org.turro.students.www.EditResponseControl.onCancel ( )

Definition at line 89 of file EditResponseControl.java.

89  {
90  if(response.getId() != null && response.getId() > 0) {
91  Application.getApplication().sendRedirect(contextPath + "?" +
92  MarkerHelper.setObfuscatedRightNowPars("item=" + response.getChallenge().getId()));
93  } else {
94  Application.getApplication().sendRedirect(contextPath);
95  }
96  }
Here is the call graph for this function:

◆ onSave()

void org.turro.students.www.EditResponseControl.onSave ( )

Definition at line 69 of file EditResponseControl.java.

69  {
70  if(!response.isEmpty()) {
71  boolean isNew = response.getId() == null;
72  response = getDao().saveObject(response);
73  response.addStudent(Authentication.getIContact());
74  if(response.getId() != null && response.getId() > 0) {
75  Application.getApplication().sendRedirect(contextPath + "?" +
76  MarkerHelper.setObfuscatedRightNowPars("item=" + response.getChallenge().getId()));
77  } else {
78  Application.getApplication().sendRedirect(contextPath);
79  }
80  if(isNew) {
81  new NewResponseNotification(response).sendNotification();
82  } else {
83  new ChallengeChangedNotification(response).sendNotification();
84  }
85  }
86  }
Here is the call graph for this function:

◆ onText()

void org.turro.students.www.EditResponseControl.onText ( )

Definition at line 58 of file EditResponseControl.java.

58  {
59  response.setWikiText(text.getValue());
60  }
void setWikiText(String wikiText)
Definition: Response.java:115
Here is the call graph for this function:

◆ setContextPath()

void org.turro.students.www.EditResponseControl.setContextPath ( String  contextPath)

Definition at line 102 of file EditResponseControl.java.

102  {
103  this.contextPath = contextPath;
104  }

◆ setResponse()

void org.turro.students.www.EditResponseControl.setResponse ( Response  response)

Definition at line 106 of file EditResponseControl.java.

106  {
107  this.response = response;
108  }

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