[opencms-dev] Include problem - template element argument disregarded online not offline

Rüdiger Kurz r.kurz at alkacon.com
Fri Jan 18 13:42:01 CET 2013


Hi Paul,

I was just about writing an answer!!
Anyway, thank you very much for the feedback.

- Cheers Rüdiger

Am 18.01.2013 13:30, schrieb Paul-Inge Flakstad:
> Dammit nevermind – guess I just had to ask everyone on the list in order
> to find the solution myself. Just typical. x)
>
> The culprit was the cache property on JSP-A. It was set at a time when
> the JSP had only 1 output, and so was in need of a slight adjustment.
>
> Changed property “cache” on JSP-A:
>
> old value: “locale”
>
> new value: “locale;element=(list, dropdown)”
>
> Seems to have done the trick.
>
> Have a nice weekend everyone, and sorry for bothering you all with this! :)
>
> Cheers,
>
> Paul
>
> *From:*opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] *On Behalf Of *Paul-Inge Flakstad
> *Sent:* 18. januar 2013 13:13
> *To:* The OpenCms mailing list
> *Subject:* [opencms-dev] Include problem - template element argument
> disregarded online not offline
>
> Hi everyone,
>
> I’ve got a very strange issue that’s bugging me out here. My setup is
> OpenCms 7.5.2, MySQL, Tomcat with Apache in front.
>
> I use a simple JSP to produce 2 different outputs - a regular list and a
> select drop-down.
>
> The JSP, let’s call it “JSP-A”, looks like this:
>
> CmsJspXmlContentBean  cms = new CmsJspXmlContentBean(pageContext,
> request, response);
>
> if (cms.template(“list”)) {
>
>                  // print the list
>
> }
>
> if (cms.template(“select”)) {
>
>                  // print the select drop-down
>
> }
>
> I’m triggering the output by calling the include() method from another
> JSP, “JSP-B”:
>
> CmsJspXmlContentBean  cms = new CmsJspXmlContentBean(pageContext,
> request, response);
>
> cms.include(JSP-A, "list", false, params); // Should trigger the output
> of the list
>
> and
>
> cms.include(JSP-A, "select", false, params); // Should trigger the
> output of the select drop-down
>
> But all is not well. What happens is outright strange:
>
> When viewing the online site, the output is *always* the list, for both
> include() calls in JSP-B. It’s as if JSP-A contained *only* the code for
> the printing the list.
>
> But offline, everything’s fine! Both the list and the select drop-down
> are printed correctly and as expected.
>
> Things I’ve done already:
>
> - Cleared all cache
>
> - Triple-checked that everything’s published
>
> - Confirmed that the online files are indeed up-to-date (added some
> comments and confirmed that they were printed)
>
> To top it all off, it so happens I’m using this very same approach
> elsewhere on the site, with no problems at all!
>
> WTF..??? What could be causing this? Any ideas???
>
> Cheers,
>
> Paul

-- 
Kind Regards,
Rüdiger.

-------------------

Rüdiger Kurz

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org



More information about the opencms-dev mailing list