Package org.ajax4jsf.model

Examples of org.ajax4jsf.model.SequenceDataModel


        Object value = getValue();

        if (value instanceof ExtendedDataModel<?>) {
            model = (ExtendedDataModel<?>) value;
        } else {
            model = new SequenceDataModel(createFacesModel(value));
        }

        return model;
    }
View Full Code Here


      OrderingListDataModel dataModel = new OrderingListDataModel();
      dataModel.setWrappedData(modelMap);
      return dataModel;
    } else {
      DataModel dataModel = createDataModel(getValue());
      return new SequenceDataModel(dataModel);
    }
  }
View Full Code Here

      OrderingListDataModel dataModel = new OrderingListDataModel();
      dataModel.setWrappedData(modelMap);
      return dataModel;
    } else {
      DataModel dataModel = createDataModel(getValue());
      return new SequenceDataModel(dataModel);
    }
  }
View Full Code Here

      // Synthesize a DataModel around our current value if possible
    // TODO - for jsf 1.2 use method from superclass ?
      Object current = getValue();
      DataModel model;
      if (current == null) {
          model = new SequenceDataModel(new ListDataModel(Collections.EMPTY_LIST));
      } else if (current instanceof ExtendedDataModel) {
          model = (DataModel) current;
      } else if (current instanceof DataModel) {
          model = new SequenceDataModel((DataModel) current);
      } else if (current instanceof List) {
          model = new SequenceDataModel(new ListDataModel((List) current));
      } else if (Object[].class.isAssignableFrom(current.getClass())) {
          model = new SequenceDataModel(new ArrayDataModel((Object[]) current));
      } else if (current instanceof ResultSet) {
          model = new SequenceDataModel(new ResultSetDataModel((ResultSet) current));
      } else if (current instanceof Result) {
          model = new SequenceDataModel(new ResultDataModel((Result) current));
      } else {
          model = new SequenceDataModel(new ScalarDataModel(current));
      }
  return (model);
  }
View Full Code Here

    if( null == model){
      iterableModel = null;
    } else if (model instanceof ExtendedDataModel) {
      iterableModel = (ExtendedDataModel) model;     
    } else {
      iterableModel = new SequenceDataModel(model);
    }
    setExtendedDataModel(iterableModel);
  }
View Full Code Here

      // Synthesize a DataModel around our current value if possible
    // TODO - for jsf 1.2 use method from superclass ?
      Object current = getValue();
      DataModel model;
      if (current == null) {
          model = new SequenceDataModel(new ListDataModel(Collections.EMPTY_LIST));
      } else if (current instanceof ExtendedDataModel) {
          model = (DataModel) current;
      } else if (current instanceof DataModel) {
          model = new SequenceDataModel((DataModel) current);
      } else if (current instanceof List) {
          model = new SequenceDataModel(new ListDataModel((List<?>) current));
      } else if (Object[].class.isAssignableFrom(current.getClass())) {
          model = new SequenceDataModel(new ArrayDataModel((Object[]) current));
      } else if (current instanceof ResultSet) {
          model = new SequenceDataModel(new ResultSetDataModel((ResultSet) current));
      } else if (current instanceof Result) {
          model = new SequenceDataModel(new ResultDataModel((Result) current));
      } else {
          model = new SequenceDataModel(new ScalarDataModel(current));
      }
  return (model);
  }
View Full Code Here

    if( null == model){
      iterableModel = null;
    } else if (model instanceof ExtendedDataModel) {
      iterableModel = (ExtendedDataModel) model;     
    } else {
      iterableModel = new SequenceDataModel(model);
    }
    setExtendedDataModel(iterableModel);
  }
View Full Code Here

   
    if (data instanceof Map) {
      this.data = (Map<Object, Object>) data;
    } else {
      DataModel[] models = (DataModel[]) data;
      this.sourceModel = new SequenceDataModel(models[0]);
      this.targetModel = new SequenceDataModel(models[1]);
    }
  }
View Full Code Here

      // Synthesize a DataModel around our current value if possible
    // TODO - for jsf 1.2 use method from superclass ?
      Object current = getValue();
      DataModel model;
      if (current == null) {
          model = new SequenceDataModel(new ListDataModel(Collections.EMPTY_LIST));
      } else if (current instanceof ExtendedDataModel) {
          model = (DataModel) current;
      } else if (current instanceof DataModel) {
          model = new SequenceDataModel((DataModel) current);
      } else if (current instanceof List) {
          model = new SequenceDataModel(new ListDataModel((List<?>) current));
      } else if (Object[].class.isAssignableFrom(current.getClass())) {
          model = new SequenceDataModel(new ArrayDataModel((Object[]) current));
      } else if (current instanceof ResultSet) {
          model = new SequenceDataModel(new ResultSetDataModel((ResultSet) current));
      } else if (current instanceof Result) {
          model = new SequenceDataModel(new ResultDataModel((Result) current));
      } else {
          model = new SequenceDataModel(new ScalarDataModel(current));
      }
  return (model);
  }
View Full Code Here

    if( null == model){
      iterableModel = null;
    } else if (model instanceof ExtendedDataModel) {
      iterableModel = (ExtendedDataModel) model;     
    } else {
      iterableModel = new SequenceDataModel(model);
    }
    setExtendedDataModel(iterableModel);
  }
View Full Code Here

TOP

Related Classes of org.ajax4jsf.model.SequenceDataModel

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.