code: public void addJSFAttrbituteToAngularModel(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(key, new HashMap<String, Object>());
  			}
  			currentMap = (Map<String, Object>) currentMap.get(keys[i]);
  		}
  		String v = null;
  		if (value != null) {
  			Gson gs = new Gson();
  			v = gs.toJson(value);
  		}
  		currentMap.put(keys[keys.length - 1], value);
  	}
docs: Builds basically a JSON structure from the JSF model.