Package javax.faces.model

Examples of javax.faces.model.ArrayDataModel


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


        } else if (current instanceof DataModel) {
            setDataModel((DataModel) current);
        } else if (current instanceof List) {
            setDataModel(new ListDataModel((List) current));
        } else if (Object[].class.isAssignableFrom(current.getClass())) {
            setDataModel(new ArrayDataModel((Object[]) current));
        } else if (current instanceof ResultSet) {
            setDataModel(new ResultSetDataModel((ResultSet) current));
        } else if (current instanceof Result) {
            setDataModel(new ResultDataModel((Result) current));
        } else {
View Full Code Here

        if (value == null) {
            dataModel = new ListDataModel(Collections.EMPTY_LIST);
        } else if (value instanceof List) {
          dataModel = new ListDataModel((List) value);
        } else if (Object[].class.isAssignableFrom(value.getClass())) {
          dataModel = new ArrayDataModel((Object[]) value);
        } else {
          throw new IllegalArgumentException();
        }
       
        return dataModel;
View Full Code Here

        {
            return new ListDataModel(new ArrayList((Collection) value));
        }
        else if (OBJECT_ARRAY_CLASS.isAssignableFrom(value.getClass()))
        {
            return new ArrayDataModel((Object[]) value);
        }
        else if (value instanceof ResultSet)
        {
            return new ResultSetDataModel((ResultSet) value);
        }
View Full Code Here

        } else if (value instanceof List) {
            return new ListDataModel((List) value);
        } else if (value instanceof Collection) {
            return new ListDataModel(new ArrayList((Collection) value));
        } else if (OBJECT_ARRAY_CLASS.isAssignableFrom(value.getClass())) {
            return new ArrayDataModel((Object[]) value);
        } else if (value instanceof ResultSet) {
            return new ResultSetDataModel((ResultSet) value);
        } else if (value instanceof Result) {
            return new ResultDataModel((Result) value);
        } else {
View Full Code Here

        } else if (current instanceof DataModel) {
            setDataModel((DataModel) current);
        } else if (current instanceof List) {
            setDataModel(new ListDataModel((List) current));
        } else if (Object[].class.isAssignableFrom(current.getClass())) {
            setDataModel(new ArrayDataModel((Object[]) current));
        } else if (current instanceof ResultSet) {
            setDataModel(new ResultSetDataModel((ResultSet) current));
        } else if (current instanceof Result) {
            setDataModel(new ResultDataModel((Result) current));
        } else {
View Full Code Here

        }

        DataModel result;

        if (itemsObject instanceof Object[]) {
            result = new ArrayDataModel((Object[]) itemsObject);
        } else if (itemsObject instanceof List) {
            result = new ListDataModel((List<Object>) itemsObject);
        } else if (itemsObject instanceof Result) {
            result = new ResultDataModel((Result) itemsObject);
        } else if (itemsObject instanceof ResultSet) {
View Full Code Here

        } else if (value instanceof DataModel) {
            model = (DataModel) value;
        } else if (value instanceof List) {
            model = new ListDataModel((List) value);
        } else if (Object[].class.isAssignableFrom(value.getClass())) {
            model = new ArrayDataModel((Object[]) value);
        } else if (value instanceof ResultSet) {
            model = new ResultSetDataModel((ResultSet) value);
        } else if (value instanceof Result) {
            model = new ResultDataModel((Result) value);
        } else {
View Full Code Here

        if (value == null) {
            dataModel = new ListDataModel(Collections.EMPTY_LIST);
        } else if (value instanceof List) {
          dataModel = new ListDataModel((List) value);
        } else if (Object[].class.isAssignableFrom(value.getClass())) {
          dataModel = new ArrayDataModel((Object[]) value);
        } else {
          throw new IllegalArgumentException();
        }
       
        return dataModel;
View Full Code Here

        } else if (current instanceof DataModel) {
            setDataModel((DataModel) current);
        } else if (current instanceof List) {
            setDataModel(new ListDataModel((List) current));
        } else if (Object[].class.isAssignableFrom(current.getClass())) {
            setDataModel(new ArrayDataModel((Object[]) current));
        } else if (current instanceof ResultSet) {
            setDataModel(new ResultSetDataModel((ResultSet) current));
        } else if (current instanceof Result) {
            setDataModel(new ResultDataModel((Result) current));
        } else {
View Full Code Here

TOP

Related Classes of javax.faces.model.ArrayDataModel

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.