19 package org.turro.newsletter;
21 import org.turro.string.Strings;
22 import org.turro.command.Command;
23 import org.turro.command.Context;
24 import org.turro.composer.EntityPathComposer;
25 import org.turro.i18n.I_;
26 import org.turro.publication.db.PublicationPU;
27 import org.turro.publication.entity.NewsSection;
28 import org.turro.zkoss.dialog.SelectionDialog;
29 import org.zkoss.zk.ui.Component;
30 import org.zkoss.zk.ui.event.Event;
31 import org.zkoss.zk.ui.event.Events;
32 import org.zkoss.zk.ui.select.annotation.Listen;
33 import org.zkoss.zk.ui.select.annotation.Wire;
34 import org.zkoss.zul.Textbox;
43 private Textbox macro;
45 @Listen(
"onChange = #macro")
47 entity.setWiki(
"$no_wiki\n" + macro.getValue());
48 entity.setBody(macro.getValue());
49 Events.postEvent(
new Event(Events.ON_CHANGE));
52 @Listen(
"onClick = #selBanner")
57 public Object execute(Context context) {
59 if(!Strings.isBlank(result)) {
64 Events.postEvent(
new Event(Events.ON_CHANGE));
70 @Listen(
"onClick = #delBanner")
73 Events.postEvent(
new Event(Events.ON_CHANGE));
78 super.doAfterCompose(comp);
79 macro.setValue(
entity.getBody());
static String get(String msg)
void doAfterCompose(Component comp)
static String getObjectPath(Object object)
static void showComponent(Page page, String title, Component component, String width, String height, final Command command)