0

Zeta Form Builder - interaction between UI and Controller ?

asked 2009-04-20 10:00:51 +0800

TLHP gravatar image TLHP
111 1 3

I want to understand how the MVC pattern works with Spring + Hibernate, by analyze the code generated by Zeta Form Building.

Someone can tell me which annotation were used to do the relation between UI (.zul file) and the Controller, and how it work?

Thanks in advance ...

delete flag offensive retag edit

24 Replies

Sort by » oldest newest

answered 2010-11-04 20:06:18 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

Hi dandrop,
You try to access the following link
http://books.zkoss.org/wiki/Small_Talks/2010/November/Your_title
type your title in url, and it will be empty, you can click edit this page.
then you can start to create s smalltalk.
You have to log in (create account) first.
The detail you can refer to the following link
http://books.zkoss.org/wiki/Small_Talks/2008/November/Help:Writing_Small_Talks

link publish delete flag offensive edit

answered 2010-11-04 15:04:48 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Looks nice Dandrop.

Arghh, i would have 16 cpu's too :-)

link publish delete flag offensive edit

answered 2010-11-04 14:47:45 +0800

dandrop gravatar image dandrop
39

Hi Jimmy,

Thanks a lot! It solved my problem!

I want to create a article to share my Controller generic project, that i think it will be very usefully for user who are beginning.

Do you know how i can do that?


Thanks!

link publish delete flag offensive edit

answered 2010-10-28 19:50:09 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

Hi ovazquezv
Please download from the following link
http://code.google.com/p/zkspring/downloads/list

link publish delete flag offensive edit

answered 2010-10-28 10:34:50 +0800

dandrop gravatar image dandrop
39

Hi ovazquezv,

In my case! I create a Tabbox and there a controller in each Tab!

For the resolve my problem, i needed to change the logic! Instead I close the tab I change the visible for false.
and I use the session for recover the object.

I have helped you!

This is the application that i am working

http://www.jgle.com.br/actiwi/

link publish delete flag offensive edit

answered 2010-10-27 16:20:32 +0800

ovazquezv gravatar image ovazquezv
39

hi everybody

i have the same exception

Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.HashMap' to required type 'java.util.Map' for property 'customEditors'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.Class] to required type [java.lang.String] for property 'customEditors[class java.lang.Class]': no matching editors or conversion strategy found
at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:462)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:499)
at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:493)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1371)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
... 26 more
Caused by: java.lang.IllegalStateException: Cannot convert value of type [java.lang.Class] to required type [java.lang.String] for property 'customEditors[class java.lang.Class]': no matching editors or conversion strategy found
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:231)
at org.springframework.beans.TypeConverterDelegate.convertToTypedMap(TypeConverterDelegate.java:606)
at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:178)
at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:447)
... 32 more


I´m using zk-spring-core-bin-3.0RC.zip, zk-bin-5.0.4.zip, Spring 3.0.4, hibernate 3.

And i want to test using the zk-spring-core-bin-3.0RC-FL-2010-08-10 release. but i can't find the url in order to download.

Can you help me with the url or the zip, or some suggestions.

Regards

link publish delete flag offensive edit

answered 2010-09-09 20:32:40 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

Danilo,

ZetaForm is an experimental feature and is based on old version of ZK (3.x), Spring (version 2.x), and ZK Spring(1.x). Unfortunately, until we get resources to handle it we cannot upgrade it to ZK 5, Spring 3.x and ZK Spring 3.0.

It is better to post this to ZK Features tracking list so we can track it.

http://sourceforge.net/tracker/?group_id=152762&atid=785194

link publish delete flag offensive edit

answered 2010-09-09 15:37:13 +0800

dandrop gravatar image dandrop
39

Hi Henri,
I did the downlaod in this link http://www.zkoss.org/download/zkspring.dsp and the file zkspring-core.jar isn't correct.

I did the download of version zk-spring-core-bin-3.0RC-FL-2010-08-10 and it is up works, but now it show the following message:

"Cause: org.zkoss.spring.bean.ZkSpringUiFactory$ReusablePage cannot be cast to org.zkoss.zk.ui.Component
java.lang.ClassCastException: org.zkoss.spring.bean.ZkSpringUiFactory$ReusablePage cannot be cast to org.zkoss.zk.ui.Component
at org.zkoss.spring.impl.ZKProxy$1.getSelf(ZKProxy.java:132)
at org.zkoss.spring.web.context.request.IdSpaceScope.get(IdSpaceScope.java:50)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1045)
at org.zkoss.spring.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:72)"

I will make more testing and when it works, I post the changing what I did.

Henri, i'm sorry, but I didn't understood what you want that i do!

Tks for your help
\Danilo

link publish delete flag offensive edit

answered 2010-09-07 20:50:58 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

@Robert,

> ...org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'zkTypePropertyEditor': Initialization of bean failed ...


This issue has been reported and fixed, see

http://code.google.com/p/zkspring/issues/detail?id=3&can=1

The newest freshly release shall solve it.

Regarding xmlns:zksp-annot="http://www.zkoss.org/2008/zkspring-annot. It is deprecated since ZK Spring 3.0RC. The Spring 3.x has changed package and method signature significantly and it has to be run under Java 1.5 or above. Thus ZK Spring 3.0RC has been forced to change accordingly. The function of zkspring-annot.jar shall be "merged" into zkspring-core.jar in ZK Spring 3.0RC.

@Danilo,

The ZetaForm is originally based on previous ZK Spring 1.x version. Would you post a Feature request regarding make it work with new ZK Spring 3.0RC, so we can track it. Thanks.

link publish delete flag offensive edit

answered 2010-09-01 10:28:14 +0800

dandrop gravatar image dandrop
39

Hi Ashish and Jimmy,

Thanks Jimmy, I changed the file applicationContext, i had not seen this litle difference.

But now it's show the error message:

"
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'zkTypePropertyEditor': Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.HashMap' to required type 'java.util.Map' for property 'customEditors'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.Class] to required type [java.lang.String] for property 'customEditors[class java.lang.Class]': no matching editors or conversion strategy found
...
...

"

Ashish thanks for your help too, to try solve, I did the exactly basic configuration that show in the ZKSpring, but if you add the line "<zkspc:zk-config></zkspc:zk-config>" in the applicationContext.xml it's show the error message:

"Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'zkspc:zk-config'."

Regards,
\Danilo

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: 2009-04-20 10:00:51 +0800

Seen: 2,385 times

Last updated: Nov 04 '10

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