if (pController.hasSimpleContent()) {
return new SimpleContentBeanSG(pController, pJs);
} else {
ComplexContentSG ccSG = pController.getComplexContentSG();
if (ccSG.isEmpty()) {
return new EmptyElementBeanSG(pController, pJs);
} else {
GroupSG group = ccSG.getGroupSG();
if (group.isAll()) {
return new AllBeanSG(pController, pJs);
} else if (group.isChoice()) {