Package org.olat.core.gui.control.state

Examples of org.olat.core.gui.control.state.ExtendedControllerState


    // compare all controllerstates
    int osize = other.getExtendedControllerStateCount();
    if (osize != extStateList.size()) return false;
    // H: at least the same number of entries: now we must compare one by one
    for (int i = 0; i < osize; i++) {
      ExtendedControllerState ostate = other.getExtendedControllerStateAt(i);
      ExtendedControllerState mystate = this.getExtendedControllerStateAt(i);
      if (!ostate.isSame(mystate)) return false;
    }
    return true;
   
  }
View Full Code Here


 
  public String toString() {
    int size = extStateList.size();
    StringBuilder sb = new StringBuilder(size+":\n");
    for (int i = size-1; i >= 0; i--) {
      ExtendedControllerState ecstate = extStateList.get(i);
      sb.append("[").append(ecstate.toString()).append("]\n");
    }
    return sb.toString();
  }
View Full Code Here

      newWci = null;
    }
     
    WindowControlInfo prev = null;
    do {
      ExtendedControllerState state = curwcI.getExtendedControllerState();
      guiPath.addStateInfo(state);
      prev = curwcI;
    } while ((curwcI = curwcI.getParentWindowControlInfo()) != null);
    // the prev is now the windowcontrol with a null parent = the root
    // -> remember for later back-button handling/traversing
View Full Code Here

 
  private void adjustState(boolean back, WindowControlInfo curWCInfo, GUIPath guiPath, UserRequest ureq) {
    int ecnt = guiPath.getExtendedControllerStateCount();
    // traverse from the parent to the children and grandchildren
    for (int i = ecnt-1; i >= 0 && curWCInfo != null; i--) {
      ExtendedControllerState ecstate = guiPath.getExtendedControllerStateAt(i);
      curWCInfo.adjustControllerState(back, ecstate, ureq);
      if (i >= 1) { // for all but the leaf
        ExtendedControllerState extChildState = guiPath.getExtendedControllerStateAt(i-1);
        // changeing a controller's state means there are maybe child controllers disposed and others newly created
        curWCInfo = findMatchingChild(extChildState, curWCInfo);
        // can return null if no child is found (see comments for step 3 above)
        if (curWCInfo == null) return;
        // else found: proceed with this child and the next guiPath Entry
View Full Code Here

   
    int size = children.size();
    for (int i = 0; i < size; i++) {
      WindowControlInfo wciChild = children.get(i);
      if (!wciChild.isControllerDisposed()) {
        ExtendedControllerState estate = wciChild.getExtendedControllerState();
        if (estate.getControllerUniqueId() == contId) {
          // same instance is still there, we have the match
          return wciChild;
        } else {
          // test on matching classnames
          if (contClassName.equals(estate.getControllerClassName())) {
            // add to potentials
            classMatches.add(wciChild);
          }
        }
      }
View Full Code Here

  public boolean isDisposed() {
    return disposed;
  }
 
  protected ExtendedControllerState createdExtendedControllerState() {
    ExtendedControllerState ecs;
    if (newTransition) {
      newTransition = false;
      ecs = new ExtendedControllerStateImpl(previousState, state, System.identityHashCode(this), this.getClass().getName());
    } else {
      // no transition has taken place in the mean time: indicate a state-to-same-state-transition which means no transition.
View Full Code Here

TOP

Related Classes of org.olat.core.gui.control.state.ExtendedControllerState

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.