Package org.zkoss.zk.ui

Examples of org.zkoss.zk.ui.Execution


   *
   * @param component
   *            target component
   */
  public static void setSelfContextComponent(Component component) {
    final Execution exec = Executions.getCurrent();
    final VariableResolver vresolver = exec.getVariableResolver();
    ((ExecutionResolver) vresolver).setSelf(component);
  }
View Full Code Here


   * Returns current self context component
   *
   * @returns component
   */
  public static Component getSelfContextComponent() {
    final Execution exec = Executions.getCurrent();
    final VariableResolver vresolver = exec.getVariableResolver();
    return (Component) ((ExecutionResolver) vresolver).getSelf();
  }
View Full Code Here

    final Scope scope = getZKScope();
    return scope != null ? scope.getAttributes() : null;
  }
 
  protected Scope getZKScope() {
    final Execution exec = Executions.getCurrent();
    if (exec != null) {
      final VariableResolver vresolver = exec.getVariableResolver();
      if (vresolver != null) {
        return (Scope) vresolver.resolveVariable(getZKScopeName());
      }
    }
    return null;
View Full Code Here

    }
    return out.toString();
  }
 
  public static String nextUpdateId(){
    Execution ex = Executions.getCurrent();
    Integer count;
    synchronized(ex){
      count = (Integer)ex.getAttribute("_zssmseq");
      if(count==null){
        count = new Integer(0);
      }else{
        count = new Integer(count.intValue()+1);
      }
      ex.setAttribute("_zssmseq",count);
    }
    return count.toString();
  }
View Full Code Here

    String sheetid = getUuid();
    String name ="#"+sheetid;
   
    int cellwidth;//default
    int cellheight;//default
    Execution exe = Executions.getCurrent();
   
    boolean isGecko = exe.isGecko();
    boolean isIE = exe.isExplorer();
    //boolean isIE7 = exe.isExplorer7();
   
    if(isGecko){//firefox
      cellwidth = cw;
      cellheight = rh;
View Full Code Here

   * Spring security(3.0RC and later) and Spring webflow(only for 1.x)
   */
  protected List _variableResolvers = new ArrayList();

  public DelegatingVariableResolver() {
    final Execution exec = Executions.getCurrent();
    String classes = null;
    if (exec != null) {
      classes = exec.getDesktop()
        .getWebApp().getConfiguration()
        .getPreference("org.zkoss.spring.VariableResolver", null);
    }

    if (classes == null)
View Full Code Here

    }
  }
  /** Resets the child page of the owner, if any.
   */
  /*package*/ static void resetOwner() {
    final Execution exec = Executions.getCurrent();
    if (exec != null) {
      final Component comp = ((ExecutionCtrl)exec).getVisualizer().getOwner();
      if (comp instanceof Includer)
        ((Includer)comp).setChildPage(null);
    }
View Full Code Here

  /** Handles DesktopRecyle. */
  /*package*/ static Desktop beforeService(
  DesktopRecycle dtrc, ServletContext ctx, Session sess,
  HttpServletRequest request, HttpServletResponse response, String path) {
    if (dtrc != null) {
      final Execution olde = Executions.getCurrent();
      final Object olds = SessionsCtrl.getRawCurrent();
      final Execution exec = new TemporaryExecution(ctx, request, response, null);
      SessionsCtrl.setCurrent(sess);
      ExecutionsCtrl.setCurrent(exec);
      try {
        return dtrc.beforeService(exec, getURI(path, request.getQueryString()));
      } catch (Throwable ex) {
View Full Code Here

  public void sendRedirect(String uri, String target) {
    sendRedirect(uri); //target is ignored (not supported)
  }
  public void forward(Writer out, String page, Map params, int mode)
  throws IOException {
    final Execution exec = ExecutionsCtrl.getCurrent();
    ExecutionsCtrl.setCurrent(null);
      //It is fake one and shall not be re-used by forward
    try {
      super.forward(out, page, params, mode);
    } finally {
View Full Code Here

    //fetch old Event stored in Session and post again
    final Component comp = event.getTarget();
   
    final Page page = comp.getPage();
    final String url = (String) event.getData();
    final Execution exec = Executions.getCurrent();
    try {
      doModal(page, url);
      } finally {
      if (comp.isListenerAvailable(event.getName(), true)) {
        EventListener listener = (EventListener) comp.getAttribute(event.getName());
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.Execution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.