Package org.ajax4jsf.model

Examples of org.ajax4jsf.model.DataVisitor


      simpleSelection.clear();
    }
   
    try {
      grid.walk(context,
          new DataVisitor() {
            public void process(FacesContext context, Object rowKey,
                Object argument) throws IOException {
           
              int i = state.getRowIndex();
             
View Full Code Here


          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)) {
View Full Code Here

        final ArrayList list = new ArrayList(getRowCount());
       
        Object key = getRowKey();
        captureOrigValue(context);
       
        walk(context, new DataVisitor() {
          public void process(FacesContext context, Object rowKey,
              Object argument) throws IOException {

            setRowKey(context, rowKey);
            list.add(getRowData());
View Full Code Here

     * .
     */
    @Test
    public final void testWalkFacesContextDataVisitorRangeObject() {
        final StringBuilder builder = new StringBuilder(5);
        table.walk(facesContext, new DataVisitor() {
            public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
                table.setRowKey(rowKey);
                builder.append(table.getRowData());
                return DataVisitResult.CONTINUE;
            }
View Full Code Here

     * .
     */
    @Test
    public void testWalk() {
        final List<Object> rowKeys = new ArrayList<Object>();
        DataVisitor visitor = new DataVisitor() {
            public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
                arrangeableModel.setRowKey(rowKey);
                if (arrangeableModel.isRowAvailable()) {
                    rowKeys.add(rowKey);
                }
View Full Code Here

                }
            }
            if (clientSelection.isCleanShiftIndex()) {
                attributes.remove("shiftRowKey");
            }
            table.walk(context, new DataVisitor() {
                public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
                    int index = clientSelection.nextIndex();
                    if (clientSelection.isSelected(index)) {
                        rowKeys.add(rowKey);
                    } else {
View Full Code Here

        }
        table.setRowKey(context, key);
        table.restoreOrigValue(context);
        if (newRange != null) {
            final Collection<Object> rowKeys = table.getSelection();
            table.walk(context, new DataVisitor() {
                public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
                    rowKeys.add(rowKey);
                    return DataVisitResult.CONTINUE;
                }
            }, newRange, null);
View Full Code Here

    }

    public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
        final UIRepeat repeater = (UIRepeat) component;
        try {
            DataVisitor visitor = new DataVisitor() {
                public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
                    repeater.setRowKey(context, rowKey);

                    if (repeater.isRowAvailable()) {
                        if (repeater.getChildCount() > 0) {
View Full Code Here

            rowKeys = new ArrayList<Object>(rowCount);
        } else {
            rowKeys = new ArrayList<Object>();
        }
        Object rowKey = originalModel.getRowKey();
        originalModel.walk(context, new DataVisitor() {
            public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
                originalModel.setRowKey(rowKey);
                if (originalModel.isRowAvailable()) {
                    rowKeys.add(rowKey);
                }
View Full Code Here

                String clientId = table.getClientId(context);
                // TODO 1. Encode fixed children
                for (state.startIterate(); state.hasNextPart();) {
                    String partId = state.nextPart().getName().getId();
                    final List<String> ids = new LinkedList<String>();
                    table.walk(context, new DataVisitor() {
                        public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
                            UIDataTableBase dataTable = state.getRow();
                            dataTable.setRowKey(context, rowKey);
                            ids.add(dataTable.getContainerClientId(context) + ":" + state.getPart().getName().getId());
                            return DataVisitResult.CONTINUE;
                        }
                    }, removeRange, null);
                    table.walk(context, new DataVisitor() {
                        public DataVisitResult process(FacesContext context, Object rowKey, Object argument) {
                            UIDataTableBase dataTable = state.getRow();
                            dataTable.setRowKey(context, rowKey);
                            HashMap<String, String> attributes = new HashMap<String, String>(1);
                            String id = dataTable.getContainerClientId(context) + ":" + state.getPart().getName().getId();
View Full Code Here

TOP

Related Classes of org.ajax4jsf.model.DataVisitor

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.