private void initMail() {
if (isCellHasDisplayString)
return;
final Textbox mailAddr = (Textbox)content.getFellow("mailAddr");
final Textbox mailSubject = (Textbox)content.getFellow("mailSubject");
final String preAppend = "mailto:";
mailAddr.addEventListener(Events.ON_CHANGING, new EventListener() {
@Override
public void onEvent(Event evt) throws Exception {
String mail = mailSubject.getValue();
String val = preAppend + ((InputEvent)evt).getValue() +
(mail != null && mail != "" ? "?subject=" + mailSubject.getValue() : "");
displayHyperlink.setValue(val);
}
});
mailSubject.addEventListener(Events.ON_CHANGING, new EventListener() {
@Override
public void onEvent(Event evt) throws Exception {
String mail = mailAddr.getValue();
if (mail != null && mail != "")
displayHyperlink.setValue(preAppend + mailAddr.getValue() + "?subject=" + ((InputEvent)evt).getValue());
}
});
mailAddr.addEventListener(Events.ON_OK, onOkEventListener);
mailSubject.addEventListener(Events.ON_OK, onOkEventListener);
mailAddr.focus();
}