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

Public Member Functions

void onPreview ()
 
void onSave ()
 
void doAfterCompose (Component comp) throws Exception
 
- Public Member Functions inherited from org.turro.composer.EntityPathComposer< E >
void doBeforeComposeChildren (Component comp) throws Exception
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.composer.EntityPathComposer< E >
String entityPath
 
entity
 

Detailed Description

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

Definition at line 52 of file DescribeItComposer.java.

Member Function Documentation

◆ doAfterCompose()

void org.turro.zul.describeit.DescribeItComposer.doAfterCompose ( Component  comp) throws Exception

Definition at line 85 of file DescribeItComposer.java.

85  {
86  super.doAfterCompose(comp);
87  list = (List<DescribeIt>) DescribeItUtil.descriptions(entityPath);
88  if(list == null || list.isEmpty()) {
89  DescribeIt di = new DescribeIt();
90  di.setCreator((Contact) Authentication.getIContact().getContact());
91  di.setDateCreation(new Date());
92  di.setPath(entityPath);
93  di.setDescribeId(DescribeItUtil.DEFAULT_ID);
94  list.add(di);
95  }
96  currentIndex = 0;
97  for(DescribeIt di : list) {
98  String label = DescribeItUtil.DEFAULT_ID.equals(di.getDescribeId()) ?
99  I_.get(DescribeItUtil.DEFAULT_ID) :
100  di.getDescribeId();
101  dieditors.getTabs().appendChild(new Tab(label));
102  Tabpanel tp = new Tabpanel();
103  tp.appendChild(createWiki(di));
104  dieditors.getTabpanels().appendChild(tp);
105  }
106  }
Here is the call graph for this function:

◆ onPreview()

void org.turro.zul.describeit.DescribeItComposer.onPreview ( )

Definition at line 61 of file DescribeItComposer.java.

61  {
62  try {
63  PreviewHtml.preview(list.get(currentIndex).getBody());
64  } catch (InterruptedException ex) {
65  Logger.getLogger(DescribeItComposer.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(null), ex);
66  }
67  }
Here is the call graph for this function:

◆ onSave()

void org.turro.zul.describeit.DescribeItComposer.onSave ( )

Definition at line 70 of file DescribeItComposer.java.

70  {
71  Dao dao = new ContactsPU();
72  DescribeIt di = list.get(currentIndex);
73  if(!Strings.isBlank(di.getBody())) {
74  di = dao.saveObject(di);
75  list.set(currentIndex, di);
76  Tabpanel tp = (Tabpanel) dieditors.getTabpanels().getChildren().get(currentIndex);
77  tp.getChildren().clear();
78  tp.appendChild(createWiki(di));
79  } else if(di.getId() != null) {
80  dao.deleteObject(di);
81  }
82  }
Here is the call graph for this function:

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