Hi,
Thank you for finding bugs in the template
document_listing which is not activated in this template set.
You will find a fix in the repository.
Cheers,
Philippe
At 07.12.2006 10:51, you wrote:
Hi,
I found a bug in doc/filters.inc in the
corporate_portal_templates_v2. In the beginning,
there are no categories, so the bug is hidden.
But from the moment you add a category, you get a NullPointerException.
See the bold text below
Is there somebody who can fix this bug (I
suggest creating a new ArrayList when the
iterator has elements) and put it into the code repository?
Regards,
Stijn
<%--
Copyright 2002-2006 Jahia Ltd
Licensed under the JAHIA COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (JCDDL),
Version 1.0 (the "License"), or (at your option) any later version; you may
not use this file except in compliance with the License. You should have
received a copy of the License along with this
program; if not, you may obtain
a copy of the License at
http://www.jahia.org/license/
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--%><%
//--------------------------------------------------------------------------
//
// Filtering for container list directoryDoc_filter of template doc.jsp
//
//--------------------------------------------------------------------------
// Lets reset the previous variables
Vector cFilterBeans = new Vector();
ContainerFilterBean containerFilter = null;
//-----------------------------------------------------------
// Category filter (template doc)
//-----------------------------------------------------------
Set categories = new HashSet();
List foundCategories = Category.findCategoriesByPropNameAndValue("homepage%",
String.valueOf(jData.params().getContentPage().getID()),user);
List defaultSelectedCategories = null;
Iterator iterator = foundCategories.iterator();
while ( iterator.hasNext() ){
Category cat = (Category)iterator.next();
categories.add(cat);
defaultSelectedCategories.add(cat.getKey());
logger.debug("Add filter for categoriy " + cat.getKey());
}
if (! categories.isEmpty()) {
ContainerFilterByCategories containerCategoryFilter =
new
ContainerFilterByCategories(categories,jParams.getEntryLoadRequest(),true);
cFilterBeans.add(containerCategoryFilter);
}
......
-------=[ pvollenweider at jahia dot com ]=---------
Jahia : A collaborative source CMS and Portal Server
www.jahia.org Community and product web site
www.jahia.com Commercial services company