0

Breaking Change on AnnotateDataBinderInit

asked 2010-01-11 13:31:38 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

On version 3.6 the binder init users setVariable which makes the "binder" variable available at space scope. Now on version 5 get/setVariable is deprecated and it uses setAttribute which sets on the component scope by default.

Is this a bug?

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2010-01-13 02:52:56 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

updated 2010-01-13 02:54:29 +0800

It is spec. change. Does that cause any issue?

link publish delete flag offensive edit

answered 2010-01-13 10:03:25 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

I see...

Well it's kind a issue, because all over my app I use

binder = spaceOwnerComp.getVariable("binder", false);

but the target in the binding init is a inner component.

So as things are now, I can see only two options:
1. update all my zul pages to target the space owner
2. change all my composers to look for the binder in the children component.

link publish delete flag offensive edit

answered 2010-01-13 19:16:39 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

Sorry for the inconvenience. We think the new way is less restrictive and developer can decide where to store the binder.

link publish delete flag offensive edit

answered 2010-01-13 21:27:48 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

updated 2010-01-13 21:28:28 +0800

OK. We have added a compatible library property for such case. Please specify in WEB-INF/zk.xml

	<library-property>
		<name>org.zkoss.zkplus.databind.AnnotateDataBinderInit.compatible</name>
		<value>true</value>
	</library-property>

And AnnotateDataBinderInit will store the created DataBinder in space scope rather than the component scope
You might have to wait for next Fresh release.

link publish delete flag offensive edit

answered 2010-01-14 07:41:27 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

updated 2010-01-14 07:42:18 +0800

That's great Henri!

Thank you very much!

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-01-11 13:31:38 +0800

Seen: 446 times

Last updated: Jan 14 '10

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