0

Not able to bind Spring beans after zk upgrade

asked 2013-06-18 14:22:35 +0800

javaenthu gravatar image javaenthu
141 2

updated 2013-06-26 04:51:03 +0800

Hi, My application was working perfectly fine on ZKoss 5.x before upgrade. We recently upgraded to Zkoss 6.5.2. In the composer layer we have autowired the service Spring beans, before upgraded they were totally fine but after the ZK upgrade to latest version 6.5.2 all service beans are null ( not auto wired) and all are throwing Null Pointer Exception. I am adding code here:

For ZUL File :

<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<groupbox width="1310px">
    <caption label="More"/>
    <a id="screenLink">Local transfers screen</a>
</groupbox>

<timer id="timer" delay="3000" repeats="true"/>

And the composer class:

public class ZYZComposer extends GenericForwardComposer {
    private MyService transferService;
    private Window myWin;
    private A screenLink;

    public ZYZComposer() {
        super();
    }

    @Override
    public void doAfterCompose(Component comp) throws Exception {
        super.doAfterCompose(comp);
        if (transferService.isEnabled()) {
            screenLink.setHref(transferService.getScreenUrl());
        } else {
            myWin.setVisible(false);
        }
    }

    public void onTimer$timer() {
        if (transferService.isEnabled())  { // Some logic  }
    }  
}

I am not sure if I am missing something. I am stuck on this . Can any one please help or give some ideas how to go about it? It will be great help if somebody can give some pointers.

Thanks in advance. -JE

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-06-20 07:23:18 +0800

javaenthu gravatar image javaenthu
141 2

Any idea why Spring beans are not autowired in composer layer? Any help will be useful. Regards , JE

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
1 follower

RSS

Stats

Asked: 2013-06-18 14:22:35 +0800

Seen: 12 times

Last updated: Jun 26 '13

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