it.amattioli.guidate.btns
Class OpenWindowComposer

Show UML class diagram
java.lang.Object
  extended by org.zkoss.zk.ui.event.GenericEventListener
      extended by org.zkoss.zk.ui.util.GenericComposer
          extended by it.amattioli.guidate.btns.OpenWindowComposer
All Implemented Interfaces:
Serializable, org.zkoss.zk.scripting.NamespaceActivationListener, org.zkoss.zk.ui.event.EventListener, org.zkoss.zk.ui.util.Composer, org.zkoss.zk.ui.util.ComposerExt

public class OpenWindowComposer
extends org.zkoss.zk.ui.util.GenericComposer

A composer that allows to open a modal window when an onClick event is sent.

The window definition is retrieved from a .zul file whose URI is in a custom-attribute called "windowUri" of the component to which this component is applied.

     <button apply="it.amattioli.guidate.btns.OpenWindowComposer">
         <custom-attributes windowUri="myWindow.zul"/>
     </button>
 
If you need to pass parameters to the window you can use custom-attributes with the "arg." prefix like in:
     <button apply="it.amattioli.guidate.btns.OpenWindowComposer">
         <custom-attributes windowUri="myWindow.zul"
                            arg.myParam="myValue"/>
     </button>
 
The parameter value can be retrieved from a back-bean property using the "propertyArg" prefix:
     <button apply="it.amattioli.guidate.btns.OpenWindowComposer">
         <custom-attributes windowUri="myWindow.zul"
                            propertyArg.myParam="myPropertyName"/>
     </button>
 

Author:
andrea
See Also:
Serialized Form

Constructor Summary
OpenWindowComposer()
           
 
Method Summary
protected  HashMap<String,Object> getArguments(org.zkoss.zk.ui.Component target)
           
protected  String getWindowUrl(org.zkoss.zk.ui.Component target)
           
 void onClick(org.zkoss.zk.ui.event.Event evt)
           
 
Methods inherited from class org.zkoss.zk.ui.util.GenericComposer
didActivate, doAfterCompose, doBeforeCompose, doBeforeComposeChildren, doCatch, doFinally, willPassivate
 
Methods inherited from class org.zkoss.zk.ui.event.GenericEventListener
bindComponent, getController, onEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenWindowComposer

public OpenWindowComposer()
Method Detail

onClick

public void onClick(org.zkoss.zk.ui.event.Event evt)
             throws Exception
Throws:
Exception

getWindowUrl

protected String getWindowUrl(org.zkoss.zk.ui.Component target)

getArguments

protected HashMap<String,Object> getArguments(org.zkoss.zk.ui.Component target)
                                       throws Exception
Throws:
Exception


Copyright © 2011. All Rights Reserved.