Package org.apache.myfaces.tobago.model

Examples of org.apache.myfaces.tobago.model.TreePath


    getTemplateComponent().buildTreeModelBegin(facesContext, model);

    int index = 0;
    for (Node sub : node.getChildren()) {
      buildTreeModelNodes(facesContext, model, sub, new TreePath(position, index));
      index++;
    }

    getTemplateComponent().buildTreeModelEnd(facesContext, model);
View Full Code Here


    getTemplateComponent().buildTreeModelBegin(facesContext, model);

    int index = 0;
    for (Enumeration e = node.children(); e.hasMoreElements();) {
      DefaultMutableTreeNode sub = (DefaultMutableTreeNode) e.nextElement();
      buildTreeModelNodes(facesContext, model, sub, new TreePath(position, index));
      index++;
    }

    getTemplateComponent().buildTreeModelEnd(facesContext, model);
View Full Code Here

  public void encodeChildren(FacesContext context) throws IOException {
  }

  @Override
  public void encodeEnd(FacesContext facesContext) throws IOException {
    encodeNodes(facesContext, (DefaultMutableTreeNode) getValue(), new TreePath(0));
    super.encodeEnd(facesContext);
  }
View Full Code Here

    setRowIndex(facesContext, null);

    int index = 0;
    for (Enumeration e = node.children(); e.hasMoreElements();) {
      DefaultMutableTreeNode sub = (DefaultMutableTreeNode) e.nextElement();
      encodeNodes(facesContext, sub, new TreePath(position, index));
      index++;
    }

    setRowIndex(facesContext, position);
    LOG.debug("path index (end)    = '" + position + "'");
View Full Code Here

  @Override
  public void broadcast(FacesEvent event) throws AbortProcessingException {
    if (event instanceof FacesEventWrapper) {
      FacesContext facesContext = FacesContext.getCurrentInstance();
      FacesEvent originalEvent = ((FacesEventWrapper) event).getWrappedFacesEvent();
      TreePath eventPathIndex = ((FacesEventWrapper) event).getRowIndex();
      TreePath currentPathIndex = getRowIndex();
      setRowIndex(facesContext, eventPathIndex);
      try {
        originalEvent.getComponent().broadcast(originalEvent);
      } finally {
        setRowIndex(facesContext, currentPathIndex);
View Full Code Here

      if (!data.isRowAvailable()) {
        break;
      }

//        final Object rowData = data.getRowData();
      final TreePath path = data.getPath();

      // marked
      if (isTree) {
        final MarkedState markedState = ((AbstractUITree) data).getMarkedState();
        final boolean oldMarked = markedState.isMarked(path);
View Full Code Here

  public void setFolder(boolean folder) {
    Deprecation.LOG.error("Doesn't work anymore.");
  }

  public TreePath getPath() {
    return new TreePath(getRowData());
  }
View Full Code Here

  private Map<TreePath, Object> pathStates = new HashMap<TreePath, Object>();

  @Override
  public void processDecodes(FacesContext facesContext) {

    decodeNodes(facesContext, (DefaultMutableTreeNode) getValue(), new TreePath(0));
  }
View Full Code Here

    }

    int index = 0;
    for (Enumeration e = node.children(); e.hasMoreElements();) {
      DefaultMutableTreeNode sub = (DefaultMutableTreeNode) e.nextElement();
      decodeNodes(facesContext, sub, new TreePath(position, index));
      index++;
    }
  }
View Full Code Here

  }

  @Override
  public void processValidators(FacesContext facesContext) {
    validateNodes(facesContext, (DefaultMutableTreeNode) getValue(), new TreePath(0));
  }
View Full Code Here

TOP

Related Classes of org.apache.myfaces.tobago.model.TreePath

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.