code: protected BaseUIComponent createFromTemplate(String template, BaseComponent parent, Object controller) {
          if (StringUtils.isEmpty(template)) {
              template = getTemplateUrl();
          } else if (!template.startsWith("web/")) {
              template = CWFUtil.getResourcePath(getClass()) + template;
          }
          
          BaseUIComponent top = null;
          
          try {
              top = (BaseUIComponent) PageUtil.createPage(template, parent).get(0);
              top.wireController(controller);
          } catch (Exception e) {
              CWFException.raise("Error creating element from template.", e);
          }
          
          return top;
      }
docs: Create wrapped component(s) from specified template (a cwf page).
  
  @param template URL of cwf page that will serve as a template. If the URL is not specified,
  the template name is obtained from getTemplateUrl.
  @param parent The component that will become the parent.
  @param controller If specified, events and variables are autowired to the controller.
  @return Top level component.