Esempio n. 1
0
  private Component getCFC(
      PageContext pc, String requestURI, String cfcPath, String id, boolean peristent)
      throws PageException {
    Component cfc;
    if (peristent) {
      cfc = (Component) cfcs.get(requestURI + id);
      if (cfc != null) return cfc;
    }
    ConfigImpl config = (ConfigImpl) pc.getConfig();
    Mapping m =
        new MappingImpl(
            (ConfigImpl) pc.getConfig(),
            "/",
            getCFCDirectory().getAbsolutePath(),
            null,
            false,
            true,
            false,
            false,
            false);

    PageSource ps = m.getPageSource(requestURI);
    Page p = ((PageSourceImpl) ps).loadPage(pc, (ConfigWeb) config);
    cfc = ComponentLoader.loadComponentImpl(pc, p, ps, cfcPath, false, true);
    if (peristent) cfcs.put(requestURI + id, cfc);
    return cfc;
  }