I want to create a component in ZK eg I put on file .zul a tag I want to create for example and you understand zk when you render to the browser.
Could you please facilitate me an example or a URL where I can find on the subject thank you very much for your attention
↧
Create new components tag in zk?
↧
ZK Desktop Cleanup not called when accessing from an Ipad
The basic problem is my desktop cleanup listener is not being called when the application is accessed from an ipad, but it is called when accessed from a PC browser (ubuntu, windows, mac - doesn't matter)
I have defined a desktop listener in zk.xml :
Called when the ZK Desktop is detroyed com.dh.ui.common.desktop.DHzDesktopCleanup
in Java :
public class DHzDesktopCleanup implements DesktopCleanup
{....
@Override
public void cleanup(Desktop desktop) throws Exception
{....
}
This is called as it should be when I access my application from a desktop browser. However, when I access it from the Ipad (from within our webapp or using safari) the cleanup is never called.
I am monitoring desktops using the following code on a page to keep track of sessions and desktops. I also have set a breakpoint in the cleanup method to check when it's being called.
Statistic statistic = (Statistic)Executions.getCurrent().getDesktop().getWebApp().getConfiguration().getMonitor();
_activeDesktops.setValue(new Integer(statistic.getActiveDesktopCount()).toString());
_activeSessions.setValue(new Integer(statistic.getActiveSessionCount()).toString());
_totalDesktops.setValue(new Integer(statistic.getTotalDesktopCount()).toString());
_totalSessions.setValue(new Integer(statistic.getTotalSessionCount()).toString());
If I only access the application from the desktop the active count will go up and down correctly with the number of connections. When I access from the Ipad, the count only goes up, never goes down even when I kill the connecting app or safari.
Is this a bug or is something else going on?
Thanks!
Andy
↧
↧
Does combobox support grouping like listbox, grid?
It seem like zk combobox doesn't support grouping like http://harvesthq.github.io/chosen/ or listbox, grid, so I must custom this component. That's right?
↧
Next version for Community
Hi,
i just wanted to know which one will be the next version available for the community. I was waiting for 7.0.4 but it was released only for PE/EE, and now it seems that efforts are going to ZK8.
Thanks.
↧
Integration with Zimbra
Anyone ever tried integrating ZK OpenSource Edition with Zimbra Collaboration Suite?
Does it support zimbra's authentication/sso (SAML)?
Does ZK OE support put or load docs to/from Zimbra's Briefcase?
I'm wondering what would be process of make the integration happen.
↧
↧
Dayebox time problem
Hi,
the Datebox with "Long+medium" format seems to have some problems when the selector is opened. It seems that hours are not present (at leas here with italian system)
http://www.zkoss.org/zkdemo/input/date_and_time_picker

I'm using zk 7.0.0 but of course the problem seems also on your demo site as well
↧
textbox setvalue java.lang.nullpointerexception
I was a newbie trying to learn ZK using ZK 7 Essential ebook.
When i tried source codes on chapter 5 section Initialize Profile Form, I got a java.lang.nullpointerexception.
It happen on this line at page 27:
fullName.setValue(user.getFullName());
I have checked that user.getFullName() is not returning null value.
These are the full exception:
java.lang.NullPointerException
org.zkoss.essentials.chapter5.mvc.ProfileViewController.refreshProfileView(ProfileViewController.java:61)
org.zkoss.essentials.chapter5.mvc.ProfileViewController.doAfterCompose(ProfileViewController.java:51)
org.zkoss.zk.ui.impl.UiEngineImpl.doAfterCompose(UiEngineImpl.java:578)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:880)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699)
org.zkoss.zk.ui.impl.UiEngineImpl.createComponents(UiEngineImpl.java:1080)
org.zkoss.zk.ui.impl.AbstractExecution.createComponents0(AbstractExecution.java:251)
org.zkoss.zk.ui.impl.AbstractExecution.createComponents(AbstractExecution.java:243)
org.zkoss.zul.Include.afterCompose(Include.java:448)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:878)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:872)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:872)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:797)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:757)
org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:442)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:356)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:217)
org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Is this a bug or is there something that I should pay attention before setting the textbox value?
↧
ZK forum upvote system need change
1. This forum has upvote system where we can upvote someones answer to a question if we feel it is worthy of it, but there is a limit that you need to have some minimum points to do upvote, even if you are the one who has asked the question you are not allowed to upvote a answer or to accept someone's answer
2. If you have asked a question and now want to close it, the closing process is also ambiguous or may i am missing something and not able to find the "close the question" button anywhere. I should be allowed to accept or reject any answers to at least the questions which i have asked, I did asked some questions and someone did try to help me with answering them, but i have no way to tell them that i am glad to receive there helping hand.
3. karma system makes sense but the only problem is the rules of how your karma increases or decreases or even the points system rules are not clearly mentioned anywhere.
PS- I might be wrong and all this info might be available somewhere hidden in some link on this site but again it should be something that should be accessible more easily to a new bee like me on this site.
updated :- http ://forum.zkoss.org/faq/#gravatar
Found a link where they explain the point system, but again to get points or Karma you have to have some karma in your bank or you have to depend on "Karma" guys who have it with them, what if someone gives a really good answer to some new bee's question, does't he deserve to get some upvote or points for that.
↧
ZK related book
I am new to ZK can anyone suggest some good books for learning ZK.
↧
↧
Determine the binding (the bean backing a textbox) of a component in a HtmlMacroComponent
Hello everyone,
i created a Macro-component:
With a custom Java-Class, extending HtmlMacroComponent:
@ComponentAnnotation("value:@ZKBIND(ACCESS=both,SAVE_EVENT=onEdited)")
public class MyMacro extends HtmlMacroComponent {
private static final long serialVersionUID = 1L;
@Wire
private Textbox textbox;
@Wire
private Popup popup;
private Label label;
public MyMacro() {
label = new Label();
setMacroURI("/zul/components/myMacro.zul");
setStyle("display:block");
afterCompose();
popup.appendChild(label);
}
@Listen("onFocus=#textbox")
public void textboxFocus() {
label.setValue("some Text");
popup.open(textbox, "end_before");
}
public void setValue(String value) {
textbox.setValue(value);
}
public String getValue() {
return textbox.getValue();
}
@Listen("onChange=#textbox")
public void textboxChange() {
Events.postEvent("onEdited", this, textbox.getValue());
}
}
In this HtmlMacroComponent i would like to determine the Binding, that is forwarded in the place the macro is used:
By this i mean the name of the bean and the field and not the content.
It could be the class of the bean or the getter of the vm or anything else really, that helps me to unequivocally identify the bean and field.
To make it more clear, i'm searching for a method like:
textbox.getBinding() // Returns "field.bean" or [org.package.Bean.class, "field"] or something like that
Can someone help me with that?
↧
CKEditor source mode throw exception
Hi,
We are using
ZKEE 7.0.4
ZK CKEditor 4.4.6.1
Whenever we are in "source" mode in CKeditor and make some changes, we got
In Firefox
Failed to send requests to server.
b.document is undefined (TypeError)
In Chrome
Failed to send requests to server.
Cannot read property 'createElement' of undefined (TypeError)
Also, in normal mode, changed text is not saved but not saved.
Any idea?
Thanks,
Kangho
↧
Creating components and events on the fly
Hello,
lets assume I have a grid which is empty on start time, then during runtime it gets filled with rows (from Java code). Now, I would need a button in a cell in every row which has assigned an onClick event. I know how I can create the button on the fly, but how can I assign an event to it during runtime?
Thanks for any hints.
↧
Composite component children
Hello,
I'm creating a composite component that extends from Hlayout. Its based zul is:
Then I include in my view others children components within myComposite component
...
My problem is that the element listbox is created after the button but what I'm trying to do is the button renders after the listbox.
I already read zk documents about Composite Components but there aren't information related to composite components including children components.
↧
↧
Custom tag not working getting error
I have created a custom tag by extending
public class MyMessageTag extends Listcell {
private static final long serialVersionUID = 1L;
public void setLabel(String label) {
super.setLabel("Here can put message");
}
}
and my zul is like this
but when i run my code i am getting error as
**Component definition not found: myMessageTag**
can you help me what i am missing here.
Please help
↧
[Announcement] Scheduled Maintenance Apr. 8th 2015
[ZK Tracker](http://tracker.zkoss.org) is scheduled for a maintenance on:
**Wednesday, April 8th, 2015 from 2am to 6am UTC** ([other time zones](http://www.timeanddate.com/worldclock/fixedtime.html?msg=%5BAnnouncement%5D+Scheduled+Maintenance+-+Apr+8th+2015+&iso=20150408T02&p1=1440&ah=4))
During these four hours, ZK Tracker will be unavailable. Please avoid any activities during this period and try accessing the site after maintenance has been completed.
Thank you for your understanding and patience. Should you encounter further disruptions after the maintenance, please do not hesitate to contact us at info@zkoss.org
The ZK Team
↧
TimeLine / No trackNum for occureEvent Model
Hello,
I'm trying to add a timeline in my project but I have a little problem .
when I did it with a static data ( xml file ) there's no problem because in the data file we can define the trackNum for every event we'll create. but in my case, I have a dynamic data that I get from a server, so I have to create a model and add occurEvent to it but I cannot define the trackNum when creating occurEvent from java code.
OccuEvent does not have a trackNum property.
do you have any idea about how to set trackNum for added Events ?
Thanks in advance!
↧
Hide Browser Scroll Bar
Here is my main layout
In the Div screensdiv, i am showing the screens when the user clicks on Menu in the side bar.
My First Problem, I cannot put borderlayout inside vlayout because it never shows.
Second Problem, if some screen contains very long, then scroll bar within the window is not shown, but browser scroll bar is shown. How to avoid this browser scroll bar and visible the inner window scroll bar.
↧
↧
Exception for the selectedItem of a custom macro based on a combobox (Cannot convert <Comboitem o2EQdh> of type class java.lang.String to class org.zkoss.zul.Comboitem)
Hello everyone.
I created a macro component, that is basically a custom combobox that shows a message on focus.
The myCombobox.zul:
I use a custom java-class for it that implements HtmlMacroComponent:
@ComponentAnnotation({ "value:@ZKBIND(ACCESS=load,SAVE_EVENT=onEdited)", "selectedItem:@ZKBIND(ACCESS=both,SAVE_EVENT=onEdited)",
"model:@ZKBIND(ACCESS=load,SAVE_EVENT=onEdited)" })
public class WegeCombobox extends HtmlMacroComponent {
private static final long serialVersionUID = 1L;
@Wire
private Combobox combobox;
public WegeCombobox() {
setMacroURI("/zul/components/myCombobox.zul");
setStyle("display:block");
afterCompose();
}
@Listen("onFocus=#combobox")
public void comboboxFocus() {
Clients.showNotification("Some text",
Clients.NOTIFICATION_TYPE_INFO, combobox, "end_before", 3000, true);
}
@Listen("onCreate=#combobox")
public void comboboxCreate() {
setModel((ArrayList>) getDynamicProperty("model"));
}
public void setValue(String value) {
combobox.setValue(value);
}
public String getValue() {
return combobox.getValue();
}
public void setSelectedItem(Comboitem fo) {
combobox.setSelectedItem(fo);
}
public Comboitem getSelectedItem() {
return combobox.getSelectedItem();
}
@SuppressWarnings({ "rawtypes", "unchecked" })
public void setModel(ArrayList> model) {
combobox.setModel(new ListModelList(model, true));
}
public ListModel> getModel() {
return combobox.getModel();
}
@Listen("onChange=#combobox")
public void comboboxChange() {
Events.postEvent("onEdited", this, combobox.getSelectedItem());
Events.postEvent("onEdited", this, combobox.getValue());
}
}
I use it in my webpages like this:
After submitting the form i get the following error:
org.zkoss.zk.ui.UiException: Cannot convert of type class java.lang.String to class org.zkoss.zul.Comboitem at [file:/zul/somePage.zul, line:54]
org.zkoss.zk.ui.UiException: Cannot convert of type class java.lang.String to class org.zkoss.zul.Comboitem at [file:/zul/somePage.zul, line:54]
at org.zkoss.bind.impl.MiscUtil.mergeExceptionInfo(MiscUtil.java:175)
at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:58)
at org.zkoss.bind.impl.LoadPropertyBindingImpl.load(LoadPropertyBindingImpl.java:91)
at org.zkoss.bind.impl.BinderImpl.doPropertyChange0(BinderImpl.java:388)
at org.zkoss.bind.impl.BinderImpl.doPropertyChange(BinderImpl.java:365)
at org.zkoss.bind.impl.BinderImpl.access$100(BinderImpl.java:106)
at org.zkoss.bind.impl.BinderImpl$QueueListener.onEvent(BinderImpl.java:290)
at org.zkoss.zk.ui.event.impl.DesktopEventQueue$QueueListener.onEvent(DesktopEventQueue.java:145)
at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:2742)
at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2713)
at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2654)
at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1717)
at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1502)
at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1212)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:600)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:482)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:491)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.zkoss.zel.ELException: Cannot convert of type class java.lang.String to class org.zkoss.zul.Comboitem
at org.zkoss.zel.impl.lang.ELSupport.coerceToTypeForSetValue(ELSupport.java:485)
at org.zkoss.zel.impl.parser.AstValue.setValue(AstValue.java:245)
at org.zkoss.zel.impl.ValueExpressionImpl.setValue(ValueExpressionImpl.java:256)
at org.zkoss.xel.zel.ELXelExpression.setValue(ELXelExpression.java:50)
at org.zkoss.bind.impl.BindEvaluatorXImpl.setValue(BindEvaluatorXImpl.java:55)
... 37 more
How can i fix this: "Cannot convert of type class java.lang.String to class org.zkoss.zul.Comboitem" ?
↧
Monitoring with New Relic
Hello.
I have an application built on ZK 5 and I'm trying to implement the Real User Monitor funcionality in New Relic to monitor application usage and performance. The user interface is implemented with Java clases instead of zul files so I'm looking for the best way to implement this. In the New Relic site there are samples for JSPs, Servlets, ColdFusion, Velocity ... nut they have nothing currently implemented for ZK. They say that for RUM a pair of JavaScripts should be included in the header and footer sections in some specific places, but I've not found a way to do this in for example a Window object. So if there is anybody who could give me some pointers or can share some tips, it would be greatly appreciated.
Best regards.
↧
Share i3-labels between apps without copying
I learned from [http://stackoverflow.com/questions/14808693/load-zul-from-jar](http://stackoverflow.com/questions/14808693/load-zul-from-jar) how to **load a zul from a jar**. With this I have a way to **share zul files** and their controller classes between web apps withou having the need to copy (I hope so, but did not finally check yet).
**BUT, what about sharing the language resources (like "i3-labels") or images, CSS, js?**
Any idea?
↧