Examples of ClientSelection


Examples of org.richfaces.model.selection.ClientSelection

   
    final Selection gridSelection =
      grid.getSelection() == null ?
          new SimpleSelection() :
            grid.getSelection();
    final ClientSelection clientSelection = new ClientSelection();
   
    grid.walk(context,
      new DataVisitor() {
        public void process(FacesContext context, Object rowKey,
            Object argument) throws IOException {
       
          if (gridSelection.isSelected(rowKey)) {

            int i = state.getRowIndex();
           
            clientSelection.addIndex(i);
          }
         
         
          state.nextRow();
         
View Full Code Here

Examples of org.richfaces.model.selection.ClientSelection

   
    if (log.isDebugEnabled()) {
      log.debug("parsing " + stringSelection);
    }
   
    final ClientSelection clientSelection = new ClientSelection();
   
    String [] selections = stringSelection.split(";");
    int length = selections.length;
    if (selections[length-1].length() == 1) {
      clientSelection.setSelectionFlag(selections[length-1]);
      length--;
    }
    for (int i = 0; i < length; i++) {
     
      String range = selections[i];
     
      if (range.length() != 0) {
        String [] rng = range.split(",");
       
        try {
          int fi = Integer.parseInt(rng[0]);
          int il = Integer.parseInt(rng[1]);
         
          if (log.isDebugEnabled()) {
            log.debug("Parsed range " + fi + " " + il);
          }
         
          clientSelection.addRange(new SelectionRange(fi, il));
         
        } catch (NumberFormatException e) {
          throw new ConverterException(e);
        }
      }
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.