public void addViewState(View view, String resourceGroup, String stateId) {
		ViewState state;
		if (resourceGroup == null) {
			state = new ViewState(this.core, view);
		} else {
			state = new ViewState(this.core, view, new CogaenId("resourceGroup"));
		}
		addState(state, new CogaenId(stateId));
	}