UIForm form= RendererUtils.getInstance().getNestingForm(context, component);
//TODO nick -> nick - switchType checking can be harmful here
String switchType = (String) component.getAttributes().get("switchType");
boolean isSwitchTypeClient = switchType == null ? false : switchType.equalsIgnoreCase("client") ;
if (form == null && !isSwitchTypeClient){
throw new EnclosingFormRequiredException(component.getClass().toString()+" (id=\"" + component.getId() + "\") did not find parent form.");
}
}