0

how to integrate ZK and JSF??

asked 2007-11-21 09:30:12 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4635333

By: rickflair

Hi!
I would like to integrate the JSF and ZK, but I cannot. I tried the zkjsf sample, but I just could look 2 JSF pages, I got error message at the other pages.
Could anyone send me a very simple sample? for example: build a listbox from a managed bean. Please write the source code (JSF, java), the XMLs(faces-config.xml, web.xml, zk.xml) and the list of used JARs.
I wasted a lot of times to integrate these 2 framework, but I couldn't.
Please help me, I really don't know what the solution is!
Thank You very much!
rf

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2007-11-22 01:27:53 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4636806

By: waterbottle

Hi,
What kind of error did you get, could you post the error stack trace?
and
Did you try the zk-JSFComps-demo?
In this demo, it include a reservation demo, which include the faces-config.xml, web.xml and zk.xml.
This demo use myfaces 1.1.5 (ZK implement JSF 1.1)

also,

We will release ZK JSFComps 1.0 after few days.
This version is compatible to ZK 3.0.

/Dennis


link publish delete flag offensive edit

answered 2007-11-22 09:47:22 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4637207

By: rickflair

Hi Dennis!
Thank You for your help!
I tried to install the zk-JSFComps-demo (with 2 application servers: Glassfish and tomcat5.5) and I got 2 different error message.
On Tomcat (if I want to open the reservation.jsp):

java.lang.IllegalArgumentException: Illegal pattern character 'y'
java.text.SimpleDateFormat.translatePattern(Unknown Source)
java.text.SimpleDateFormat.applyLocalizedPattern(Unknown Source)
org.zkoss.jsf.zul.impl.BaseDatebox$DateFormatConverter.formatChanged
(BaseDatebox.java:93)
org.zkoss.jsf.zul.impl.BaseDatebox$DateFormatConverter.<init>(BaseDatebox.java:
83)
org.zkoss.jsf.zul.impl.BaseDatebox.afterZULComponentComposed(BaseDatebox.java:5
0)
org.zkoss.jsf.zul.impl.LeafComponent.afterComposeComponent(LeafComponent.java:3
24)
org.zkoss.jsf.zul.impl.BranchComponent.loadZULTree(BranchComponent.java:63)
org.zkoss.jsf.zul.impl.RootComponent$MyRichlet.service(RootComponent.java:166)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:344)
org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:256)
org.zkoss.jsf.zul.impl.RootComponent.encodeEnd(RootComponent.java:285)
javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:498)
...

and on Glassfish (I cannot open the index.jsp as well):

Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoClassDefFoundError: org/apache/commons/el/Logger at org.apache.myfaces.shared_impl.util.ClassUtils.<clinit>(ClassUtils.java:44)
at org.apache.myfaces.config.FacesConfigurator.feedStandardConfig(FacesConfigura
tor.java:157) at
org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:128)
at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServ
letContextListener.java:68) at
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(Start
upServletContextListener.java:51) at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4515)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:5176)
at com.sun.enterprise.web.WebModule.start(WebModule.java:327)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:973)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957) at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688) at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1581) at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1222) at com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleD
eployEventListener.java:182)
...

Is it better if i wait for the ZK JSFComps 1.0?
But It (ZK JSFComps 0.0) should work as well, shouldn't?
Thanks!
rf

link publish delete flag offensive edit

answered 2007-11-22 10:39:43 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4637270

By: waterbottle

Hi,
The first exception,
It is a bug in some location.(Could you tell me your location? then I can make sure this.) I had post it to be a bug, you can track here
http://sourceforge.net/tracker/index.php?func=detail&aid=1836368&group_id=152762
&atid=785191
you could change the default java vm location to en_US(add -Duser.language=en -Duser.country=US to JAVA_OPTS) if you don't want to wait 1.0 release.

About the second exception,
You could copy then apache commons-el.jar into web-inf/lib, this problem should be solved.
I had not tested ZK JSFComps in Glass Fish.
I tested in Jboss 4.0.5 and it works, but fail in Jboss 4.2 cause Jboss 4.2 embeds JSF 1.2 in it and ZK JSFComps can't run in JSF 1.2 runtime.

/Dennis

link publish delete flag offensive edit

answered 2007-11-22 13:59:54 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4637578

By: rickflair

Hi Dennis!
Thank You for your help!
I put to Tomcat what you wrote (-Duser.language=en -Duser.country=US) and the sample (reservation.jsp) works now!
Thanks!
But must I add this at release 1.0 as well?

rf

link publish delete flag offensive edit

answered 2007-11-23 06:26:22 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4638529

By: waterbottle

RF,
This bug is solved and you don't need to add option in the next release.

I just tested ZKJSFComps in glassfish v2.
Unfortunately, ZKJSFComps didn't work in it, since glassfish embed a SUN JSF
1.2 RI.
There is a output disorder problem between jsp-out,jsfcomponent-out and zkjsfcomps-out.
I am still looking why ZKJSFComps can't run in JSF 1.2 RI. (ZKJSFComps implements JSF 1.1 spec.)

/Dennis






link publish delete flag offensive edit

answered 2007-11-23 08:51:44 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4638660

By: rickflair

Ok, thanks!
rf

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: 2007-11-21 09:30:12 +0800

Seen: 346 times

Last updated: Nov 23 '07

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