Package javax.faces.event

Examples of javax.faces.event.FacesEvent


    Map<String, String> parameters)
  {
    String value = parameters.get(XhtmlConstants.VALUE_PARAM);
    if (value != null)
    {
      final FacesEvent event;
      if (XhtmlConstants.VALUE_SHOW_ALL.equals(value))
      {
        int newEnd = table.getRowCount();
        if (newEnd >= 0)
          event = _createRangeChangeEvent(table, 0, newEnd);
        else
          return;
      }
      else
      {
        int newStart = Integer.parseInt(value) - 1;
        event = createRangeChangeEvent(table, newStart);
      }

      event.queue();
      /* =-=AEW Don't set current value immediately - since that
           would mean that validate/updateModelValues run on the
           wrong rows!!!  Queue an event.
      System.out.println("DECODE: GOTO " + value);
      component.setAttribute("currentValue",
View Full Code Here


      {
        if (doExpand)
          newset.addAll();
        else
          newset.removeAll();
        FacesEvent event = new RowDisclosureEvent(old, newset, table);
        event.queue();
      }
      else
      {
        int rowIndex = Integer.parseInt((String) value);
        int oldIndex = table.getRowIndex();
        table.setRowIndex(rowIndex);
        newset.setContained(doExpand);
        FacesEvent event = new RowDisclosureEvent(old, newset, table);
        event.queue();
        table.setRowIndex(oldIndex);
      }
    }
  }
View Full Code Here

    if (event instanceof TableRowEvent)
    {
      TableRowEvent rowEvent = (TableRowEvent) event;
      Object old = getRowKey();
      setRowKey(rowEvent.getCurrencyKey());
      FacesEvent wrapped = rowEvent.getEvent();
      wrapped.getComponent().broadcast(wrapped);
      setRowKey(old);
    }
    else
    {
      super.broadcast(event);
View Full Code Here

    public void broadcast(FacesEvent event) throws AbortProcessingException {
        makeAlias();

        if (event instanceof FacesEventWrapper) {
            FacesEvent originalEvent = ((FacesEventWrapper) event).getWrappedFacesEvent();
            originalEvent.getComponent().broadcast(originalEvent);
        } else {
            super.broadcast(event);
        }

        removeAlias();
View Full Code Here

    public void broadcast(FacesEvent event) throws AbortProcessingException {
        makeAliases();

        if (event instanceof FacesEventWrapper) {
            FacesEvent originalEvent = ((FacesEventWrapper) event).getWrappedFacesEvent();
            originalEvent.getComponent().broadcast(originalEvent);
        } else {
            super.broadcast(event);
        }

        removeAliases();
View Full Code Here

        boolean abort = false;

        int phaseIdOrdinal = phaseId.getOrdinal();
        for (ListIterator listiterator = _events.listIterator(); listiterator.hasNext();)
        {
            FacesEvent event = (FacesEvent) listiterator.next();
            int ordinal = event.getPhaseId().getOrdinal();
            if (ordinal == ANY_PHASE_ORDINAL ||
                ordinal == phaseIdOrdinal)
            {
                UIComponent source = event.getComponent();
                try
                {
                    source.broadcast(event);
                }
                catch (AbortProcessingException e)
View Full Code Here

        if (event instanceof FacesEventWrapper)
        {
            FacesEventWrapper childEvent = (FacesEventWrapper) event;
            String currNodeId = getNodeId();
            setNodeId(childEvent.getNodeId());
            FacesEvent nodeEvent = childEvent.getFacesEvent();
            nodeEvent.getComponent().broadcast(nodeEvent);
            setNodeId(currNodeId);
            return;
        }
        else
        {
View Full Code Here

    _setDeltas(table, selectedBoxes, unselectedBoxes,
               selectionModel, selectedDelta, unselectedDelta);
    if ((selectedDelta.getSize() != 0) || (unselectedDelta.getSize() != 0))
    {
      FacesEvent event =
        new SelectionEvent(table, unselectedDelta, selectedDelta);
      event.queue();
    }
    table.setRowKey(oldKey);
  }
View Full Code Here

    PreserveState preserve = new PreserveState()
    {
      @Override
      protected void process(UIXHierarchy tree)
      {
        final FacesEvent event;

        Object key = parameters.get(_PATH_PARAM);
        if (_ALL_VALUE.equals(key)) // expandAll event
        {
          if (focusRowKey == null)
          {
            _LOG.severe("UNEXPECTED_TREE_STATE");
            return;
          }
          else
          {
            tree.setRowKey(focusRowKey);
            RowKeySet old = _getExpandedRowKeys(tree);
            RowKeySet newset = old.clone();
            if (expand)
              newset.addAll();
            else
              newset.removeAll();
            event = new RowDisclosureEvent(old, newset, tree);
          }
        }
        else  // expand/collapse event
        {
          _restorePathFromParam(parameters, tree);
          RowKeySet old = _getExpandedRowKeys(tree);
          RowKeySet newset = old.clone();
          newset.setContained(expand);
          event = new RowDisclosureEvent(old, newset, tree);
        }
        event.queue();
      }
    };

    preserve.run((UIXHierarchy) tree);
  }
View Full Code Here

          state.clear();
          state.add();
          // clone, so that subsequent mutations of "state" will
          // not affect the parameters of this event: bug 4733858:
          RowKeySet selected = state.clone();
          FacesEvent event = new SelectionEvent(table, unselected, selected);
          event.queue();
        }
      }
    }
    finally
    {
View Full Code Here

TOP

Related Classes of javax.faces.event.FacesEvent

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.