/** * Loads a set of <code>{@link org.opencms.xml.I_CmsXmlDocument}</code>, same as * using the <code><cms:contentload collector="***" param="***" locale="***" editable="***" /></code> tag.<p> * * @param collectorName the collector name to use * @param collectorParam the parameters for the collector * @param locale the locale to use to access the content * @param editable indicates if "direct edit" support is required (will insert additional HTML) * * @return an XML content container loaded with the selected content * * @throws JspException in case something goes wrong */ public I_CmsXmlContentContainer contentload( String collectorName, String collectorParam, Locale locale, boolean editable) throws JspException { return new CmsJspTagContentLoad(null, getJspContext(), collectorName, collectorParam, locale, editable); }
/** * @see javax.servlet.jsp.tagext.Tag#doStartTag() */ @Override public int doStartTag() throws JspException, CmsIllegalArgumentException { // get a reference to the parent "content container" class (if available) Tag ancestor = findAncestorWithClass(this, I_CmsXmlContentContainer.class); I_CmsXmlContentContainer container = null; if (ancestor != null) { // parent content container available, use preloaded values from this container container = (I_CmsXmlContentContainer)ancestor; // check if container really is a preloader if (!container.isPreloader()) { // don't use ancestor if not a preloader container = null; } } // initialize the content load tag init(container); hasMoreResources(); return isScopeVarSet() ? SKIP_BODY : EVAL_BODY_INCLUDE; }
/** * Returns <code>"true"</code> if this content load tag should only preload the values from the collector.<p> * * @return <code>"true"</code> if this content load tag should only preload the values from the collector */ public String getPreload() { return String.valueOf(isPreloader()); }
/** * @see javax.servlet.jsp.tagext.Tag#doStartTag() */ @Override public int doStartTag() throws JspException, CmsIllegalArgumentException { // get a reference to the parent "content container" class (if available) Tag ancestor = findAncestorWithClass(this, I_CmsXmlContentContainer.class); I_CmsXmlContentContainer container = null; if (ancestor != null) { // parent content container available, use preloaded values from this container container = (I_CmsXmlContentContainer)ancestor; // check if container really is a preloader if (!container.isPreloader()) { // don't use ancestor if not a preloader container = null; } } // initialize the content load tag init(container); hasMoreContent(); return isScopeVarSet() ? SKIP_BODY : EVAL_BODY_INCLUDE; }
if (isPreloader()) { String resourcename = getResourceName(m_cms, usedContainer); m_collectorName = resolver.resolveMacros(getCollector()); m_collectorParam = resolver.resolveMacros(getParam()); m_collectorResult = null; } else { m_contentInfoBean.initResultIndex(); if (!isPreloader()) { m_collectorResult = CmsJspTagContentLoad.limitCollectorResult(m_contentInfoBean, m_collectorResult); m_contentInfoBean.initPageNavIndexes(); } else if (isScopeVarSet()) { storeAttribute(bean);
throws JspException { setCollector(collectorName); setParam(collectorParam); setPageIndex(pageIndex); setPageSize(pageSize); m_locale = locale; m_contentLocale = locale; m_preload = false; setPageContext(context); init(container);
if (isPreloader()) { doLoadNextFile(); } catch (CmsException e) { m_controller.setThrowable(e, m_resourceName);
/** * @see org.opencms.jsp.I_CmsXmlContentContainer#isPreloader() */ public boolean isPreloader() { return isScopeVarSet() ? true : m_preload; }
if (CmsMacroResolver.isMacro(element)) { String resourcename = CmsJspTagContentLoad.getResourceName(cms, container); CmsMacroResolver resolver = CmsMacroResolver.newInstance().setCmsObject(cms).setJspPageContext(context).setResourceName( resourcename).setKeepEmptyMacros(true);
if (isPreloader()) { String resourcename = getResourceName(m_cms, usedContainer); m_collectorName = resolver.resolveMacros(getCollector()); m_collectorParam = resolver.resolveMacros(getParam()); m_collectorResult = null; } else { m_contentInfoBean.initResultIndex(); if (!isPreloader()) { } else if (isScopeVarSet()) { storeAttribute(bean);
throws JspException { setCollector(collectorName); setParam(collectorParam); setPageIndex(pageIndex); setPageSize(pageSize); m_locale = locale; m_contentLocale = locale; m_preload = false; setPageContext(context); init(container);
if (isPreloader()) { doLoadNextFile(); } catch (CmsException e) { m_controller.setThrowable(e, m_resourceName);
/** * Loads a set of <code>{@link org.opencms.xml.I_CmsXmlDocument}</code>, same as * using the <code><cms:contentload collector="***" param="***" locale="***" editable="***" /></code> tag.<p> * * @param collectorName the collector name to use * @param collectorParam the parameters for the collector * @param locale the locale to use to access the content * @param editable indicates if "direct edit" support is required (will insert additional HTML) * * @return an XML content container loaded with the selected content * * @throws JspException in case something goes wrong */ public I_CmsXmlContentContainer contentload( String collectorName, String collectorParam, Locale locale, boolean editable) throws JspException { return new CmsJspTagContentLoad(null, getJspContext(), collectorName, collectorParam, locale, editable); }
boolean editable) throws JspException { return new CmsJspTagContentLoad( null, getJspContext(),
boolean editable) throws JspException { return new CmsJspTagContentLoad( null, getJspContext(),