Quantcast
Channel: ZK Forum - Individual question feed
Viewing all 9640 articles
Browse latest View live

how read data to spreadsheet using java

$
0
0
How to save complete spreadsheet data in database . please reply me Thanks & regards Rohit Sharma

how to catch arrow keys in grid that uses MVVM

$
0
0
I have a grid of intboxes with a variable number of rows and cols and want to catch the arrow keys to navigate among them. I've ported over the documentation and am still confused as to how to do it, especially with MVVM. Here is the grid I'm working with. Can someone give me an idea how to do it? http://zkfiddle.org/sample/25536h5/13-rk-grid

Call a view model method from zul file not working?

$
0
0
testingZul.zul ===============
test.jsp ========== DemoViewModel.java ================== public class DemoViewModel{ @AfterCompose public void afterCompose(@ContextParam(ContextType.VIEW) Component view){ System.out.println("After Compose ====>>>>>>>>>>>>>>>......"); } @Listen("onTest=#btntest") public void onTest(Event evt){ System.out.println("=========oNTest is not getting Call====="); } } Why the viewmodel class method is not calling?? Kindly help me.

how do i integrate maven dependencies with zkstudio project template

$
0
0
I have just installed eclipse luna and installed zk studio. How do i integrate maven dependencies with zk studio project template in eclipse. Using a lib folder to manage dependencies seems like a step backwards to me I want to migrate an existing war (web archive project) project into a zk studio template project and use already existing dependency management.

ZK Datebox Event

$
0
0
Is Any event will be fired once the user enters all parts(MM/dd/YYYY) of the date ? Other than Onchanging and onBlur events, is there any event ? The issue with onChanging is, it will be fired immed when user start typing the date parts . OnBlur user has to press the tab.

how to create dynamically workbook in zk spreadsheet

$
0
0
I want to create multiple workbook on spreadsheet. please reply me. Thanks and regards Rohit

@bind for macro component with custom class

$
0
0
Hello, i have the following problem: I created a new macro component. It combines a textbox with a popup, that is always shown, when the textbox has focus. myMacro.zul: For this Macro i created a HtmlMacroComponent class: @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"); } } In the .zul pages where i want to use the macro, i want to use @bind for a bean-field: somePage.zul: The Bean is a straightforward JPA-Entity. My problem: the text i put into the textbox is not given to the bean (everything else works, the popup is shown and so on). As an alternative to @ComponentAnnotation i found this: [link](http://zkfiddle.org/sample/6sleo1/2-macro-with-manual-reference "link") But it only works when using a macro component without a custom class. In my case i get a Property not found exception for the pojo. I can't use @ref because we don't have PE or EE license. Can someone help me? ZK version is 6.5.3.

checkbox in foreach in grid/row

$
0
0
Hi, the following code gives me error. How can I make it work? onCheck="@command('pickPick', checked=self.checked, picked=ordw, codeno='pick' + ${each})"> Thanks, Paul.

Is there a way to resolve view model properties as input to client side javascripts?

$
0
0
Is there a way to resolve view model properties as input to client side javascripts? In the example shown below, the "????" indicates the bit that I have a problem with. The my.zul fragment shows a listbox where the attribute "w:onSelect" defines a client side event which is trigged when an entry in the listbox is selected: my.zul fragment:: ... layout stuff here....

ZK 7.0.5 on Maven Central?

$
0
0
Will the ZK 7.0.5 release be published to Maven Central? ZK 7.0.4 never has been.

grid not adding columns when bound variable changes

$
0
0
Hi, I'm still new to MVVM. Can someone explain to me why in my example (http://zkfiddle.org/sample/1prcftd/1-grid-not-adding-columns-when-binding-vars-add-items-to-List) when you press the button at the bottom and the bound variables are modified, columns should increase from 5 to 14 in both grids, but they dont change. The other bound variables of the page change as expected. Thanks for any help.

Can't using SimpleListModel and ListSubModel with Combobox

$
0
0
Hi everyone. I created a simple project. I'm using SimpleListModel to set model for combobox. **- zul file:** **- here is the composer:** public class ComboboxComposer extends SelectorComposer { /** * */ private static final long serialVersionUID = -6520517581633968667L; @Wire private Combobox combobox; @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); NodeDeptUser ndu1 = new NodeDeptUser("label 1", "desc 1"); NodeDeptUser ndu2 = new NodeDeptUser("label 2", "desc 2"); NodeDeptUser[] array = {ndu1, ndu2}; ListModel model = new SimpleListModel(array); combobox.setModel(model); } } - and this is NodeDeptUser.java: public class NodeDeptUser { private String label; private String description; public NodeDeptUser(String label, String description) { this.label = label; this.description = description; } public String getLabel() { return label; } public void setLabel(String label) { this.label = label; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } } When I run the project, there is nothing in combobox. What is wrong? I have the same issues with using ListSubModel, but when I use ListModelList, everything is fine.

How to use ChartModel like Chart

$
0
0
I'm use ZK and i have a problem with Charts. Well, first i have 2 different types of charts: 1. Charts that load on page load 2. Charts that load only after click For first time of Chart i use this sequence of actions: In `LineLabelsComposer.java` in method doCompose i made this: chart1.setModel(LineLabelsData.setCategoryModel()); chart1.getYAxis().getTitle().setText("Values1"); chart1.getTooltip().setEnabled(false); LinePlotOptions linePlotOptions = chart1.getPlotData().getPlotOptions().getLine(); linePlotOptions.setEnableMouseTracking(false); linePlotOptions.getDataLabels().setEnabled(true); chart2.setModel(LineLabelsData.setCategoryModel2()); chart2.getYAxis().getTitle().setText("Values2"); chart2.getTooltip().setEnabled(false); LinePlotOptions linePlotOptions2 = chart2.getPlotData().getPlotOptions().getLine(); linePlotOptions2.setEnableMouseTracking(false); linePlotOptions2.getDataLabels().setEnabled(true); In this case it works all perfectely! When the page is load the graph was built. No problem. The problem is in the second case. Now i have a page with a button. When i click on the button (and not before!) the graph will be built! The graph was built correctely for the data. The problem is that it's impossible to modify some settings of graph. These are my actions:
This is method getModel: private ChartsModel chart; @Command @NotifyChange("chart") public ChartsModel viewGraph(@BindingParam("self") Group self){ String a = self.getLabel(); UserServiceImpl usr = new UserServiceImpl(); chart = usr.viewGraph(a); return chart; } Then this is viewGraph: public ChartsModel viewGraph(String data) { // TODO Auto-generated method stub chart = new Charts(); chart.setModel(LineLabelsData.setCategoryModel(data)); chart.getYAxis().getTitle().setText("Text"); chart.getTooltip().setEnabled(false); LinePlotOptions linePlotOptions = chart.getPlotData().getPlotOptions().getLine(); linePlotOptions.setEnableMouseTracking(false); linePlotOptions.getDataLabels().setEnabled(true); return chart.getModel(); } The problem is that for example `chart.getYAxis().getTitle().setText("Text");` does not work. And so other modified. There are some other method to do second thing?

How to use ChartModel like Chart

$
0
0
I use ZK and i have a problem with Charts. Well, first i have 2 different types of charts: 1. Charts that load on page load 2. Charts that load only after click For first time of Chart i use this sequence of actions: In `LineLabelsComposer.java` in method doCompose i made this: chart1.setModel(LineLabelsData.setCategoryModel()); chart1.getYAxis().getTitle().setText("Values1"); chart1.getTooltip().setEnabled(false); LinePlotOptions linePlotOptions = chart1.getPlotData().getPlotOptions().getLine(); linePlotOptions.setEnableMouseTracking(false); linePlotOptions.getDataLabels().setEnabled(true); chart2.setModel(LineLabelsData.setCategoryModel2()); chart2.getYAxis().getTitle().setText("Values2"); chart2.getTooltip().setEnabled(false); LinePlotOptions linePlotOptions2 = chart2.getPlotData().getPlotOptions().getLine(); linePlotOptions2.setEnableMouseTracking(false); linePlotOptions2.getDataLabels().setEnabled(true); In this case it works all perfectely! When the page is load the graph was built. No problem. The problem is in the second case. Now i have a page with a button. When i click on the button (and not before!) the graph will be built! The graph was built correctely for the data. The problem is that it's impossible to modify some settings of graph. These are my actions:
This is method getModel: private ChartsModel chart; @Command @NotifyChange("chart") public ChartsModel viewGraph(@BindingParam("self") Group self){ String a = self.getLabel(); UserServiceImpl usr = new UserServiceImpl(); chart = usr.viewGraph(a); return chart; } Then this is viewGraph: public ChartsModel viewGraph(String data) { // TODO Auto-generated method stub chart = new Charts(); chart.setModel(LineLabelsData.setCategoryModel(data)); chart.getYAxis().getTitle().setText("Text"); chart.getTooltip().setEnabled(false); LinePlotOptions linePlotOptions = chart.getPlotData().getPlotOptions().getLine(); linePlotOptions.setEnableMouseTracking(false); linePlotOptions.getDataLabels().setEnabled(true); return chart.getModel(); } The problem is that for example `chart.getYAxis().getTitle().setText("Text");` does not work. And so other modified. There are some other method to do second thing?

Release memory of ZK server after closing browser

$
0
0
Hi,all I have used ZK framework for several weeks, and it is amazing solution to achieve my web application. All things go well, but after monitor the memory of ZK server, I find the memory of ZK server would be larger when new session is created. And even closing browser, the memory never decrease. So, may I implement DesktopClean or SessionClean to decrease memory ? Or other solution ? Thank you very much !

Null pointer when invoking to getSelf()

$
0
0
I am getting java null pointer excpetion when trying to access to getSelf(). My java code looks like the folowing: public class TestComposer extends SelectorComposer{ /** * */ private static final long serialVersionUID = -5146912043400471287L; String param; public TestComposer() { this.param = "Mantenimiento general"; Ul ul = new Ul(); ul.setSclass("menu"); Li li = new Li(); li.setSclass("general"); A a = new A(); a.setLabel(this.param); a.setAttribute("onClick", "addTab(this.self)"); li.appendChild(a); ul.appendChild(li); this.getSelf().appendChild(ul); } public String getParam() { return param; } public void setParam(String param) { this.param = param; } } And my ZUL file looks like this: Tags are not correct because i cant post url because of my reputation. Thanks in advance!

Access/Load a non-java resource (zul file) in JAR file

$
0
0
I have a Maven ZK Multi-Module project. I want to put the common resources [java files, images, zul files and css/js files] in one module(Let say -- **common.jar**). Then make other many modules [**.war**] dependent on this jar module. The structure: 1. common.jar 2. a.war 3. b.war 4. c.war 5. d.war 6. a, b, c & d dependent on common.jar. The problem is that I am not able to load/access the non-java resources in those war modules. Tip: I used this example: Inter-Web-Application Communication, but i failed to make it work. Please I appreciate any help that can be given because I don't want to copy these same resources at every module. Thanks

Signature capture using Mouse

$
0
0
Is there any example avail to capture signature using mouse

foreach on object in java vm

$
0
0
Hi, I have the following code repetitive checkbox on a grid / row. How can I run a "foreah" of "item"? @Command @NotifyChange("bitOrw0*") public void pickPick(@BindingParam("checked") boolean isPicked, @BindingParam("picked") Ordine item, @BindingParam("codeno") String pick) { System.out.println(item); if (isPicked) { if (!pick.equals("pick001")) item.setBitOrw001(false); if (!pick.equals("pick002")) item.setBitOrw002(false); if (!pick.equals("pick003")) item.setBitOrw003(false); if (!pick.equals("pick004")) item.setBitOrw004(false); if (!pick.equals("pick005")) item.setBitOrw005(false); if (!pick.equals("pick006")) item.setBitOrw006(false); if (!pick.equals("pick007")) item.setBitOrw007(false); if (!pick.equals("pick008")) item.setBitOrw008(false); ... BindUtils.postNotifyChange(null,null,item,"*"); } else { System.out.println("Pluto"); } } Paolo

ClientInfoEvent ClassCastException: java.lang.Double cannot be cast to java.lang.Integer

$
0
0
Hi ZK version : ZK EE 7.0.2 We have been getting this exception frequently. I am wondering if anyone else seen this and any idea on how to fix it? Thanks! Stack trace: 13-Mar-15 07:50:09.027 [http-apr-8443-exec-7] ERROR [j:] org.zkoss.zk.ui.impl.UiEngineImpl: java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer at org.zkoss.zk.ui.event.ClientInfoEvent.getInt(ClientInfoEvent.java:60) at org.zkoss.zk.ui.event.ClientInfoEvent.getClientInfoEvent(ClientInfoEvent.java:54) at org.zkoss.zk.ui.impl.DesktopImpl.service(DesktopImpl.java:720) at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1249) at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:603) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:485) at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:494) 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:503) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2462) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2451) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
Viewing all 9640 articles
Browse latest View live