19 package org.turro.zul.intouch;
21 import org.turro.contacts.Contact;
22 import org.turro.contacts.InTouch;
23 import org.turro.contacts.util.AddressListbox;
24 import org.turro.contacts.util.ContactListbox;
25 import org.turro.i18n.I_;
26 import org.turro.intouch.InTouchUtil;
27 import org.turro.zul.frame.Framework;
28 import org.zkoss.zk.ui.Executions;
29 import org.zkoss.zk.ui.IdSpace;
30 import org.zkoss.zk.ui.select.Selectors;
31 import org.zkoss.zk.ui.select.annotation.Listen;
32 import org.zkoss.zk.ui.select.annotation.Wire;
33 import org.zkoss.zul.Button;
34 import org.zkoss.zul.Datebox;
35 import org.zkoss.zul.Textbox;
36 import org.zkoss.zul.Window;
47 @Wire
private Datebox control;
48 @Wire
private Textbox description;
49 @Wire
private Button save;
50 @Wire
private Button cancel;
55 this.inTouch = inTouch;
57 setTitle(
I_.
get(
"In touch because"));
59 Executions.createComponents(
"/WEB-INF/_zul/contact/intouch.zul",
this,
null);
60 Selectors.wireComponents(
this,
this,
false);
61 Selectors.wireEventListeners(
this,
this);
63 name.setObjectValue(inTouch.
getName());
64 contact.setProvider(provider);
66 inTouch.
setContact(contact.getCollection().iterator().next());
69 address.setProvider(provider);
75 @Listen(
"onClick = #save")
81 @Listen(
"onClick = #cancel")
86 @Listen(
"onChange = #name")
88 inTouch.
setName(name.getObjectValue());
91 @Listen(
"onSelect = #contact")
96 @Listen(
"onSelect = #address")
101 @Listen(
"onChange = #control")
106 @Listen(
"onChange = #description")
static String get(String msg)
static void addInTouch(InTouch inTouch)
static Framework getCurrent()
InTouchEdit(Contact provider, InTouch inTouch)
void onChangeDescription()