[opencms-dev] Can We Have hasMoreContent() Method Back Please?

Paul-Inge Flakstad flakstad at npolar.no
Wed Sep 28 12:27:53 CEST 2011


Hi,

Add my signature to this request. I use mostly structured content and scriptlet code, and consequently I use I_CmsXmlContentContainer#hasMoreContent() "everywhere".

To be honest, I find it quite strange the method was simply removed, in favor of another. I'd expect som kind of backwards compatibility - especially in a case like this, where it seems extremely easy to achieve (f.ex. just returning hasMoreResources(), like Brett suggests).

Best regards,
Paul

________________________________
From: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] On Behalf Of Brett Sheeran
Sent: 28. september 2011 12:02
To: opencms-dev at opencms.org
Subject: [opencms-dev] Can We Have hasMoreContent() Method Back Please?


Hi,

On behalf of those of us who utilize the hasMoreContent() method, can we have it back in future versions of OpenCMS please?

I have just installed OpenCMS 8.0.1 which had a couple of incompatibilities with our code base.

One incompatibility was easily fixed. However, the other incompatability (hasMoreContent() becoming hasMoreResources() in the following files has caused us major headaches:
CmsJspTagResourceLoad.java
I_CmsResourceContainer.java
CmsJspTagContentLoad.java
CmsJspTagContentLoop.java

The reasons we are respectfully requesting hasMoreContent() back are as follows:
- We make extensive use of the hasMoreContent() method
- We have several production sites running OpenCMS 7.5.3. Most of these are high availability and shutting them down for upgrades at this time is very inconvenient.
- We want to use OpenCMS 8 for future projects and eventually upgrade the other sites but, we don't want to maintain two code bases.

I feel we could have both hasMoreContent() and hasMoreResources() methods but deprecate hasMoreContent().

We have managed to get our code running on OpenCMS 8.0.1 by adding the following few lines to the Java files mentioned above and doing a custom build.

public boolean hasMoreContent() throws JspException {
 return hasMoreResources();
}

OR

boolean hasMoreContent() throws JspException;

Those modifications seem to work OK however, I'm hoping we can eventually use a standard OpenCMS build.

BTW, I am happy to email those files to anyone who wants a copy

Thank you.

Regards

Brett S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110928/f9ee40b8/attachment.htm>


More information about the opencms-dev mailing list