Deprecated API


Contents
Deprecated Classes
org.zkoss.spring.web.context.CoreContextListener
          Please use GenericForwardComposer or SelectorComposer. Pre-processes Spring beans for possible auto-wiring of ZK components.
If initial parameter 'use-urlclassloader' is true, it uses URLClassLoader to find classpath. Otherwise, it searches them by resource containing MANIFEST.MF.
 
org.zkoss.spring.util.GenericSpringComposer
          after release of zkspring 3.1, suggest to use GenericForwardComposer or SelectorComposer.

An abstract composer that you can extend and write intuitive @EventHandler("myComponent.onXXX") event handler methods and auto-wired components in a ZK ZUML page. This class will add forward condition to myComponent and forward source onXXX event received by teh source myComponent to the target component method annotated with (@link EventHandler) annotation.

Notice that since this composer kept references to the components, single instance object cannot be shared by multiple components.

The following is an example. The onClick event received by Button will be forwarded to target Window myWin and the Textbox component with id name and Button component with id greetBtn are injected into name and greetBtn fields respectively (so you can use name and greetBtn variables directly in showGreeting without problem)


 GreetingCtrl.java
 @org.springframework.stereotype.Component ("greetingCtrl")
 @Scope ("desktop")
 public class GreetingCtrl extends GenericSpringComposer {

                @Autowired private Textbox name;
                @Autowired private Button greetBtn;
        
        @EventHandler("greetBtn.onClick")
                public void showGreeting(Event evt) throws WrongValueException, InterruptedException {
                        Messagebox.show("Hello " + name.getValue() + "!");
                }
 }
 
 test.zul
 
 <?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
 <window id="myWin" apply="${greetingCtrl}">
                <textbox id="name" />
                <button id="greetBtn" label="Greet!" />
 </window>

 
 
org.zkoss.spring.context.annotation.ZkClassPathBeanDefinitionScanner
          after release of zkspring 3.1, suggest to use SelectorComposer or GenericForwardComposer An enhanced ClassPathBeanDefinitionScanner which not only detects bean candidates on the classpath but also those ZK component fields (with @Resource annotation) defined in such candidate beans annotated as @Controller and with a @AppliedTo associated ZK component. annotation. 
org.zkoss.spring.context.annotation.ZkComponentScanBeanDefinitionParser
          after release of zkspring 3.1, suggest to use SelectorComposer or GenericForwardComposer Enhanced version to handle annotation based ZK component Spring bean definition. 
org.zkoss.spring.bean.ZkMethodEventListener
          after release of zkspring 3.1, suggest to use SelectorComposer or GenericForwardComposer ZKMethodEventListener initialize as late as when first event handled. 
 

Deprecated Annotation Types
org.zkoss.spring.context.annotation.AfterCompose
          after release of zkspring 3.1, suggest to use SelectorComposer or GenericForwardComposer Used to specify a method that would be called after the associated ZK component is composed. 
org.zkoss.spring.context.annotation.AppliedTo
          after release of zkspring 3.1, suggest to use SelectorComposer or GenericForwardComposer Used to specify the associated ZK component for the annotated controller class. 
org.zkoss.spring.context.annotation.EventHandler
          after release of zkspring 3.1, suggest to use SelectorComposer or GenericForwardComposer Used to annotate method as an event listener of the specified target ZK component and event name in the form of "abc.onXyz". 
 



Copyright © 2012. All Rights Reserved.