Package org.richfaces.model.selection

Examples of org.richfaces.model.selection.SimpleSelection


    final ScrollableDataTableRendererState state =
      ScrollableDataTableRendererState.createState(context, grid);
   
    state.setRowIndex(ScrollableDataTableUtils.getClientRowIndex(grid));
   
    final SimpleSelection simpleSelection = grid.getSelection() == null ? new SimpleSelection()
        : (SimpleSelection) grid.getSelection();

   
   
    if (clientSelection.isReset() || clientSelection.isSelectAll()) {
      simpleSelection.clear();
    }
   
    try {
      grid.walk(context,
          new DataVisitor() {
            public void process(FacesContext context, Object rowKey,
                Object argument) throws IOException {
           
              int i = state.getRowIndex();
             
              if (shouldAddToSelection(i, oldClientSelection, clientSelection)) {
               
                simpleSelection.addKey(rowKey);
             
              } else if (shouldRemoveFromSelection(i, oldClientSelection, clientSelection)){
               
                simpleSelection.removeKey(rowKey);
             
              }
             
              state.nextRow();
             
View Full Code Here


   
    state.setRowIndex(ScrollableDataTableUtils.getClientRowIndex(grid));
   
    final Selection gridSelection =
      grid.getSelection() == null ?
          new SimpleSelection() :
            grid.getSelection();
    final ClientSelection clientSelection = new ClientSelection();
   
    grid.walk(context,
      new DataVisitor() {
View Full Code Here

TOP

Related Classes of org.richfaces.model.selection.SimpleSelection

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.