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

Public Member Functions

void onTexting (InputEvent event)
 
void onSave ()
 
void onCancel ()
 
String getContextPath ()
 
void setContextPath (String contextPath)
 
- 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 49 of file CreateTopicControl.java.

Member Function Documentation

◆ doFinally()

void org.turro.forum.www.CreateTopicControl.doFinally ( )
protected

Reimplemented from org.turro.elephant.TemplateControl.

Definition at line 100 of file CreateTopicControl.java.

100  {
101  super.doFinally();
102  if(ForumContext.getAllowNew(Application.getApplication().getConstructor())) {
103  initComponents();
104  } else {
105  Application.getApplication().sendRedirect(contextPath);
106  }
107  }
Here is the call graph for this function:

◆ getContextPath()

String org.turro.forum.www.CreateTopicControl.getContextPath ( )

Definition at line 91 of file CreateTopicControl.java.

91  {
92  return contextPath;
93  }

◆ onCancel()

void org.turro.forum.www.CreateTopicControl.onCancel ( )

Definition at line 87 of file CreateTopicControl.java.

87  {
88  Application.getApplication().sendRedirect(contextPath);
89  }
Here is the call graph for this function:

◆ onSave()

void org.turro.forum.www.CreateTopicControl.onSave ( )

Definition at line 65 of file CreateTopicControl.java.

65  {
66  Topic topic = new Topic();
67  String topicText = text.getValue(),
68  entityPath = entity.getEntityPath();
69  if(entityPath != null && !Strings.isBlank(topicText) && topicText.length() > 100) {
70  IContact contact = Authentication.getIContact();
71  topic.setText(HTMLEntities.escape(topicText));
72  topic.setCreation(new Date());
73  topic.setAuthorId(contact.getId());
74  topic.setEntityPath(entityPath);
75  if(!topic.isEmpty()) {
76  topic = getDao().saveObject(topic);
77  UniquePath.normalizeUniquePaths(topic);
78  Forums.markAsUnseenExceptFor(topic, contact);
79  Forums.notify(topic);
80  Application.getApplication().sendRedirect("/user/forums?" +
81  MarkerHelper.setObfuscatedRightNowPars("item=" + topic.getId()));
82  }
83  }
84  }
Here is the call graph for this function:

◆ onTexting()

void org.turro.forum.www.CreateTopicControl.onTexting ( InputEvent  event)

Definition at line 58 of file CreateTopicControl.java.

58  {
59  counter.setValue(I_.get("Minimum") +
60  " " + event.getValue().length() +
61  "/100");
62  }
Here is the call graph for this function:

◆ setContextPath()

void org.turro.forum.www.CreateTopicControl.setContextPath ( String  contextPath)

Definition at line 95 of file CreateTopicControl.java.

95  {
96  this.contextPath = contextPath;
97  }

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