Package org.zkoss.zul.event

Examples of org.zkoss.zul.event.PagingEvent


  /** Adds the event listener for the onPaging event. */
  private void addPagingListener(Paginal pgi) {
    if (_pgListener == null)
      _pgListener = new EventListener() {
        public void onEvent(Event event) {
          final PagingEvent evt = (PagingEvent)event;
          Events.postEvent(
            new PagingEvent(evt.getName(), Grid.this,
              evt.getPageable(), evt.getActivePage()));
        }
      };
    pgi.addEventListener(ZulEvents.ON_PAGING, _pgListener);

    if (_pgImpListener == null)
View Full Code Here


        else newInternalPaging();
        _topPad = 0;
        _currentTop = 0;
        _currentLeft = 0;
        //enforce a page loading
        Events.postEvent(new PagingEvent("onPagingImpl", (Component)_pgi, _pgi.getActivePage()));
        invalidate(); //non-paging mold -> paging mold
      }
    }
  }
View Full Code Here

  /** Adds the event listener for the onPaging event. */
  private void addPagingListener(Paginal pgi) {
    if (_pgListener == null)
      _pgListener = new EventListener() {
        public void onEvent(Event event) {
          final PagingEvent evt = (PagingEvent) event;
          Events.postEvent(new PagingEvent(evt.getName(),
              Listbox.this, evt.getPageable(), evt
                  .getActivePage()));
        }
      };
    pgi.addEventListener(ZulEvents.ON_PAGING, _pgListener);

View Full Code Here

          newInternalPaging();
        _topPad = 0;
        _currentTop = 0;
        _currentLeft = 0;
        // enforce a page loading
        Events.postEvent(new PagingEvent("onPagingImpl",
            (Component) _pgi, _pgi.getActivePage()));
        invalidate(); // non-paging mold -> paging mold
      }
    }
  }
View Full Code Here

  /** Adds the event listener for the onPaging event. */
  private void addPagingListener(Paginal pgi) {
    if (_pgListener == null)
      _pgListener = new EventListener() {
        public void onEvent(Event event) {
          final PagingEvent evt = (PagingEvent)event;
          Events.postEvent(
            new PagingEvent(evt.getName(),
              Tree.this, evt.getPageable(), evt.getActivePage()));
        }
      };
    pgi.addEventListener(ZulEvents.ON_PAGING, _pgListener);

    if (_pgImpListener == null)
View Full Code Here

    if (_pgsz != size) {
      _pgsz = size;
      smartUpdate("pageSize", _pgsz);
      updatePageNum();
      Events.postEvent(new PagingEvent("onPagingImpl", this, _actpg));
        //onPagingImpl is used for implementation purpose only
    }
  }
View Full Code Here

    if (pg >= _npg || pg < 0)
      throw new WrongValueException("Unable to set active page to "+pg+" since only "+_npg+" pages");
    if (_actpg != pg) {
      _actpg = pg;
      smartUpdate("activePage", pg);
      Events.postEvent(new PagingEvent("onPagingImpl", this, _actpg));
        //onPagingImpl is used for implementation purpose only
    }
  }
View Full Code Here

   * @since 5.0.0
   */
  public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
    final String name = request.getCommand();
    if (name.equals(ZulEvents.ON_PAGING)) {
      PagingEvent evt = PagingEvent.getPagingEvent(request);
      setActivePage(evt.getActivePage());
      Events.postEvent(PagingEvent.getPagingEvent(request));
    } else
      super.service(request, everError);
  }
View Full Code Here

     */
    public final class OnPagingEventListener implements EventListener {
      @Override
      public void onEvent(Event event) throws Exception {

        PagingEvent pe = (PagingEvent) event;
        int pageNo = pe.getActivePage();
        int start = pageNo * getPageSize();
        // refresh the list
        refreshModel(start);
      }
View Full Code Here

   */
  public final class OnPagingEventListener implements EventListener {
    @Override
    public void onEvent(Event event) throws Exception {

      PagingEvent pe = (PagingEvent) event;
      int pageNo = pe.getActivePage();
      int start = pageNo * getPageSize();
      // refresh the list
      refreshModel(start);
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zul.event.PagingEvent

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.