Package org.springframework.ide.eclipse.webflow.core.model

Examples of org.springframework.ide.eclipse.webflow.core.model.IViewState


      child.setElementParent(parent);
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.RENDER_ACTION
        && parent instanceof IRenderActions) {
      IRenderActions state = (IRenderActions) parent;
      IViewState viewState = (IViewState) state.getElementParent();
      if (viewState.getRenderActions() == null) {
        viewState.setRenderActions(state);
      }
      child.setElementParent(state);
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.ENTRY_ACTION
        && parent instanceof IEntryActions) {
      IEntryActions state = (IEntryActions) parent;
      IState viewState = (IState) state.getElementParent();
      if (viewState.getEntryActions() == null) {
        viewState.setEntryActions(state);
      }
      child.setElementParent(state);
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.EXIT_ACTION
        && parent instanceof IExitActions) {
      IExitActions state = (IExitActions) parent;
      IState viewState = (IState) state.getElementParent();
      if (viewState.getExitActions() == null) {
        viewState.setExitActions(state);
      }
      child.setElementParent(state);
    }
   
    if (parent instanceof IEntryActions) {
View Full Code Here


      else {
        ((IActionState) parent).addAction(child);
      }
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.RENDER_ACTION) {
      IViewState viewState = (IViewState) parent;
      if (viewState.getRenderActions() == null) {
        RenderActions exit = new RenderActions();
        exit.createNew(viewState);
        viewState.setRenderActions(exit);
      }
      child.setElementParent(viewState.getRenderActions());
      if (index > 0) {
        viewState.getRenderActions().addRenderAction(child, index);
      }
      else {
        viewState.getRenderActions().addRenderAction(child);
      }
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.ENTRY_ACTION) {
      if (parent.getEntryActions() == null) {
        EntryActions entry = new EntryActions();
View Full Code Here

  public void undo() {
    if (child.getType() == IActionElement.ACTION_TYPE.ACTION) {
      ((IActionState) parent).removeAction(child);
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.RENDER_ACTION) {
      IViewState viewState = (IViewState) child;
      viewState.getRenderActions().removeRenderAction(child);
      if (viewState.getRenderActions().getRenderActions().size() == 0) {
        viewState.setRenderActions(null);
      }
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.ENTRY_ACTION) {
      parent.getEntryActions().removeEntryAction(child);
      if (parent.getEntryActions().getEntryActions().size() == 0) {
View Full Code Here

        && parent instanceof IActionState) {
      child.setElementParent(parent);
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.RENDER_ACTION
        && parent instanceof IViewState) {
      IViewState state = (IViewState) parent;
      if (state.getRenderActions() == null) {
        RenderActions entry = new RenderActions();
        entry.createNew(state);
        state.setRenderActions(entry);
      }
      child.setElementParent(state.getRenderActions());
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.ENTRY_ACTION
        && parent instanceof IState) {
      IState state = (IState) parent;
      if (state.getEntryActions() == null) {
        EntryActions entry = new EntryActions();
        entry.createNew(state);
        state.setEntryActions(entry);
      }
      child.setElementParent(state.getEntryActions());
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.EXIT_ACTION
        && parent instanceof IState) {
      IState state = (IState) parent;
      if (state.getExitActions() == null) {
        ExitActions entry = new ExitActions();
        entry.createNew(state);
        state.setExitActions(entry);
      }
      child.setElementParent(state.getExitActions());
    }

    if (child.getElementParent() instanceof IEntryActions) {
      ((IEntryActions) child.getElementParent()).addEntryAction(child);
    }
View Full Code Here

        && newState instanceof IActionState) {
      child.setElementParent(newState);
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.RENDER_ACTION
        && newState instanceof IViewState) {
      IViewState state = (IViewState) newState;
      if (state.getRenderActions() == null) {
        RenderActions entry = new RenderActions();
        entry.createNew(state);
        state.setRenderActions(entry);
      }
      child.setElementParent(state.getRenderActions());
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.ENTRY_ACTION
        && newState instanceof IState) {
      IState state = (IState) newState;
      if (state.getEntryActions() == null) {
        EntryActions entry = new EntryActions();
        entry.createNew(state);
        state.setEntryActions(entry);
      }
      child.setElementParent(state.getEntryActions());
    }
    else if (child.getType() == IActionElement.ACTION_TYPE.EXIT_ACTION
        && newState instanceof IState) {
      IState state = (IState) newState;
      if (state.getExitActions() == null) {
        ExitActions entry = new ExitActions();
        entry.createNew(state);
        state.setExitActions(entry);
      }
      child.setElementParent(state.getExitActions());
    }

    if (child.getElementParent() instanceof IEntryActions) {
      ((IEntryActions) child.getElementParent()).addEntryAction(child);
    }
View Full Code Here

    else {
      buf.append(super.getText(element));
    }
    if (showAdditionalInfo) {
      if (element instanceof IViewState) {
        IViewState state = (IViewState) element;
        if (state.getView() != null) {
          buf.append("\nView: " + state.getView());
        }
      }
      if (element instanceof ISubflowState) {
        ISubflowState state = (ISubflowState) element;
        if (WebflowModelXmlUtils.isVersion1Flow(state)) {
          if (state.getFlow() != null) {
            buf.append("\nFlow: " + state.getFlow());
          }
        }
        else {
          if (state.getFlow() != null) {
            buf.append("\nSubflow: " + state.getFlow());
          }
        }
      }
      if (element instanceof IEndState) {
        IEndState state = (IEndState) element;
        if (state.getView() != null) {
          buf.append("\nView: " + state.getView());
        }
      }
      if (element instanceof IStateTransition) {
        IStateTransition state = (IStateTransition) element;
        if (state.getOnException() != null) {
          buf.append("\nOn-exception: " + state.getOnException());
        }
      }
    }

    if (showElementType) {
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.webflow.core.model.IViewState

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.