Package org.ajax4jsf.model

Examples of org.ajax4jsf.model.DataVisitor


            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


     * .
     */
    @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

                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

    }
   
    FacesContext context = FacesContext.getCurrentInstance();
    try {
   
      originalModel.walk(context, new DataVisitor() {
        public void process(FacesContext context, Object rowKey,
            Object argument) throws IOException {
          originalModel.setRowKey(rowKey);
          if (originalModel.isRowAvailable()) {
            rowKeys.add(rowKey);
View Full Code Here

            if (clientSelection.isReset() || clientSelection.isSelectAll()) {
                simpleSelection.clear();
            }

            try {
                table.walk(context, new DataVisitor() {
                    public void process(FacesContext context, Object rowKey,
                            Object argument) throws IOException {

                        // TableHolder holder = (TableHolder) argument;
                        // int i = state.getRowIndex();
View Full Code Here

        final Selection gridSelection = table.getSelection() == null ? new SimpleSelection()
                : table.getSelection();
        final ClientSelection clientSelection = new ClientSelection();

        table.walk(context, new DataVisitor() {
            public void process(FacesContext context, Object rowKey,
                    Object argument) throws IOException {

                // TableHolder holder = (TableHolder) argument;
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

      if (clientSelection.isReset() || clientSelection.isSelectAll()) {
        simpleSelection.clear();
        simpleSelection.setSelectAll(clientSelection.isSelectAll());
      }
      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

          argument2.argument = argument;
          // setup current model
          argument2.model = model;
          argument2.range = range;
         
          scalarModel.walk(context, new DataVisitor() {

            public void process(FacesContext context,
                Object rowKey, Object argument)
                throws IOException {
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.