0

Problem after upgrade to 3.5.0-FL / AnnotateDataBinderInit

asked 2008-09-02 11:17:09 +0800

beginner gravatar image beginner
123 2

Hello,

i wanted to try the new Version of ZK, so i decided to upgrade. ( I made a copy, so i can always downgrade again).

I Use Eclipse for my experiments.

To upgrade, i (i am not a experienced java programmer) put all jars i found in the lib directory over the existing jars in the workspace directory WEB-INF/lib of my example project directory.

As described in the quick start guide i added the new Version in the Window / Preferences / Zk Settings / ZK Packages via "add directory" and changed the checkbox to the new version 3.5.0-FL.

No i started the Application. Everywhere, where my AnnotateDataBinderInit inits via setVariable Values to the Page with initial values in the doAfterCompose, these Values where not initialized in the browser.

On one page, that i call via do comp.doOverlapped() i now got an exception on the statement before: Component comp = (Component) Executions.createComponents(..., null, null):

org.zkoss.zk.ui.UiException: Page is already covered by another Data Binder. Cannot be covered by this Data Binder again. Page:z_ur_0
at org.zkoss.zkplus.databind.AnnotateDataBinderInit.doAfterCompose
--

Has in the new version here something changed? Or have i something forget/made wrong by doing the upgrade from 3.0.7 to the 3.5-Version?

Thanks in Advice for your suggestions!

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2008-09-03 00:30:46 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

Developers used to "mis-use" the AnnotateDataBinderInit and ZK does not check on that. In ZK 3.5, we added the "checking". The error message means that you use two instances of AnnoateDataBinder to "cover" the same page and that can cause unexpected behaviors.

The correct way might be that you shall tell your second AnnotateDataBinderInit to cover only the overlapped window. You can do this by specifying "arg0" in AnnotateDataBinderInit in your overlapped window page. See the JavaDoc of AnnotateDataBinderInit for details. Something like this:

<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="./mywin"?>
<window id="mywin" ...>
...
</window>

This tells the AnnotateDataBinder to "cover" only the "mywin" Window and its descendants so it will not conflict with the main page AnnotateDataBinder.

link publish delete flag offensive edit

answered 2008-09-03 09:19:06 +0800

beginner gravatar image beginner
123 2

Hello henrichen, thanks for your hint! It helped me solving the problem.

I did things in doAfterCompose now in doInit of AnnotateDataBinderInit., and provided the arg0-argument in the init-tags. Now it works as it did under 3.0.7.

Is it, that the doAfterCompose method in 3.5 is'nt called anymore? System.out.println will not come to the console.

I now would say thanks to the forum here. Without that support i wouldn't be able to work with ZK. Beginners like me need such good supporting

Thanks to all!

An additional question: ZK 3.5 will be released in the near future. Means that, that it will be released this year?

link publish delete flag offensive edit

answered 2008-09-03 11:17:17 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

1. AnnotateDataBinderInit now implements InitiatorExt interface, so the old doAfterCompose(Page) will not be called any more. Rather, the doAfterCompose(Page, Component[]) is called. This allows using relative path that starts with "./" or "../".

2. I guess it means that it will be released this month :)

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: 2008-09-02 11:17:09 +0800

Seen: 585 times

Last updated: Sep 03 '08

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