Package org.apache.myfaces.tobago.model

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


    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

    }
  }

  public boolean invokeOnComponent(FacesContext facesContext, String clientId, ContextCallback callback)
      throws FacesException {
    TreePath oldRowIndex = getRowIndex();
    try {
      String sheetId = getClientId(facesContext);
      if (clientId.startsWith(sheetId)) {
        String idRemainder = clientId.substring(sheetId.length());
        if (LOG.isDebugEnabled()) {
          LOG.debug("idRemainder = '" + idRemainder + "'");
        }
        if (idRemainder.matches("^:(_\\d+)+:.*")) {
          idRemainder = idRemainder.substring(1);
          int idx = idRemainder.indexOf(":");
          try {
            TreePath rowIndex = new TreePath(idRemainder.substring(0, idx));
            if (LOG.isDebugEnabled()) {
              LOG.debug("set rowIndex = '" + rowIndex + "'");
            }
            setRowIndex(facesContext, rowIndex);
          } catch (NumberFormatException e) {
View Full Code Here

    }
  }

  protected String gotoNode(Node node) {
    currentNode = node;
    state.getExpandedState().expand(new TreePath(node));
    LOG.info("Navigate to '" + currentNode.getOutcome() + "'");
    return currentNode.getOutcome();
  }
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.