Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

zk

By: a guest on Apr 20th, 2013  |  syntax: None  |  size: 1.14 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package login;
  2.  
  3. import org.apache.poi.ss.usermodel.Textbox;
  4.  
  5. import org.zkoss.zk.ui.Component;
  6. import org.zkoss.zk.ui.event.Event;
  7. import org.zkoss.zk.ui.select.SelectorComposer;
  8. import org.zkoss.zk.ui.select.annotation.Listen;
  9. import org.zkoss.zk.ui.select.annotation.VariableResolver;
  10. import org.zkoss.zk.ui.select.annotation.Wire;
  11. import org.zkoss.zk.ui.select.annotation.WireVariable;
  12. import org.zkoss.zul.Messagebox;
  13. import org.zkoss.zul.Window;
  14. public class Login extends SelectorComposer<Component> {
  15.  
  16.         /**
  17.          *
  18.          */
  19.        
  20.         private static final long serialVersionUID = -1082957709625475807L;
  21.  
  22.         /**
  23.          *
  24.          */
  25.         @Wire("win")
  26.     private Window win;
  27.        
  28.         @Wire("user")
  29.         private Textbox user;
  30.        
  31.         @Wire("pass")
  32.         private Textbox  pass;
  33.         public void doAfterCompose(Window comp) throws Exception {
  34.               super.doAfterCompose(comp); //wire variables and event listners
  35.               //do whatever you want (you could access wired variables here)
  36.            }
  37.         @Listen("onClick=#submit")
  38.             public void submit(Event event) { //register a listener to a component called retrieve
  39.             if (this.pass==null)
  40.                 Messagebox.show("รจ null");
  41.             }
  42. }