3

ZK + Spring 3 + Hibernate 4 Examples

6 Replies

Sort by » oldest newest

answered 2013-06-28 07:27:30 +0800

benbai gravatar image benbai
2228 6
http://www.zkoss.org

Thanks for your sharing !

link publish delete flag offensive edit

answered 2013-06-30 10:02:52 +0800

franferri gravatar image franferri
48 2

Thank you for sharing! :) Great job!

link publish delete flag offensive edit

answered 2014-05-13 08:51:07 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2625 3 8
http://emrpms.blogspot.in...

All these should work with ZK 7 also. If you have any problem, please let me know

link publish delete flag offensive edit

answered 2015-02-15 11:47:13 +0800

ZKnew7 gravatar image ZKnew7
1

example 3. ZK MVVM листинге записей из базы данных MySQL, используя ZK + Весна + JPA + Hibernate Entity Менеджер

1466 [Scanner-2] ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: No Persistence provider for EntityManager named ZKSpringJPA

What should I do please help

link publish delete flag offensive edit

answered 2020-05-20 14:27:43 +0800

lianan gravatar image lianan
1 1

updated 2020-05-20 14:37:09 +0800

Hi Senthilchettyin,

your examples really help me a lots. Base on your example in your code likes below your used:

@AfterCompose public void initSetup(@ContextParam(ContextType.VIEW) Component view) { Selectors.wireComponents(view, this, false); CRUDService = (CRUDService) SpringUtil.getBean("CRUDService"); allReordsInDB = CRUDService.getAll(AddressBook.class); }

I reference CRUDService.getAll to my CRUD operation,however I always get the null value in my viewmodel returned then message likes: you are using a composer [PersonInforViewModel [selectedPerson=null, personalList=null]] as a view model 2020-05-20 14:03:21.409 ERROR 13092 --- [nio-8080-exec-2] org.zkoss.bind.impl.ParamCall :

java.lang.NullPointerException: null at com.lia.data.viewmodel.PersonInforViewModel.initSetup(PersonInforViewModel.java:53) ~[Clientofthe_earsample-0.0.1-SNAPSHOT.jar:na]

I really have no idea how to fix it . Technologies Used: <java.version>1.8</java.version> <zk.version>9.0.1</zk.version> <zkspringboot.version>1.0.4</zkspringboot.version> <springboot.version>2.2.6.RELEASE</springboot.version> <springframe.version>5.2.6.RELEASE</springframe.version> <org.hibernate-version>5.4.15.Final</org.hibernate-version> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.source>1.8</maven.compiler.source>

link publish delete flag offensive edit

answered 2020-05-20 14:53:52 +0800

lianan gravatar image lianan
1 1

updated 2020-05-20 14:55:06 +0800

Once I put back "apply="org.zkoss.bind.BindComposer" to my ZUL file,got additional error message likes below:

<window id="personinforList" title="Person Information" border="normal" apply="org.zkoss.bind.BindComposer" viewmodel="@id('vm') @init('XXXXXX.PersonInforViewModel')">

2020-05-20 14:49:01.253 WARN 18616 --- [nio-8080-exec-3] org.zkoss.zk.ui.metainfo.Parser : file:/C:/Users...20New/view/PersonInfor.zul:5:81: If the attribute of viewModel is being used, then "org.zkoss.bind.BindComposer" will be applied automatically. Notice that if you want to use another Composer, you will need to apply the "org.zkoss.bind.BindComposer" yourself. 2020-05-20 14:49:01.377 WARN 18616 --- [nio-8080-exec-3] org.zkoss.bind.impl.BinderImpl : you are using a composer [PersonInforViewModel [selectedPerson=null, personalList=null]] as a view model 2020-05-20 14:49:01.409 ERROR 18616 --- [nio-8080-exec-3] org.zkoss.bind.impl.ParamCall :

java.lang.NullPointerException: null at XXXXXXX.PersonInforViewModel.initSetup(PersonInforViewModel.java:53)

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
3 followers

RSS

Stats

Asked: 2013-04-19 07:35:43 +0800

Seen: 859 times

Last updated: May 20

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