Package org.apache.myfaces.tobago.event

Examples of org.apache.myfaces.tobago.event.SortActionEvent


      UIComponent source = facesEvent.getComponent();
      UIComponent sourceParent = source.getParent();
      if (sourceParent.getParent() == this
          && source.getId() != null && source.getId().endsWith(SORTER_ID)) {
        facesEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
        parent.queueEvent(new SortActionEvent(this, (UIColumn) sourceParent));
      } else {
        super.queueEvent(facesEvent);
      }
    }
  }
View Full Code Here


  private Comparator comparator;

  public Object invoke(FacesContext facesContext, Object[] aobj)
      throws EvaluationException {
    if (aobj[0] instanceof SortActionEvent) {
      SortActionEvent sortEvent = (SortActionEvent) aobj[0];
      if (LOG.isDebugEnabled()) {
        LOG.debug("sorterId = " + sortEvent.getComponent().getId());
      }
      UIColumn column = sortEvent.getColumn();
      UIData data = sortEvent.getSheet();

      Object value = data.getValue();
      if (value instanceof DataModel) {
        value = ((DataModel) value).getWrappedData();
      }
View Full Code Here

    this.addressDao = addressDao;
  }

  public void sheetSorter(ActionEvent event) {
    if (event instanceof SortActionEvent) {
      SortActionEvent sortEvent = (SortActionEvent) event;
      UIColumn column = (UIColumn) sortEvent.getColumn();

      SheetState sheetState = ((UISheet) sortEvent.getSheet()).getSheetState(FacesContext.getCurrentInstance());
      currentAddressList = addressDao.findAddresses(searchCriterion, column.getId(), sheetState.isAscending());
    }
  }
View Full Code Here

    }
  }

  public void sheetSorter(ActionEvent event) {
    if (event instanceof SortActionEvent) {
      SortActionEvent sortEvent = (SortActionEvent) event;
      UISheet sheet = (UISheet) sortEvent.getComponent();
      SheetState sheetState
          = sheet.getSheetState(FacesContext.getCurrentInstance());
      String columnId = sheetState.getSortedColumnId();
      List<SolarObject> list = (List<SolarObject>) sheet.getValue();
      SolarObject sun = list.remove(0);
View Full Code Here

    this.addressDao = addressDao;
  }

  public void sheetSorter(ActionEvent event) {
    if (event instanceof SortActionEvent) {
      SortActionEvent sortEvent = (SortActionEvent) event;
      UIColumn column = (UIColumn) sortEvent.getColumn();

      SheetState sheetState = ((UISheet) sortEvent.getSheet()).getSheetState(FacesContext.getCurrentInstance());
      currentAddressList = addressDao.findAddresses(searchCriterion, column.getId(), sheetState.isAscending());
    }
  }
View Full Code Here

      UIComponent source = facesEvent.getComponent();
      UIComponent sourceParent = source.getParent();
      if (sourceParent.getParent() == this
          && source.getId() != null && source.getId().endsWith(SORTER_ID)) {
        facesEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
        parent.queueEvent(new SortActionEvent(this, (UIColumn) sourceParent));
      } else {
        super.queueEvent(facesEvent);
      }
    }
  }
View Full Code Here

        UISheet sheet = new UISheet();
        UIColumn column = new UIColumn();
        sheet.getChildren().add(column);
       
        Sorter sorter = new Sorter();
        SortActionEvent sortActionEvent = new SortActionEvent(sheet, column);
        sorter.perform(sortActionEvent);

        List list = new ArrayList();
        sheet.setValue(list);
        sorter.perform(sortActionEvent);
View Full Code Here

        UISheet sheet = new UISheet();
        UIColumn column = new UIColumn();
        sheet.getChildren().add(column);
       
        Sorter sorter = new Sorter();
        SortActionEvent sortActionEvent = new SortActionEvent(sheet, column);
        sorter.perform(sortActionEvent);

        List list = new ArrayList();
        sheet.setValue(list);
        sorter.perform(sortActionEvent);
View Full Code Here

      UIComponent source = facesEvent.getComponent();
      UIComponent sourceParent = source.getParent();
      if (sourceParent.getParent() == this
          && source.getId() != null && source.getId().endsWith(SORTER_ID)) {
        facesEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
        parent.queueEvent(new SortActionEvent(this, (UIColumn) sourceParent));
      } else {
        super.queueEvent(facesEvent);
      }
    }
  }
View Full Code Here

    this.addressDao = addressDao;
  }

  public void sheetSorter(ActionEvent event) throws AddressDaoException {
    if (event instanceof SortActionEvent) {
      SortActionEvent sortEvent = (SortActionEvent) event;
      UIColumn column = (UIColumn) sortEvent.getColumn();

      SheetState sheetState = sortEvent.getSheet().getSheetState(FacesContext.getCurrentInstance());
      currentAddressList = addressDao.findAddresses(searchCriterion, column.getId(), sheetState.isAscending());
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.event.SortActionEvent

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.