Ejemplo n.º 1
0
  public void agreagarEventoMenupopUp(Button filtrar, final Menupopup menupopup) {

    if (!menupopup.getFirstChild().isListenerAvailable(Events.ON_CLICK, true))
      menupopup
          .getFirstChild()
          .addEventListener(
              Events.ON_CLICK,
              new EventListener<Event>() {
                @Override
                public void onEvent(Event arg0) throws Exception {
                  parametrizarVentanaFiltroDinamico();
                }
              });

    if (!menupopup.getLastChild().isListenerAvailable(Events.ON_CLICK, true))
      menupopup
          .getLastChild()
          .addEventListener(
              Events.ON_CLICK,
              new EventListener<Event>() {
                @Override
                public void onEvent(Event arg0) throws Exception {
                  action.setAttribute("optFiltroAplicado", "N");
                  onListarDetalle();
                  agregarEventoFiltrar();
                }
              });
  }
  @Listen("onHeaderRightClick = spreadsheet")
  public void onHeaderRightClick(HeaderMouseEvent event) {

    switch (event.getType()) {
      case COLUMN:
        topHeaderMenu.open(event.getClientx(), event.getClienty());
        break;
      case ROW:
        leftHeaderMenu.open(event.getClientx(), event.getClienty());
        break;
    }
  }