Hi guys,
I'm newbie to Zkoss, so sorry for the stupid question, but is there any way in Zkoss to pass parameters in url path, like for example localhost:8080/viewItem/{itemId} where {itemId} is some number representing id. By this time I only know how to pass parameteres using following syntax localhost:8080/index.zul?itemId=123.
So is there any workaround to use such kind of "fancy" URLs?
Thank you in advance
↧
Passing parameters in url path
↧
File upload events
User clicks on "Browse" button and popup to select a file for upload gets opened. Now what is the event when user clicks on "Open" after selecting a file.
↧
↧
Controller with spring security annotation @RolesAllowed can't work
like this:
@Controller
@RequestMapping(value = "/login")
public class Test extends SelectorComposer {
@Listen("onClick = #searchButton")
public void search() {
String keyword = keywordBox.getValue();
Messagebox.show("keyword:" + keyword);
}
//work,spring mvc component scan can find the class
@Controller
@RequestMapping(value = "/login")
public class Test extends SelectorComposer {
@Listen("onClick = #searchButton")
@RolesAllowed({"ROLE_USER"})
public void search() {
String keyword = keywordBox.getValue();
Messagebox.show("keyword:" + keyword);
}
//don't work,component scan can't find the class,when request /login/x..got a 404 error
↧
Remember Login
Hi guys,
How can we configure the "Remember me" in ZKOSS so that browser will remember our login like Google or Ebay ...
Thank you for your time.
↧
zAu.processing() Flag is oscillating during one operation
Hello there,
currently I am trying to write automated tests using JUnit, Selenium and special GUI Mapper for ZK that I've written. In order to properly wait for an action to finish (for example, switching tabs in webapp) I use in java following code:
while ( i < 2 ) {
while ( Boolean.valueOf((Boolean)execScript("return (!!zAu.processing() || !!jq.timers.length || !!zk.processing || !!jQuery.active)")) ) {
if ( System.currentTimeMillis() - s > timeout ) {
System.out.println("Timeout!");
break;
}
i = 0; // Reset the counter, and try again after 100ms
sleep(100);
}
i++;
sleep(50);
}
I am querying different flags for their statuses. The problem with this code is that we need to wait before and after we have acquired the flags, because:
1. After the action is triggered there is some delay before the flags are properly set
2. The flag is oscillating during execution of one operation, so if we receive "not busy", we need to try again after some time, because it may be set ("busy") again
My question is: is there any alternative to the flags I am using (something more global and not "oscillating") or the issue I've described is a bug in zAu.processing() function? (I can't judge the obfuscated code, but it seems that length of commands que cannot be resolved properly)
↧
↧
zk 7 preview default font size
Hello,
I'm trying the new version ZK 7 preview in my project.
Something is not as expected since the default font size is not as in the previous version (I use 6.5.3) and all component are bigger and not aligned in my pages.
My default font size are managed in zk.xml using library property:
org.zkoss.zul.theme.fontSizeM 11px
Is not working anymore with ZK 7?
↧
Regarding activation of ZK Studio
Hi,
I am using ZK version 5 and installed it on ecplise galileo..However when I tried to activate ZK studio from Help menu-->Activate ZK Studio it is giving alert msg like
---------------------------
ZK Studio
---------------------------
Sorry, the activation has failed because of an unexpected error, please check your internet connection.
If you have any further problem, please email info@zkoss.org
I am not able to resolve what can be the problem..
↧
form binding with immediate UI propagation
We use MVVM and would like to use form binding for direct user Input Validation and Validation before starting some operations. This works very well as described in MVVM_in_ZK6:_Form_Binding .
Our Problem is the lack of direct Propagation to the UI if we Change something in the middle object and other Information fields depend on it. In the mentioned small talk example an update of "Total Price" in the UI occurs when the user clicks save-button. In de middle object totalPrice depends on (@DependsOn) Price and Quantity, so I would expect that totalPrice is updated immediately in the UI. Following anaother simple example:
ViewModel:
package test;
import org.zkoss.bind.annotation.Command;
import org.zkoss.bind.annotation.Init;
/**
* @author Tim
*
*/
public class ViewModel {
protected Security security;
@Init
public void init() {
this.security = new Security();
}
@Command
public void save() {
}
/**
* @return the security
*/
public Security getSecurity() {
return security;
}
/**
* @param security the security to set
*/
public void setSecurity(Security security) {
this.security = security;
}
}
Middle object:
package test;
import org.zkoss.bind.annotation.DependsOn;
/**
* @author Tim
*
*/
public class Security {
protected double price;
protected int quantity;
public Security() {
}
/**
* @return the price
*/
public double getPrice() {
return price;
}
/**
* @param price the price to set
*/
public void setPrice(double price) {
this.price = price;
}
/**
* @return the quantity
*/
public int getQuantity() {
return quantity;
}
/**
* @param quantity the quantity to set
*/
public void setQuantity(int quantity) {
this.quantity = quantity;
}
@DependsOn({"price","quantity"})
public double getTotalPrice() {
return this.price * this.quantity;
}
}
Zul:
| | |
How can I achive the immediate update of total Price in the ui?
↧
Zk5 to Zk6 migration
I'm trying to migrate an application from zk5 to zk6. I followed these [upgrade notes](http://books.zkoss.org/wiki/Small%20Talks/2011/November/ZK%206:%20Upgrade%20Notes) and everything seemed to be ok. But when i run the application the zul page keeps loading and nothing happens. the issue seems to concern only input type components because when i remove the textbox component from the zul page everything works fine.
PS: i had no errors in the eclipse console
anyone has any idea about this?
↧
↧
How to connect Zk Spreadsheet to MySQL?
Hello,
I woluld like to connect zk spreadsheet to mysql database.
I would like also to add two buttons: insert (which will sends data into databse from spreadsheet) and select (which will do select operation on database and export it to excel).
Could anybody help me?
↧
Iframe Blocked Content
On our site served over https a user may enter a url (which may be http) and preview it in a iframe component. In Firefox 23 all mixed content in blocked by default. I'm wondering if there's a way to indicate in the Java and/or Javascript component that the content set on a iframe has been blocked.
↧
Create a Report with ZK using iReport 5.1.0 and JasperReports
Step by Step tutorial [here](http://emrpms.blogspot.in/2013/09/create-report-with-zk-using-ireport-510.html)
↧
XPAGES with Customize excel cells
Hi
Good day to all!
My subject is about zk spreadsheet inside xpages.
I have setup the zk plugins into lotus designer and succesfully able to view the sample nsf with xpages . I took this sample from the download site. The rendering of sample nsf when smooth
Finally I took our existing excel file (this contains comboxes, computed formulas). When preview the xpages with this excel file , I got the following errors. If I use a plain excel file without comboboxes, computed cells , xpages with zk working just fine.
I am not a java guy and could not interpret the errors below.
Any help would be great!! Looking forward to answers
java.lang.NullPointerException
org.zkoss.poi.ss.format.CellFormat.(CellFormat.java:160)
org.zkoss.poi.ss.format.CellFormat.getInstance(CellFormat.java:125)
org.zkoss.zss.model.impl.BookHelper.getFormatText(BookHelper.java:909)
org.zkoss.zss.model.impl.RangeImpl.getFormatText(RangeImpl.java:248)
org.zkoss.zss.ui.impl.Utils.getFormatText(Utils.java:895)
org.zkoss.zss.ui.impl.CellFormatHelper.getHtmlStyle(CellFormatHelper.java:82)
org.zkoss.zss.ui.Spreadsheet$ExtraCtrl.getCellOuterAttrs(Spreadsheet.java:2263)
org.zkoss.zss.ui.fn.UtilFns.getCellOuterAttrs(UtilFns.java:170)
org.zkoss.zss.ui.Spreadsheet.renderProperties(Spreadsheet.java:1204)
org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1729)
org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1808)
org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1748)
org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1808)
org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1748)
org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1808)
org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1748)
org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1808)
org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1748)
org.zkoss.zk.ui.AbstractComponent.redrawChildren(AbstractComponent.java:1808)
org.zkoss.zk.ui.AbstractComponent.redraw(AbstractComponent.java:1748)
org.zkoss.zk.ui.sys.HtmlPageRenders.outStandalone(HtmlPageRenders.java:850)
org.zkoss.zkplus.embed.Renders$PageRenderer.render(Renders.java:207)
org.zkoss.zk.ui.impl.PageImpl.redraw(PageImpl.java:831)
org.zkoss.zk.ui.impl.UiEngineImpl.redrawNewPage(UiEngineImpl.java:567)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:474)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:302)
org.zkoss.zkplus.embed.Renders.render(Renders.java:136)
org.zkoss.xpage.core.renderkit.zul.ZulRendererBase.newZKComponent(ZulRendererBase.java:175)
org.zkoss.xpage.core.renderkit.zul.ZulRendererBase.encodeEnd(ZulRendererBase.java:81)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeEnd(ReadOnlyAdapterRenderer.java:153)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:1005)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:809)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:804)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:804)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:804)
com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1272)
com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1210)
com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:635)
com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:320)
com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:355)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:264)
com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:219)
com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:193)
com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:154)
com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:137)
com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:86)
com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:538)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1140)
com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:803)
com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:758)
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:527)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1124)
com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:513)
com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:342)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:304)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:261)
com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:291)
↧
↧
How to remove default theme form zk
how can i remove default theme from zk(zk.wcs). I like to control text font from my custom style sheet. the requirement is for responsive design.
↧
how to know the current opened file name in zk spread sheet
Hi ZK,
i'm opening my existing file using import option of file menu.using import if i import a file called test.xls in my directory i am getting test-1378212138816.xls some time stamp is getting added here.
how to get the file name into my java program that was updated? or
how to know the currently opened file name that was showing in browser. i have used
DesktopWorkbenchContext workbench = getDesktopWorkbenchContext();
String book_name=workbench.getWorkbookCtrl().getBookName();
if i display bookname i'm getting the original file name but not the updated one with time stamp.
once i get the current file name i need to save the content into database this is my aim i have written the logic to store into db.this will be success if i get the current file name.
please reply me asap
thanks
siva prasad
i have got null pointer exception when i have written the follwing piece of code
Spreadsheet spreadsheet=new Spreadsheet();
String book_name=spreadsheet.getBook().getBookName();
please let me know where i'm wrong
thanks
siva prasad
↧
Can I dowload the ZK Calenda demo?
Can I dowload the ZK Calenda demo?
↧
Load my javascript
I have one zul file called index.zul in which i have created html ul tag.
Each li tag consist of one image and text.
I have javascript which act as content slider for those li content.
This works fine for HTML file.
But it does not work in zul file.
How can i do that slider in zul ??
↧
↧
how to know the current opened file name in zk spread sheet
i have got null pointer exception when i have written the follwing piece of code
Spreadsheet spreadsheet=new Spreadsheet();
String book_name=spreadsheet.getBook().getBookName();
please let me know where i'm wrong.
and
another query is i have opened a file and if i refresh the browser it is taking me to the default file which will be there in the index.zul file and not the one i'm seeing at the time eg., i have opened test.xls if i refresh then i'm going to the file that was there in the index.zul if it is some ZUL_Example.xls i'm going there.
how to get my own file even after i refresh the browser.
thanks
siva prasad
↧
how to save the values of excel cells that has formulas.
Hi All,
i have stored the values successfully in to the database using the POI API documentation.
here in my excel in some fields i have formulas in the cells while storing the actual formula is getting stored
my code will look something like this:
XSSFRow myRow = (XSSFRow) rowIter.next();
Iterator cellIter = myRow.cellIterator();
Vector cellStoreVector = new Vector();
j=0;
while (cellIter.hasNext()) {
XSSFCell myCell = (XSSFCell) cellIter.next();
sql_statement.setInt(2, myRow.getRowNum());//will get the row number...
sql_statement.setInt(3, myCell.getColumnIndex());//will get the column number
sql_statement.setString(4, myCell.toString());// will get the value at the cell
sql_statement.executeUpdate();
if the values in the cells entered normally then no issue here the problem is i have some cells with forumulas like in a particular cell A18=D8+(D9*10) some thing like this.
so with myCell.toString() the formula is getting stored.
how to solve this problem with excel..
thanks
siva prasad.
↧
view print preview pdf
Hi,
I'd like to print or preview print of PDF. I already have that PDF and can supply the InputStream.
I figured out how to download it only:
InputStream is = new FileInputStream("filename...");
Filedownload.save(is, "pdf", "download.pdf");
How can I achieve print in zk components?
cheers,
Martin
↧