0

binding ZK with EMF

asked 2015-11-03 20:49:44 +0800

sbasly gravatar image sbasly
3 1

I'm working on a ZK project and I have a third-party domain model based on EMF. I need to find a way to bind the ZK view with the EMF model.and I didn't find anything about that.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-11-24 13:23:32 +0800

gganassin gravatar image gganassin flag of Luxembourg
540 6
http://www.hybris.com/

updated 2015-11-24 13:34:16 +0800

Hello!

ZK+EMF is a great combination... specially if you also use Teneo and Hibernate for the persistence!

About your question: i cannot understand what is exactly your problem... EMF model classes are just POJOs++ and you should be able to bind them as you normally do - no matter if using MVC or MVVM style.

Old School Example:

//zul side
<idspace id="myEditor" apply="bla.bla.MyController">
...
<textbox value="@{bean.codeMdr}" />

// java side on your MyController who extends a ZK OOTB composer
@Override
public void doAfterCompose(Component comp) throws Exception {
    super.doAfterCompose(comp);
    this.binder = new AnnotateDataBinder(comp);
    YourCustomEMFObj obj = ...
    this.binder.bindBean("bean", obj);
    this.binder.loadAll();
    ...
}

Can you explain me better what exactly is your issue?

Gio

link publish delete flag offensive edit
Your answer
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
2 followers

RSS

Stats

Asked: 2015-11-03 20:49:44 +0800

Seen: 51 times

Last updated: Nov 24 '15

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