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.elephant.context.Application;
26 import org.turro.elephant.impl.util.Parser;
27 import org.turro.i18n.I_;
28 import org.turro.publication.db.PublicationPU;
29 import org.turro.publication.entity.NewsSection;
30 import org.turro.zkoss.dialog.SelectionDialog;
31 import org.turro.zkoss.text.WikiEditor;
32 import org.zkoss.zk.ui.Component;
33 import org.zkoss.zk.ui.event.Event;
34 import org.zkoss.zk.ui.event.EventListener;
35 import org.zkoss.zk.ui.event.Events;
36 import org.zkoss.zk.ui.event.InputEvent;
37 import org.zkoss.zk.ui.select.annotation.Listen;
38 import org.zkoss.zk.ui.select.annotation.Wire;
49 @Listen(
"onChange = *; onSelect = *; onCheck = *")
51 Events.postEvent(
new Event(Events.ON_CHANGE));
54 @Listen(
"onClick = #selBanner")
59 public Object execute(Context context) {
61 if(!Strings.isBlank(result)) {
66 Events.postEvent(
new Event(Events.ON_CHANGE));
72 @Listen(
"onClick = #delBanner")
75 Events.postEvent(
new Event(Events.ON_CHANGE));
80 super.doAfterCompose(comp);
84 private void initWiki() {
85 wiki.setWidth(
"100%");
86 wiki.setHeight(
"100%");
91 wiki.addEventListener(Events.ON_CHANGE,
new EventListener<InputEvent>() {
93 public void onEvent(InputEvent event) throws Exception {
94 wiki.setValue(event.getValue());
95 entity.setWiki(wiki.getValue());
96 entity.setBody(wiki.getHtml());
static String get(String msg)
void doAfterCompose(Component comp)
final void onChange(Event event)
static String getObjectPath(Object object)
static void showComponent(Page page, String title, Component component, String width, String height, final Command command)
void setReadonly(boolean value)
void setImageFolder(String folder)
void setValue(String value)
void setFileFolder(String folder)