예제 #1
0
  /**
   * Process specified JSF life-cycle phase.
   *
   * @param context faces context.
   * @param phase current JSF life-cycle phase identifier.
   */
  private void process(FacesContext context, PhaseId phase) {
    if (!this.isRendered()) return;
    this.setIndex(null);

    if (this.getChildCount() > 0) {
      while (this.hasNext()) {
        this.next();
        if (PhaseId.APPLY_REQUEST_VALUES.equals(phase)) {
          super.processDecodes(context);
        } else if (PhaseId.PROCESS_VALIDATIONS.equals(phase)) {
          super.processValidators(context);
        } else if (PhaseId.UPDATE_MODEL_VALUES.equals(phase)) {
          super.processUpdates(context);
        }
      }
    }
    this.setIndex(null);
  }
예제 #2
0
 @Override
 public void restoreState(FacesContext context, Object state) {
   Object values[] = (Object[]) state;
   int i = 0;
   super.restoreState(context, values[i++]);
   items = values[i++];
   beginIndex = (Integer) values[i++];
   endIndex = (Integer) values[i++];
   step = (Integer) values[i++];
   var = (String) values[i++];
   varStatus = (String) values[i++];
   wrapperTagName = (String) values[i];
 }
예제 #3
0
 @Override
 public void broadcast(FacesEvent event) throws AbortProcessingException {
   if (event instanceof IndexedEvent) {
     IndexedEvent indexedEvent = (IndexedEvent) event;
     Integer eventIndex = indexedEvent.getIndex();
     Integer currentIndex = getIndex();
     try {
       setIndex(eventIndex);
       FacesEvent originalEvent = indexedEvent.getOriginalEvent();
       originalEvent.getComponent().broadcast(originalEvent);
     } finally {
       this.setIndex(currentIndex);
     }
   } else {
     super.broadcast(event);
   }
 }
예제 #4
0
 @Override
 public void queueEvent(FacesEvent event) {
   super.queueEvent(new IndexedEvent(this, event, getIndex()));
 }