code: public void addJSFAttrbituteToAngularModel(Map<String, Object> model, String key, Object value) {
  		String[] keys = key.split("\\.");
  		Map<String, Object> currentMap = model;
  		for (int i = 0; i < keys.length - 1; i++) {
  			if (!currentMap.containsKey(keys[i])) {
  				currentMap.put(keys[i], new HashMap<String, Object>());
  			}
  			currentMap = (Map<String, Object>) currentMap.get(keys[i]);
  		}
  		Object v = null;
  		if (value != null) {
  			Class<? extends Object> type = value.getClass();
  			if (type == int.class || type == long.class || type == float.class || type == double.class || type == byte.class
  					|| type == short.class || Number.class.isAssignableFrom(type)) {
  				v = value;
  			} else
  				v = value.toString();
  		}
  		currentMap.put(keys[keys.length - 1], v);
  	}
docs: Builds basically a JSON structure from the JSF model.