Examples of RowKeySet


Examples of org.apache.myfaces.trinidad.model.RowKeySet

    // We'll just replace colons with underscores;  not perfect, but adequate
    final String varName = "_adftree" + XhtmlUtils.getJSIdentifier(id);

    boolean leftToRight = !rc.isRightToLeft();
    int rootSize = tree.getRowCount();
    RowKeySet state = getExpandedRowKeys(tree);
    Map<Object, Boolean> selectedPaths = getSelectedPaths(focusPath);

    // render each of the root nodes
    for (int i = 0; i < rootSize; i++)
    {
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.RowKeySet

  {
   
    TreeModel model = ModelUtils.toTreeModel(value);
    model.setRowKey(null);

    RowKeySet selectedRowKeys = getSelectedRowKeys();

    if (selectedRowKeys == null)
    {
      selectedRowKeys = new RowKeySetTreeImpl();
      setSelectedRowKeys(selectedRowKeys);
    }

    RowKeySet disclosedRowKeys = getDisclosedRowKeys();

    if (disclosedRowKeys == null)
    {
      disclosedRowKeys = new RowKeySetTreeImpl();
      setDisclosedRowKeys(disclosedRowKeys);
    }

    selectedRowKeys.setCollectionModel(model);
    disclosedRowKeys.setCollectionModel(model);

    return model;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.RowKeySet

          setRowIndex(0);
          rowKey = getRowKey();
        }

        setRowKey(rowKey);
        RowKeySet old = getDisclosedRowKeys();
        RowKeySet newset = old.clone();
        newset.addAll();

        // use an event to ensure the row disclosure listener is called
        broadcast(new RowDisclosureEvent(old, newset, this));
      }
      finally
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.RowKeySet

  @Override
  @SuppressWarnings("unchecked")
  public CollectionModel createCollectionModel(CollectionModel current, Object value)
  {
    TreeModel model = (TreeModel)super.createCollectionModel(current, value);   
    RowKeySet treeState = getDisclosedRowKeys();
    treeState.setCollectionModel(model);   
    return model;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.RowKeySet

  @SuppressWarnings("unchecked")
  public void performReport(ActionEvent action)
  {
    UIXCollection table = (UIXCollection) _table;
    final RowKeySet state;
    if (table instanceof UIXTable)
      state = ((UIXTable) table).getSelectedRowKeys();
    else
      state = ((UIXTree) table).getSelectedRowKeys();
    Iterator<Object> selection = state.iterator();
    Object oldKey = table.getRowKey();
    _selection = new ArrayList<Object>();
    while (selection.hasNext())
    {
      table.setRowKey(selection.next());
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.RowKeySet

    }

    @Override
    public Object saveState(FacesContext context)
    {
      RowKeySet rowKeys = (RowKeySet)super.getProperty(DISCLOSED_ROW_KEYS_KEY);
      if (rowKeys != null)
      {
        // make sure the set does not pin the model in memory
        rowKeys.setCollectionModel(null);
      }
      rowKeys = (RowKeySet)super.getProperty(SELECTED_ROW_KEYS_KEY);
      if (rowKeys != null)
      {
        // make sure the set does not pin the model in memory
        rowKeys.setCollectionModel(null);
      }
      return super.saveState(context);
    }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.RowKeySet

  @Override
  @SuppressWarnings("unchecked")
  public CollectionModel createCollectionModel(CollectionModel current, Object value)
  {
    TreeModel model = (TreeModel)super.createCollectionModel(current, value);
    RowKeySet treeState = getDisclosedRowKeys();
    treeState.setCollectionModel(model);
    return model;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.RowKeySet

  {
    Object oldRowKey = getRowKey();

    // if we are only visiting rendered stamps, then pass in the disclosed row keys, otherwise
    // pass in null, indicating that all row keys should be visited
    RowKeySet disclosedRowKeys = (visitContext.getHints().contains(VisitHint.SKIP_UNRENDERED))
                                   ? getDisclosedRowKeys()
                                   : null;

    boolean done;
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.RowKeySet

        // is not asked for which would create an infinite loop
        _retrievingDisclosedRows = true;

        try
        {
          RowKeySet rowKeys = (RowKeySet) value;
          // row key sets need the most recent collection model, but there is no one common entry
          // point to set this on the set besides when code asks for the value from the bean
          rowKeys.setCollectionModel(getCollectionModel());
        }
        finally
        {
          _retrievingDisclosedRows = false;
        }
View Full Code Here

Examples of org.apache.myfaces.trinidad.model.RowKeySet

    }

    @Override
    public Object saveState(FacesContext context)
    {
      RowKeySet rowKeys = (RowKeySet)super.getProperty(DISCLOSED_ROW_KEYS_KEY);
      if (rowKeys != null)
      {
        // make sure the set does not pin the model in memory
        rowKeys.setCollectionModel(null);
      }
      return super.saveState(context);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.