-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I would use ZK Calendar as a native JSF component like Zk Spreadsheet.
But i didn't have class for taglib. ex: ZKSpreadsheetTag.class
Thx.
PS : It is possible to have source code for ZKSpreadsheetTag.class ?
Hi ochantereau,
You can do it yourself. Here is a how-to sort of reference to Embed any ZK component as a native JSF Component.
Once you have your tag ready prepare a taglib config file like this
<?xml version="1.0" encoding="UTF-8"?> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd" version="2.0"> <namespace>any_component_uri</namespace> <tag> <tag-name>componenttagname</tag-name> <component> <component-type>actualcomponenttype</component-type> </component> </tag> </facelet-taglib>
<context-param> <param-name>javax.faces.FACELETS_LIBRARIES</param-name> <param-value>/WEB-INF/jsfzss-taglib.xml</param-value> </context-param>
And you are all set. Once you have success with this we would appreciate if you could contribute back your code to the community.
Thanks.
Hi ochantereau,
btw support for this is from ZK 5.0.5 release so you will have to download latest freshly release to make this work.
Do you think it works on JSF 1.2 ? There are no dependence with JSF version ?
Hi,
I tried implementing above the same for zul spread sheet. I used the code above for the ZKSpreadsheetTag class with the spreadsheet component instead of window. I am getting the below exception.
Can you please help? We are currently evaluating zk spreadsheet for use with our application which is extensively based on spreadsheet. While trying to build the prototype the below exception is stalling the effort.
INFO: Exception when handling error trying to reset the response.
java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1159)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1647)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at org.zkoss.zss.model.impl.ExcelImporter.importsFromStream(ExcelImporter.java:114)
at org.zkoss.zss.model.impl.ExcelImporter.importsFromURL(ExcelImporter.java:88)
at org.zkoss.zss.ui.Spreadsheet.getBook(Spreadsheet.java:342)
at org.zkoss.zss.ui.Spreadsheet.getSelectedSheet(Spreadsheet.java:419)
Asked: 2010-10-13 05:05:21 +0800
Seen: 630 times
Last updated: Dec 30 '11