Package org.ajax4jsf.model

Examples of org.ajax4jsf.model.SequenceRange


                if (originalModel.isRowAvailable()) {
                    rowKeys.add(rowKey);
                }
                return DataVisitResult.CONTINUE;
            }
        }, new SequenceRange(0, -1), null);
        originalModel.setRowKey(rowKey);
    }
View Full Code Here


            if (oldClientFirst == null) {
                oldClientFirst = clientFirst;
            }
            int clientRows = ((SequenceRange) table.getComponentState().getRange()).getRows();
            int difference = clientFirst - oldClientFirst;
            SequenceRange addRange = null;
            SequenceRange removeRange = null;
            if (Math.abs(difference) >= clientRows) {
                difference = 0;
                addRange = new SequenceRange(clientFirst, clientRows);
                removeRange = new SequenceRange(oldClientFirst, clientRows);
            } else if (difference < 0) {
                clientFirst += table.getFirst();
                addRange = new SequenceRange(clientFirst, -difference);
                removeRange = new SequenceRange(clientFirst + clientRows, -difference);
            } else if (difference > 0) {
                oldClientFirst += table.getFirst();
                removeRange = new SequenceRange(oldClientFirst, difference);
                int last = oldClientFirst + clientRows;
                addRange = new SequenceRange(last, difference);
            }
            if (addRange != null) {
                Object key = table.getRowKey();
                table.captureOrigValue(context);
                table.setRowKey(context, null);
View Full Code Here

                Integer begin = null;
                Integer end = null;

                Range range = getComponentState().getRange();
                if (range instanceof SequenceRange) {
                    SequenceRange sequenceRange = (SequenceRange) range;

                    begin = sequenceRange.getFirstRow();
                    int iRows = sequenceRange.getRows();

                    if (iRows > 0) {
                        // end is zero-based
                        end = begin + iRows - 1;
                    }
View Full Code Here

    this.currentId = key;
  }

  protected Page toPage(final Range range) {
    if (range instanceof SequenceRange) {
      SequenceRange sequenceRange = (SequenceRange) range;
      if ((sequenceRange.getFirstRow() >= 0) && (sequenceRange.getRows() >= 0)) {
        int div = sequenceRange.getFirstRow() / sequenceRange.getRows();

        div++;

        Page page = new PageImpl(div, sequenceRange.getRows());
        return page;
      }

    }
    return null;
View Full Code Here

TOP

Related Classes of org.ajax4jsf.model.SequenceRange

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.