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

Public Member Functions

void onChangeCategory ()
 
void onSelectGroup ()
 
void onCreateGroup ()
 
void onEditGroup ()
 
void onDeleteGroup ()
 
void onChangeFields ()
 
void onSaveFields ()
 
void doFinally () throws Exception
 

Detailed Description

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

Definition at line 41 of file GroupItComposer.java.

Member Function Documentation

◆ doFinally()

void org.turro.zul.groupit.GroupItComposer.doFinally ( ) throws Exception

Definition at line 155 of file GroupItComposer.java.

155  {
156  super.doFinally();
157  createGroup.setDisabled(true);
158  editGroup.setDisabled(true);
159  deleteGroup.setDisabled(editGroup.isDisabled());
160  saveFields.setDisabled(true);
161  saveFields.setAutodisable("+self");
162  }

◆ onChangeCategory()

void org.turro.zul.groupit.GroupItComposer.onChangeCategory ( )

Definition at line 71 of file GroupItComposer.java.

71  {
72  groupTree.setCategory(categoryBox.getText());
73  createGroup.setDisabled(Strings.isBlank(groupTree.getCategory()));
74  editGroup.setDisabled(true);
75  deleteGroup.setDisabled(editGroup.isDisabled());
76  fields.setEntityPath(null);
77  entities.setGroupIt(null);
78  entities.setCategory(null);
79  entities.setExact(exact.isChecked());
80  entities.reload();
81  }
void setEntityPath(String entityPath)
void setCategory(String category)
Here is the call graph for this function:

◆ onChangeFields()

void org.turro.zul.groupit.GroupItComposer.onChangeFields ( )

Definition at line 141 of file GroupItComposer.java.

141  {
142  saveFields.setDisabled(false);
143  }

◆ onCreateGroup()

void org.turro.zul.groupit.GroupItComposer.onCreateGroup ( )

Definition at line 96 of file GroupItComposer.java.

96  {
97  GroupItForm.newGroup(groupTree.getCategory(), groupTree.getSelectedGroup(), new Command() {
98  @Override
99  public Object execute(Context context) {
100  GroupIt g = (GroupIt) context.get("group");
101  if(g != null) {
102  GroupItItem gi = (GroupItItem) groupTree.getSelectedItem();
103  if(gi == null) {
104  groupTree.setCategory(categoryBox.getText());
105  } else {
106  gi.reloadContents();
107  }
108  editGroup.setDisabled(true);
109  deleteGroup.setDisabled(editGroup.isDisabled());
110  saveFields.setDisabled(true);
111  }
112  return null;
113  }
114  });
115  }
Here is the call graph for this function:

◆ onDeleteGroup()

void org.turro.zul.groupit.GroupItComposer.onDeleteGroup ( )

Definition at line 132 of file GroupItComposer.java.

132  {
133  Messages.confirmDeletion().add(groupTree.getName()).show(() -> {
134  if(GroupItForm.deleteGroup(groupTree.getSelectedGroup())) {
135  groupTree.getSelectedItem().detach();
136  }
137  });
138  }
Here is the call graph for this function:

◆ onEditGroup()

void org.turro.zul.groupit.GroupItComposer.onEditGroup ( )

Definition at line 118 of file GroupItComposer.java.

118  {
119  GroupItForm.editGroup(groupTree.getSelectedGroup(), new Command() {
120  @Override
121  public Object execute(Context context) {
122  GroupIt g = (GroupIt) context.get("group");
123  if(g != null) {
124  groupTree.changeSelectedGroup(g);
125  }
126  return null;
127  }
128  });
129  }
void changeSelectedGroup(GroupIt group)
Here is the call graph for this function:

◆ onSaveFields()

void org.turro.zul.groupit.GroupItComposer.onSaveFields ( )

Definition at line 146 of file GroupItComposer.java.

146  {
147  Dao dao = new ContactsPU();
148  for(FieldIt f : fields.getValues()) {
149  dao.saveObject(f);
150  }
151  fields.setEntityPath(ContactsPU.getObjectPath(groupTree.getSelectedGroup()));
152  }
Here is the call graph for this function:

◆ onSelectGroup()

void org.turro.zul.groupit.GroupItComposer.onSelectGroup ( )

Definition at line 84 of file GroupItComposer.java.

84  {
85  editGroup.setDisabled(groupTree.getSelectedGroup() == null);
86  deleteGroup.setDisabled(editGroup.isDisabled());
87  saveFields.setDisabled(true);
88  fields.setEntityPath(ContactsPU.getObjectPath(groupTree.getSelectedGroup()));
89  entities.setGroupIt(groupTree.getSelectedGroup());
90  entities.setCategory(categoryBox.getText());
91  entities.setExact(exact.isChecked());
92  entities.reload();
93  }
Here is the call graph for this function:

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