- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 36 of file GroupedLine.java.
◆ GroupedLine()
org.turro.zul.groupit.GroupedLine.GroupedLine |
( |
Grouped |
grouped, |
|
|
boolean |
allowEdit |
|
) |
| |
Definition at line 41 of file GroupedLine.java.
42 this.grouped = grouped;
43 this.allowEdit = allowEdit;
44 setSclass(
"z-valign-middle");
◆ afterCompose()
void org.turro.zul.groupit.GroupedLine.afterCompose |
( |
| ) |
|
Definition at line 50 of file GroupedLine.java.
51 final CategoryCombobox category =
new CategoryCombobox();
53 if(grouped !=
null && grouped.
getParent() !=
null) {
56 category.setDisabled(!allowEdit);
57 appendChild(category);
58 final GroupItBandbox group =
new GroupItBandbox();
62 group.setCategory(category.getObjectValue());
63 group.setObjectValue(grouped.
getParent());
65 group.setDisabled(!allowEdit);
68 Button save =
new Button(
null, Images.getImage(
"save"));
70 save.addEventListener(Events.ON_CLICK,
new EventListener<Event>() {
72 public void onEvent(Event event) throws Exception {
73 grouped.setParent(group.getObjectValue());
74 boolean isNew = Strings.isBlank(grouped.getId());
75 grouped = new ContactsPU().saveObject(grouped);
77 Events.postEvent(new Event(Events.ON_CHANGE, GroupedLine.this.getParent()));
81 if(!Strings.isBlank(grouped.
getId())) {
82 Button
delete =
new Button(
null, Images.getImage(
"delete"));
84 delete.addEventListener(Events.ON_CLICK,
new EventListener<Event>() {
86 public void onEvent(Event event) throws Exception {
87 new ContactsPU().deleteObject(grouped);
88 GroupedLine.this.detach();
93 category.addEventListener(Events.ON_SELECT,
new EventListener<Event>() {
95 public void onEvent(Event event) throws Exception {
96 group.setCategory(category.getObjectValue());
The documentation for this class was generated from the following file: