ZK

my login/index zul page is loading twice, where as i am only calling it once

…衆ロ難τιáo~ 提交于 2019-12-11 08:41:00
问题 I am using zk ce version 6.5 and i have a problem. My login/index pages is being loaded twice. when i on logout button call this: Executions.createComponents("login", center, null); above page has two fields and i am using MVVM approach. Now it loads fine, but as soon as i enter the username in the textbox or enter the password in textbox, page is automatically refreshed. I have checked in my code, i am not calling the above method anywhere else in a process here. Please tell me why on

ZK: zul get value from input form-data

非 Y 不嫁゛ 提交于 2019-12-11 06:42:42
问题 I need a help about ZK framework. This is my situation. I have a html page: <form id="frm1" action="http://localhost:8080/spuWebApp" METHOD="POST"> <input type="hidden" id="codigoUnicoCliente" name="codigoUnicoCliente" value="00000050055255"> <input type="button" onclick="myFunction()" value="Invar Spu POST URL"> </form> Then, after submitting the form, my zk project recieves the data in bridge.zul. <?init class="com.ibm.ibk.spu.view.BridgeChecker"?> This class contains the following public

Is there any posibilities to autowire Spring bean in ZKoss controller?

一笑奈何 提交于 2019-12-11 06:34:46
问题 I tried to use recommendations and put these annotations in zkoss controller, but even with these code, spring services didnt initialized and i got NullPointer. My code. @VariableResolver(org.zkoss.zkplus.spring.DelegatingVariableResolver.class) public class UserNotesListController extends SelectorComposer<Component> { private static final long serialVersionUID = 1L; private static final Logger log = LoggerFactory.getLogger(UserNotesListController.class); @WireVariable private UserService

zk: after confirmation box, page refresh issue, binder not working

五迷三道 提交于 2019-12-11 05:38:29
问题 I was successfully deleting selected items from listbox and after that all objects were deleted from db and listbox was refreshed. then i added the confirmation box with yes and no option, then my list wasn't refreshed. i saw this thread with similar problem on zk forum with a solution, i implemented it but getting the class cast exception I am using MVVM http://forum.zkoss.org/question/73640/refreshing-listbox-after-deleting-an-itemrow/ code getting the exception: AnnotateDataBinder binder =

In ZK Can we PostNotifyChange more than one variables

大城市里の小女人 提交于 2019-12-11 05:09:28
问题 I will want to notify some specific variables of a class with the help of PostNotifyChange So i was trying BindUtils.postNotifyChange(null, null, taskListModel, "model,sequence"); It is not working :( Can we PostNotifyChange more than one variable something like we doing in NotifyChange @NotifyChange({ "taskList","sequence" }) Is it possible or not with PostNotifyChange 回答1: I don't believe so, sorry. From the source, it appears BindUtils just takes a single property name and doesn't try to

Zk how to pass parameter from java code to zk page?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 05:08:49
问题 I am novice in ZK. I use very old zk framework version(legacy project). I render zk page so: Executions.createComponents("/myZul.zul", null, null)) I need to pass parameter to zul. And if parameter is true I need render checkbox and otherwise - not on myZul.zul I need something like this on zul: if(parameter){ <checkbox id="my_id" label="my checkbox" /> } UPDATE my zul: <window xmlns="http://www.zkoss.org/2005/zul" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:h="http://www.w3

zookeeper --java API基本操作

拈花ヽ惹草 提交于 2019-12-11 02:37:59
org.apache.zookeeper.Zookeeper Zookeeper 是在Java中客户端主类,负责建立与zookeeper集群的会话,并提供方法进行操作。 org.apache.zookeeper.Watcher Watcher接口表示一个标准的事件处理器,其定义了事件通知相关的逻辑,包含KeeperState和EventType两个枚举类,分别代表了通知状态和事件类型,同时定义了 事件的回调方法:process(WatchedEvent event) 。 process方法是Watcher接口中的一个回调方法,当ZooKeeper向客户端发送一个Watcher事件通知时,客户端就会对相应的process方法进行回调,从而实现对事件的处理。 import org.apache.zookeeper.*; import java.util.List; /** * @author kismet * @date 2019-12-10 10:52 */ public class zookeeperDemo1 { public static void main(String[] args) throws Exception { // 初始化 ZooKeeper实例(zk地址、会话超时时间,与系统默认一致、watcher) ZooKeeper zk = new ZooKeeper(

ZK inner class tree property not readable

风格不统一 提交于 2019-12-11 00:39:40
问题 I have almost the same problem as this question: Property not readable on a inner class in a TreeModel But the same solution seems not applicable. I have a tree, and as I implemented my Entity, and my TreeModel, and they are working just fine, on my .zul file my "data" property isn't found on the treecell. Here's some of the code: -The structure implementation, that runs @AfterCompose: private void montarEstrutura(){ Unidade ub1 = new Unidade(); ub1.setParent(null); ub1.setNumero("NBase");

zk framework: how to load zul pages from WEB-INF under directory zul

牧云@^-^@ 提交于 2019-12-11 00:25:38
问题 I am using zk framework 6. I am trying to put my zul pages in /WEB-INF/zul directory. My index.zul file forwards the request to /WEB-INF/zul/login.zul which has a composer LoginComposer. But when I am on login page I want to redirect the user to another page e.g. home.zul. But I am getting 404 error. Both login.zul and home.zul are in zul directory along with their respective composers. in loginComposer.java i have the following code to redirect to the home page which is called on a button

ZooKeeper源码解析(二)-Java编程API

淺唱寂寞╮ 提交于 2019-12-10 20:45:45
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> ZooKeeper还为客户端提供了Java API编程接口的方式。API接口主要是ZooKeeper类中的方法,下面列举几个常用的客户端操作的Java代码示例。 create 创建ZooKeeper路径节点,参数需提供路径名称和路径关联数据。对应create命令。 示例代码如下: ZooKeeper zk= new ZooKeeper("127.0.0.1",SESSION_TIME,this); zk.create("/test","Hello".getBytes(), null, CreateMode.PERSISTENT); 删除 删除路径,对应delete命令。 ZooKeeper zk= new ZooKeeper("127.0.0.1",SESSION_TIME,this); zk.delete("/test", -1); getData 获取路径关联数据。对应get命令。 ZooKeeper zk= new ZooKeeper("127.0.0.1",SESSION_TIME,this); String data = zk.getData("/test", false,null); setData 设置节点关联数据。对应set命令。 ZooKeeper zk= new ZooKeeper("127