Package org.richfaces.json

Examples of org.richfaces.json.JSONMap


      addOption("acceptedTypes", acceptedTypes);

      Object typeMapping = zone.getTypeMapping();
      if(typeMapping instanceof String) {
        try {
          typeMapping = new JSONMap((String)typeMapping);
        } catch (JSONException e) {
          throw new FacesException(e);
        }
      }
      addOption("typeMapping", typeMapping);
View Full Code Here


      addOption("acceptedTypes", acceptedTypes);

      Object typeMapping = zone.getTypeMapping();
      if(typeMapping instanceof String) {
        try {
          typeMapping = new JSONMap((String)typeMapping);
        } catch (JSONException e) {
          throw new FacesException(e);
        }
      }
      addOption("typeMapping", typeMapping);
View Full Code Here

        columnsFilterState = new ColumnsFilter(extendedDataTable);
        columnsSortState = new ColumnsSort(extendedDataTable);
    }

    public ExtendedDataTableState(String tableState) {
        JSONMap json = null;
        if ((tableState != null) && (tableState.length() > 0)) {
            try {
                json = new JSONMap(tableState);
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
        if (json != null) {
            columnsWidthState = new ColumnsWidth((JSONMap) json.get("columnsWidthState"));
            columnsOrderState = new ColumnsOrder((JSONCollection) json.get("columnsOrderState"));
            columnsFilterState = new ColumnsFilter((JSONMap) json.get("columnsFilterState"));
            columnsSortState = new ColumnsSort((JSONMap) json.get("columnsSortState"));
        }
    }
View Full Code Here

     * Get state in JSON format.
     *
     * @return JSON object contains state
     */
    public JSONMap toJSON() {
        return new JSONMap(json);
    }
View Full Code Here

            String s = (String) value;
            if (!s.startsWith("{")) {
                s = "{" + s + "}";
            }
            try {
                return new HashMap<String, Object>(new JSONMap(s));
            } catch (JSONException e) {
                throw new FacesException(e);
            }
        } else {
            throw new FacesException("Attribute visualOptions of component ["
View Full Code Here

      String s = (String) value;
      if (!s.startsWith("{")) {
        s = "{" + s + "}";
      }
      try {
        return new HashMap<String, Object>(new JSONMap(s));
      } catch (JSONException e) {
        throw new FacesException(e);
      }
    } else {
      throw new FacesException("Attribute visualOptions of component [" +
View Full Code Here

TOP

Related Classes of org.richfaces.json.JSONMap

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.