0

ZK Calendar as a native JSF component like Zk Spreadsheet. Where can i find Taglib class to use it ?

asked 2010-10-13 05:05:21 +0800

ochantereau gravatar image ochantereau
24

updated 2010-10-13 05:22:54 +0800

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 ?

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2010-10-13 05:36:59 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

updated 2010-10-13 05:37:45 +0800

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>

and link this taglib config file in your web.xml as
	<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.

link publish delete flag offensive edit

answered 2010-10-13 05:44:05 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

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.

link publish delete flag offensive edit

answered 2010-10-13 06:39:18 +0800

ochantereau gravatar image ochantereau
24

Do you think it works on JSF 1.2 ? There are no dependence with JSF version ?

link publish delete flag offensive edit

answered 2010-10-13 23:39:44 +0800

ashishd gravatar image ashishd flag of Taiwan
1972 6

Hi ochantereau,
the method I described above is only applicable to JSF 2.0 as it would be a facelet component.

link publish delete flag offensive edit

answered 2011-12-29 18:38:40 +0800

rose83 gravatar image rose83
18

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)

link publish delete flag offensive edit

answered 2011-12-30 01:13:38 +0800

samchuang gravatar image samchuang
4084 4

hi. rose83

could you post your sample code Java and zul ? do you use tomcat or ?? how about the web.xml setting ?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-10-13 05:05:21 +0800

Seen: 630 times

Last updated: Dec 30 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More