Relocated jsp template to avoid code duplication and copy&paste errors

git-svn-id: https://svn.libreccm.org/ccm/trunk@5051 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2017-10-18 07:27:14 +00:00
parent 4d8b45f5ee
commit d3bd74a418
27 changed files with 98 additions and 615 deletions

View File

@ -170,8 +170,8 @@ com.arsdigita.forum.use_wysiwyg_editor=true
com.arsdigita.navigation.category_menu_show_grand_children=false
; com.arsdigita.navigation.category_menu_show_nephews=false
com.arsdigita.navigation.default_cat_root_path=/navigation/
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/gen-default.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/gen-templates.txt
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/def-page.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/lcs-templates.txt
# SUBSITE configuration parameters

View File

@ -1,8 +1,8 @@
LibreCMS Default Items Page,Default Navigation Index Page ordering items in ascending order,/templates/ccm-navigation/navigation/gen-default.jsp
LibreCMS Recent Items Page,List of items ordered with most recent first,/templates/ccm-navigation/navigation/gen-recent.jsp
LibreCMS A-Z Items,List of items paginated as A-Z,/templates/ccm-navigation/navigation/gen-atoz.jsp
LibreCMS Events Page,Events Page ordering events in decending order,/templates/ccm-navigation/navigation/gen-events.jsp
LibreCMS Portal Page,Portal Page for embedding a portal page as navigation leaves page,/templates/ccm-navigation/navigation/gen-portal.jsp
LibreCMS Portal Welcome Page,Portal page meant as site welcome page,/templates/ccm-navigation/navigation/gen-portal-welcome.jsp
LibreCMS Navigation Welcome Page,Site welcome page created by navigation root term,/templates/ccm-navigation/navigation/gen-welcome.jsp
LibreCMS Specializing Items List,Specialising List item page,/templates/ccm-navigation/navigation/SpecializingList.jsp
LibreCMS Default Items Page,Default Navigation Index Page ordering items in ascending order,/templates/ccm-navigation/navigation/def-page.jsp
LibreCMS Recent Items Page,List of items ordered with most recent first,/templates/ccm-navigation/navigation/def-recent.jsp
LibreCMS A-Z Items,List of items paginated as A-Z,/templates/ccm-navigation/navigation/def-atoz.jsp
LibreCMS Events Page,Events Page ordering events in decending order,/templates/ccm-navigation/navigation/def-events.jsp
LibreCMS Portal Page,Portal Page for embedding a portal page as navigation leaves page,/templates/ccm-navigation/navigation/def-portal.jsp
LibreCMS Portal Welcome Page,Portal page meant as site welcome page,/templates/ccm-navigation/navigation/def-portal-welcome.jsp
LibreCMS Navigation Welcome Page,Site welcome page created by navigation root term,/templates/ccm-navigation/navigation/def-welcome.jsp
LibreCMS Specializing Items List,Specialising List item page,/templates/ccm-navigation/navigation/def-specializing-list.jsp

View File

@ -1,12 +1,19 @@
Subdirectory <nav> may optionally contain navigation item templates for
The installation program copies all sub-directories and files in this directory
into the applications webapps subdirectory templates.
Subdirectory <navigation> may optionally contain navigation item templates for
navigation index pages which either overwrite or ammend those templates
which are default for ccm-sci-bundle and stored in
which are default for ccm-lcs-bundle and stored in
/web/templates/ccm-navigation/navigation
Templates of the same name in this subdirectory just overwrite the
default files. Templates of different names are stored in addition
to the default template files. In the later case a developer must
provide a customised template.txt file replacing the default file
/src/WEB-INF/navigation/sci-templates.txt
/src/WEB-INF/navigation/templates.txt
This file must be specified in parameter
com.arsdigita.navigation.templates_file
com.arsdigita.navigation.templates_file
It is usually stored in res/bundle/navigation
Please use a unique prefix for additional template files, e.g. my-defaultpage.jsp
and don't forget to add a usage comment.

View File

@ -175,8 +175,8 @@ com.arsdigita.forum.use_wysiwyg_editor=true
com.arsdigita.navigation.category_menu_show_grand_children=false
; com.arsdigita.navigation.category_menu_show_nephews=false
com.arsdigita.navigation.default_cat_root_path=/navigation/
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/gen-default.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/gen-templates.txt
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/def-page.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/lcs-templates.txt
# SUBSITE configuration parameters

View File

@ -1,8 +1,8 @@
LibreCMS Default Items Page,Default Navigation Index Page ordering items in ascending order,/templates/ccm-navigation/navigation/gen-default.jsp
LibreCMS Recent Items Page,List of items ordered with most recent first,/templates/ccm-navigation/navigation/gen-recent.jsp
LibreCMS A-Z Items,List of items paginated as A-Z,/templates/ccm-navigation/navigation/gen-atoz.jsp
LibreCMS Events Page,Events Page ordering events in decending order,/templates/ccm-navigation/navigation/gen-events.jsp
LibreCMS Portal Page,Portal Page for embedding a portal page as navigation leaves page,/templates/ccm-navigation/navigation/gen-portal.jsp
LibreCMS Portal Welcome Page,Portal page meant as site welcome page,/templates/ccm-navigation/navigation/gen-portal-welcome.jsp
LibreCMS Navigation Welcome Page,Site welcome page created by navigation root term,/templates/ccm-navigation/navigation/gen-welcome.jsp
LibreCMS Specializing Items List,Specialising List item page,/templates/ccm-navigation/navigation/SpecializingList.jsp
LibreCMS Default Items Page,Default Navigation Index Page ordering items in ascending order,/templates/ccm-navigation/navigation/def-page.jsp
LibreCMS Recent Items Page,List of items ordered with most recent first,/templates/ccm-navigation/navigation/def-recent.jsp
LibreCMS A-Z Items,List of items paginated as A-Z,/templates/ccm-navigation/navigation/def-atoz.jsp
LibreCMS Events Page,Events Page ordering events in decending order,/templates/ccm-navigation/navigation/def-events.jsp
LibreCMS Portal Page,Portal Page for embedding a portal page as navigation leaves page,/templates/ccm-navigation/navigation/def-portal.jsp
LibreCMS Portal Welcome Page,Portal page meant as site welcome page,/templates/ccm-navigation/navigation/def-portal-welcome.jsp
LibreCMS Navigation Welcome Page,Site welcome page created by navigation root term,/templates/ccm-navigation/navigation/def-welcome.jsp
LibreCMS Specializing Items List,Specialising List item page,/templates/ccm-navigation/navigation/def-specializing-list.jsp

View File

@ -1,12 +1,19 @@
Subdirectory <nav> may optionally contain navigation item templates for
The installation program copies all sub-directories and files in this directory
into the applications webapps subdirectory templates.
Subdirectory <navigation> may optionally contain navigation item templates for
navigation index pages which either overwrite or ammend those templates
which are default for ccm-sci-bundle and stored in
which are default for ccm-lcs-bundle and stored in
/web/templates/ccm-navigation/navigation
Templates of the same name in this subdirectory just overwrite the
default files. Templates of different names are stored in addition
to the default template files. In the later case a developer must
provide a customised template.txt file replacing the default file
/src/WEB-INF/navigation/sci-templates.txt
/src/WEB-INF/navigation/templates.txt
This file must be specified in parameter
com.arsdigita.navigation.templates_file
com.arsdigita.navigation.templates_file
It is usually stored in res/bundle/navigation
Please use a unique prefix for additional template files, e.g. my-defaultpage.jsp
and don't forget to add a usage comment.

View File

@ -177,8 +177,8 @@ com.arsdigita.forum.use_wysiwyg_editor=true
com.arsdigita.navigation.category_menu_show_grand_children=false
; com.arsdigita.navigation.category_menu_show_nephews=false
com.arsdigita.navigation.default_cat_root_path=/navigation/
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/gen-default.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/gen-templates.txt
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/def-page.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/lcs-templates.txt
# SUBSITE configuration parameters

View File

@ -8,8 +8,8 @@
ccmVersion="6.1"
name="librecms-ccm"
prettyName="LibreCMS OpenCCM"
version="0-0-0"
release="devel"
version="2.3.99"
release="devel-SNAPSHOT-r4851"
webxml="libre-web.xml"
webapp="ROOT"
xsi:schemaLocation="http://ccm.redhat.com/ccm-project file:tools-ng/common/xsd/project.xsd">

View File

@ -1,8 +1,8 @@
LibreCMS Default Items Page,Default Navigation Index Page ordering items in ascending order,/templates/ccm-navigation/navigation/gen-default.jsp
LibreCMS Recent Items Page,List of items ordered with most recent first,/templates/ccm-navigation/navigation/gen-recent.jsp
LibreCMS A-Z Items,List of items paginated as A-Z,/templates/ccm-navigation/navigation/gen-atoz.jsp
LibreCMS Events Page,Events Page ordering events in decending order,/templates/ccm-navigation/navigation/gen-events.jsp
LibreCMS Portal Page,Portal Page for embedding a portal page as navigation leaves page,/templates/ccm-navigation/navigation/gen-portal.jsp
LibreCMS Portal Welcome Page,Portal page meant as site welcome page,/templates/ccm-navigation/navigation/gen-portal-welcome.jsp
LibreCMS Navigation Welcome Page,Site welcome page created by navigation root term,/templates/ccm-navigation/navigation/gen-welcome.jsp
LibreCMS Specializing Items List,Specialising List item page,/templates/ccm-navigation/navigation/SpecializingList.jsp
LibreCMS Default Items Page,Default Navigation Index Page ordering items in ascending order,/templates/ccm-navigation/navigation/def-page.jsp
LibreCMS Recent Items Page,List of items ordered with most recent first,/templates/ccm-navigation/navigation/def-recent.jsp
LibreCMS A-Z Items,List of items paginated as A-Z,/templates/ccm-navigation/navigation/def-atoz.jsp
LibreCMS Events Page,Events Page ordering events in decending order,/templates/ccm-navigation/navigation/def-events.jsp
LibreCMS Portal Page,Portal Page for embedding a portal page as navigation leaves page,/templates/ccm-navigation/navigation/def-portal.jsp
LibreCMS Portal Welcome Page,Portal page meant as site welcome page,/templates/ccm-navigation/navigation/def-portal-welcome.jsp
LibreCMS Navigation Welcome Page,Site welcome page created by navigation root term,/templates/ccm-navigation/navigation/def-welcome.jsp
LibreCMS Specializing Items List,Specialising List item page,/templates/ccm-navigation/navigation/def-specializing-list.jsp

View File

@ -1,12 +1,19 @@
Subdirectory <nav> may optionally contain navigation item templates for
The installation program copies all sub-directories and files in this directory
into the applications webapps subdirectory templates.
Subdirectory <navigation> may optionally contain navigation item templates for
navigation index pages which either overwrite or ammend those templates
which are default for ccm-sci-bundle and stored in
which are default for ccm-lcs-bundle and stored in
/web/templates/ccm-navigation/navigation
Templates of the same name in this subdirectory just overwrite the
default files. Templates of different names are stored in addition
to the default template files. In the later case a developer must
provide a customised template.txt file replacing the default file
/src/WEB-INF/navigation/sci-templates.txt
/src/WEB-INF/navigation/templates.txt
This file must be specified in parameter
com.arsdigita.navigation.templates_file
com.arsdigita.navigation.templates_file
It is usually stored in res/bundle/navigation
Please use a unique prefix for additional template files, e.g. my-defaultpage.jsp
and don't forget to add a usage comment.

View File

@ -170,8 +170,8 @@ com.arsdigita.forum.use_wysiwyg_editor=true
com.arsdigita.navigation.category_menu_show_grand_children=false
; com.arsdigita.navigation.category_menu_show_nephews=false
com.arsdigita.navigation.default_cat_root_path=/navigation/
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/gen-default.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/gen-templates.txt
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/def-page.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/lcs-templates.txt
# SUBSITE configuration parameters

View File

@ -1,8 +1,8 @@
LibreCMS Default Items Page,Default Navigation Index Page ordering items in ascending order,/templates/ccm-navigation/navigation/gen-default.jsp
LibreCMS Recent Items Page,List of items ordered with most recent first,/templates/ccm-navigation/navigation/gen-recent.jsp
LibreCMS A-Z Items,List of items paginated as A-Z,/templates/ccm-navigation/navigation/gen-atoz.jsp
LibreCMS Events Page,Events Page ordering events in decending order,/templates/ccm-navigation/navigation/gen-events.jsp
LibreCMS Portal Page,Portal Page for embedding a portal page as navigation leaves page,/templates/ccm-navigation/navigation/gen-portal.jsp
LibreCMS Portal Welcome Page,Portal page meant as site welcome page,/templates/ccm-navigation/navigation/gen-portal-welcome.jsp
LibreCMS Navigation Welcome Page,Site welcome page created by navigation root term,/templates/ccm-navigation/navigation/gen-welcome.jsp
LibreCMS Specializing Items List,Specialising List item page,/templates/ccm-navigation/navigation/SpecializingList.jsp
LibreCMS Default Items Page,Default Navigation Index Page ordering items in ascending order,/templates/ccm-navigation/navigation/def-page.jsp
LibreCMS Recent Items Page,List of items ordered with most recent first,/templates/ccm-navigation/navigation/def-recent.jsp
LibreCMS A-Z Items,List of items paginated as A-Z,/templates/ccm-navigation/navigation/def-atoz.jsp
LibreCMS Events Page,Events Page ordering events in decending order,/templates/ccm-navigation/navigation/def-events.jsp
LibreCMS Portal Page,Portal Page for embedding a portal page as navigation leaves page,/templates/ccm-navigation/navigation/def-portal.jsp
LibreCMS Portal Welcome Page,Portal page meant as site welcome page,/templates/ccm-navigation/navigation/def-portal-welcome.jsp
LibreCMS Navigation Welcome Page,Site welcome page created by navigation root term,/templates/ccm-navigation/navigation/def-welcome.jsp
LibreCMS Specializing Items List,Specialising List item page,/templates/ccm-navigation/navigation/def-specializing-list.jsp

View File

@ -3,14 +3,17 @@ into the applications webapps subdirectory templates.
Subdirectory <navigation> may optionally contain navigation item templates for
navigation index pages which either overwrite or ammend those templates
which are default for ccm-sci-bundle and stored in
which are default for ccm-lcs-bundle and stored in
/web/templates/ccm-navigation/navigation
Templates of the same name in this subdirectory just overwrite the
default files. Templates of different names are stored in addition
to the default template files. In the later case a developer must
provide a customised template.txt file replacing the default file
/src/WEB-INF/navigation/sci-templates.txt
/src/WEB-INF/navigation/templates.txt
This file must be specified in parameter
com.arsdigita.navigation.templates_file
It is usually stored in res/bundle/navigation
It is usually stored in res/bundle/navigation
Please use a unique prefix for additional template files, e.g. my-defaultpage.jsp
and don't forget to add a usage comment.

View File

@ -170,8 +170,8 @@ com.arsdigita.forum.use_wysiwyg_editor=true
com.arsdigita.navigation.category_menu_show_grand_children=false
; com.arsdigita.navigation.category_menu_show_nephews=false
com.arsdigita.navigation.default_cat_root_path=/navigation/
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/gen-default.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/gen-templates.txt
com.arsdigita.navigation.default_template=/templates/ccm-navigation/navigation/def-page.jsp
com.arsdigita.navigation.templates_file=bundle/navigation/lcs-templates.txt
# SUBSITE configuration parameters

View File

@ -1,8 +0,0 @@
LibreCMS Default Items Page,Default Navigation Index Page ordering items in ascending order,/templates/ccm-navigation/navigation/gen-default.jsp
LibreCMS Recent Items Page,List of items ordered with most recent first,/templates/ccm-navigation/navigation/gen-recent.jsp
LibreCMS A-Z Items,List of items paginated as A-Z,/templates/ccm-navigation/navigation/gen-atoz.jsp
LibreCMS Events Page,Events Page ordering events in decending order,/templates/ccm-navigation/navigation/gen-events.jsp
LibreCMS Portal Page,Portal Page for embedding a portal page as navigation leaves page,/templates/ccm-navigation/navigation/gen-portal.jsp
LibreCMS Portal Welcome Page,Portal page meant as site welcome page,/templates/ccm-navigation/navigation/gen-portal-welcome.jsp
LibreCMS Navigation Welcome Page,Site welcome page created by navigation root term,/templates/ccm-navigation/navigation/gen-welcome.jsp
LibreCMS Specializing Items List,Specialising List item page,/templates/ccm-navigation/navigation/SpecializingList.jsp

View File

@ -0,0 +1,8 @@
LibreCMS Default Items Page,Default Navigation Index Page ordering items in ascending order,/templates/ccm-navigation/navigation/def-page.jsp
LibreCMS Recent Items Page,List of items ordered with most recent first,/templates/ccm-navigation/navigation/def-recent.jsp
LibreCMS A-Z Items,List of items paginated as A-Z,/templates/ccm-navigation/navigation/def-atoz.jsp
LibreCMS Events Page,Events Page ordering events in decending order,/templates/ccm-navigation/navigation/def-events.jsp
LibreCMS Portal Page,Portal Page for embedding a portal page as navigation leaves page,/templates/ccm-navigation/navigation/def-portal.jsp
LibreCMS Portal Welcome Page,Portal page meant as site welcome page,/templates/ccm-navigation/navigation/def-portal-welcome.jsp
LibreCMS Navigation Welcome Page,Site welcome page created by navigation root term,/templates/ccm-navigation/navigation/def-welcome.jsp
LibreCMS Specializing Items List,Specialising List item page,/templates/ccm-navigation/navigation/def-specializing-list.jsp

View File

@ -3,14 +3,17 @@ into the applications webapps subdirectory templates.
Subdirectory <navigation> may optionally contain navigation item templates for
navigation index pages which either overwrite or ammend those templates
which are default for ccm-sci-bundle and stored in
which are default for ccm-lcs-bundle and stored in
/web/templates/ccm-navigation/navigation
Templates of the same name in this subdirectory just overwrite the
default files. Templates of different names are stored in addition
to the default template files. In the later case a developer must
provide a customised template.txt file replacing the default file
/src/WEB-INF/navigation/sci-templates.txt
/src/WEB-INF/navigation/templates.txt
This file must be specified in parameter
com.arsdigita.navigation.templates_file
It is usually stored in res/bundle/navigation
It is usually stored in res/bundle/navigation
Please use a unique prefix for additional template files, e.g. my-defaultpage.jsp
and don't forget to add a usage comment.

View File

@ -1,46 +0,0 @@
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:define="/WEB-INF/bebop-define.tld"
xmlns:show="/WEB-INF/bebop-show.tld"
version="1.2">
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
<jsp:directive.page import="com.arsdigita.bebop.parameters.BigDecimalParameter"/>
<jsp:directive.page import="com.arsdigita.navigation.Navigation"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionDefinition"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionRenderer"/>
<jsp:directive.page import="org.apache.log4j.Logger"/>
<jsp:scriptlet>
long age = Navigation.getConfig().getIndexPageCacheLifetime();
if (age == 0) {
DispatcherHelper.cacheDisable(response);
} else {
DispatcherHelper.cacheForWorld(response, (int)age);
}
</jsp:scriptlet>
<define:page name="defaultItemPage" application="navigation"
title="Navigation" cache="false">
<define:component name="greetingItem"
classname="com.arsdigita.navigation.ui.GreetingItem"/>
<define:component name="categoryPath"
classname="com.arsdigita.navigation.ui.category.Path"/>
<define:component name="categoryMenu"
classname="com.arsdigita.navigation.ui.category.Menu"/>
<define:component name="itemList"
classname="com.arsdigita.navigation.ui.object.ComplexObjectList"/>
<jsp:scriptlet>
((com.arsdigita.navigation.ui.object.ComplexObjectList) itemList).setDefinition(new CMSDataCollectionDefinition());
((com.arsdigita.navigation.ui.object.ComplexObjectList) itemList).setRenderer(new CMSDataCollectionRenderer());
((com.arsdigita.navigation.ui.object.ComplexObjectList) itemList).getDefinition().setObjectType("com.arsdigita.cms.ContentPage");
((com.arsdigita.navigation.ui.object.ComplexObjectList) itemList).getDefinition().addOrder("parent.categories.link.sortKey");
((com.arsdigita.navigation.ui.object.ComplexObjectList) itemList).getRenderer().setPageSize(20);
((com.arsdigita.navigation.ui.object.ComplexObjectList) itemList).getRenderer().setSpecializeObjects(true);
</jsp:scriptlet>
<define:component name="assignedTerms"
classname="com.arsdigita.navigation.ui.CategoryIndexAssignedTerms"/>
</define:page>
<show:all/>
</jsp:root>

View File

@ -3,7 +3,7 @@ Information for administrators and developers:
This directory contains Navigation item pages specifically crafted for
Libre CMS. They are activated by a customized template.txt file list.
The files are named gen-*.jsp.
All filenames must comply to the naming convention lcs-*.jsp.
These file may be overwritten or ammended by site specific templates stored
in den bundles subdirectory. In case of additional templates a customised

View File

@ -1,51 +0,0 @@
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:define="/WEB-INF/bebop-define.tld"
xmlns:show="/WEB-INF/bebop-show.tld"
version="1.2">
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
<jsp:directive.page import="com.arsdigita.bebop.parameters.BigDecimalParameter"/>
<jsp:directive.page import="com.arsdigita.navigation.Navigation"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionDefinition"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionRenderer"/>
<jsp:scriptlet>
long age = Navigation.getConfig().getIndexPageCacheLifetime();
if (age == 0) {
DispatcherHelper.cacheDisable(response);
} else {
DispatcherHelper.cacheForWorld(response, (int)age);
}
</jsp:scriptlet>
<define:page name="atozItemPage" application="navigation"
title="Navigation" cache="true">
<define:component name="greetingItem"
classname="com.arsdigita.navigation.ui.GreetingItem"/>
<define:component name="categoryPath"
classname="com.arsdigita.navigation.ui.category.Path"/>
<define:component name="categoryMenu"
classname="com.arsdigita.navigation.ui.category.Menu"/>
<define:component name="itemList"
classname="com.arsdigita.navigation.ui.object.AtoZObjectList"/>
<jsp:scriptlet>
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).setDefinition(new CMSDataCollectionDefinition());
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).setRenderer(new CMSDataCollectionRenderer());
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).getDefinition().setObjectType("com.arsdigita.cms.ContentPage");
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).getDefinition().setDescendCategories(false);
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).getDefinition().addOrder("title");
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).getRenderer().setPageSize(30);
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).getRenderer().addAttribute("objectType");
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).getRenderer().addAttribute( "title");
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).getRenderer().addAttribute( "definition");
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).getRenderer().addAttribute( "summary");
((com.arsdigita.navigation.ui.object.AtoZObjectList) itemList).getRenderer().addAttribute( "lead");
</jsp:scriptlet>
</define:page>
<show:all/>
</jsp:root>

View File

@ -1,62 +0,0 @@
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:define="/WEB-INF/bebop-define.tld"
xmlns:show="/WEB-INF/bebop-show.tld"
version="1.2">
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
<jsp:directive.page import="com.arsdigita.bebop.parameters.BigDecimalParameter"/>
<jsp:directive.page import="com.arsdigita.navigation.Navigation"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionDefinition"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionRenderer"/>
<jsp:scriptlet>
long age = Navigation.getConfig().getIndexPageCacheLifetime();
if (age == 0) {
DispatcherHelper.cacheDisable(response);
} else {
DispatcherHelper.cacheForWorld(response, (int)age);
}
</jsp:scriptlet>
<define:page name="defaultItemPage" application="navigation"
title="Navigation" cache="true">
<define:component name="greetingItem"
classname="com.arsdigita.navigation.ui.GreetingItem"/>
<define:component name="categoryPath"
classname="com.arsdigita.navigation.ui.category.Path"/>
<define:component name="categoryMenu"
classname="com.arsdigita.navigation.ui.category.Menu"/>
<define:component name="itemList"
classname="com.arsdigita.navigation.ui.object.SimpleObjectList"/>
<jsp:scriptlet>
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).setDefinition(new CMSDataCollectionDefinition());
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).setRenderer(new CMSDataCollectionRenderer());
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getDefinition().setObjectType("com.arsdigita.cms.ContentPage");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getDefinition().setDescendCategories(false);
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getDefinition().addOrder("parent.categories.link.sortKey");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().setPageSize(30);
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("objectType");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("title");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "definition");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "summary");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "lead");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "description");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "eventDate");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "startDate" );
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "endDate");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "newsDate");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "imageAttachments.caption");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "imageAttachments.image.id");
</jsp:scriptlet>
<define:component name="assignedTerms"
classname="com.arsdigita.navigation.ui.CategoryIndexAssignedTerms"/>
</define:page>
<show:all/>
</jsp:root>

View File

@ -1,73 +0,0 @@
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:define="/WEB-INF/bebop-define.tld"
xmlns:show="/WEB-INF/bebop-show.tld"
version="1.2">
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
<jsp:directive.page import="com.arsdigita.bebop.parameters.BigDecimalParameter"/>
<jsp:directive.page import="com.arsdigita.navigation.Navigation"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionDefinition"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionRenderer"/>
<jsp:scriptlet>
long age = Navigation.getConfig().getIndexPageCacheLifetime();
if (age == 0) {
DispatcherHelper.cacheDisable(response);
} else {
DispatcherHelper.cacheForWorld(response, (int)age);
}
</jsp:scriptlet>
<define:page name="defaultItemPage" application="navigation"
title="Navigation" cache="true">
<define:component name="greetingItem"
classname="com.arsdigita.navigation.ui.GreetingItem"/>
<define:component name="categoryPath"
classname="com.arsdigita.navigation.ui.category.Path"/>
<define:component name="categoryMenu"
classname="com.arsdigita.navigation.ui.category.Menu"/>
<define:component name="eventList"
classname="com.arsdigita.navigation.ui.object.ComplexObjectList"/>
<jsp:scriptlet>
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).setDefinition(new CMSDataCollectionDefinition());
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).setRenderer(new CMSDataCollectionRenderer());
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getDefinition().setObjectType("com.arsdigita.cms.contenttypes.Event");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).setSQLFilter("(endDate &gt;= :today and (endTime &gt; :time or endTime is null)) or (endDate is null and startDate &gt;= :today)");
// Java ist mal wieder kompliziert. Man braucht ein Calender-Object, damit man Datumsarithmetik betreiben kann. java.util.Calendar ist allerdings // abstract. Deshalb muß man java.util.GregorianCalendar verwenden. Dann kann man mit der add-Methode verschiedene Felder manipulieren. // Aber Achtung - die add-Method liefert void zurück. Daher kann man das nicht alles in einer Zeile machen. Also Variablen anlegen. // Komplizierter geht's wohl nicht mehr.
java.util.GregorianCalendar now = new java.util.GregorianCalendar();
java.util.Date today = (new java.util.GregorianCalendar(now.get(java.util.GregorianCalendar.YEAR),
now.get(java.util.GregorianCalendar.MONTH),
now.get(java.util.GregorianCalendar.DATE))).getTime();
// Im Event-CT ist das Datum als SQL-Type Date eingetragen, die Uhrzeit aber als SQL-Typ timestamptz. Leider wird von ccm im letzten
// das Datum nicht gesetzt, so daß der Timestamp immer eine Uhrzeit am 1.1.1970 angibt. Das ist ziemlich bescheuert und macht hier
// diesen kompliezierten Vergleich notwendig. Sonst könnte man einfach mit dem aktuellen Timestamp vergleichen.
java.util.Date time = (new java.util.GregorianCalendar(70,0,1, // this is 01.01.1970 - start of UNIX timestamp
now.get(java.util.GregorianCalendar.HOUR_OF_DAY),
now.get(java.util.GregorianCalendar.MINUTE),
now.get(java.util.GregorianCalendar.SECOND))).getTime();
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).setParameter("today", today);
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).setParameter("time", time);
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getDefinition().setDescendCategories(true);
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getDefinition().addOrder("startDate");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("objectType");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("title");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("lead");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("eventDate");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("launchDate");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("startDate");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("endDate");
</jsp:scriptlet>
<define:component name="assignedTerms"
classname="com.arsdigita.navigation.ui.CategoryIndexAssignedTerms"/>
</define:page>
<show:all/>
</jsp:root>

View File

@ -1,40 +0,0 @@
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:define="/WEB-INF/bebop-define.tld"
xmlns:show="/WEB-INF/bebop-show.tld"
version="1.2">
<!-- JSP template to use a portal page as index page in navigation
Currently the same as gen-portal.jsp, may change in future to
support special features of a site's start page (home page) -->
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
<jsp:directive.page import="com.arsdigita.navigation.Navigation"/>
<jsp:directive.page import="com.arsdigita.bebop.parameters.BigDecimalParameter"/>
<jsp:directive.page import="com.arsdigita.portalworkspace.ui.CategoryPortalSelectionModel"/>
<jsp:scriptlet>
long age = Navigation.getConfig().getIndexPageCacheLifetime();
if (age == 0) {
DispatcherHelper.cacheDisable(response);
} else {
DispatcherHelper.cacheForWorld(response, (int)age);
}
</jsp:scriptlet>
<define:page name="portalsPage" application="navigation"
title="Navigation" cache="true">
<define:component name="categoryPath"
classname="com.arsdigita.navigation.ui.category.Path"/>
<define:component name="categoryMenu"
classname="com.arsdigita.navigation.ui.category.Menu"/>
<define:component name="portalWorkspace"
classname="com.arsdigita.portalworkspace.ui.WorkspaceViewer"/>
<jsp:scriptlet>
((com.arsdigita.portalworkspace.ui.WorkspaceViewer) portalWorkspace).setWorkspaceModel(new CategoryPortalSelectionModel());
</jsp:scriptlet>
</define:page>
<show:all/>
</jsp:root>

View File

@ -1,38 +0,0 @@
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:define="/WEB-INF/bebop-define.tld"
xmlns:show="/WEB-INF/bebop-show.tld"
version="1.2">
<!-- JSP template to use a portal page as index page in navigation -->
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
<jsp:directive.page import="com.arsdigita.navigation.Navigation"/>
<jsp:directive.page import="com.arsdigita.bebop.parameters.BigDecimalParameter"/>
<jsp:directive.page import="com.arsdigita.portalworkspace.ui.CategoryPortalSelectionModel"/>
<jsp:scriptlet>
long age = Navigation.getConfig().getIndexPageCacheLifetime();
if (age == 0) {
DispatcherHelper.cacheDisable(response);
} else {
DispatcherHelper.cacheForWorld(response, (int)age);
}
</jsp:scriptlet>
<define:page name="portalsPage" application="navigation"
title="Navigation" cache="true">
<define:component name="categoryPath"
classname="com.arsdigita.navigation.ui.category.Path"/>
<define:component name="categoryMenu"
classname="com.arsdigita.navigation.ui.category.Menu"/>
<define:component name="portalWorkspace"
classname="com.arsdigita.portalworkspace.ui.WorkspaceViewer"/>
<jsp:scriptlet>
((com.arsdigita.portalworkspace.ui.WorkspaceViewer) portalWorkspace).setWorkspaceModel(new CategoryPortalSelectionModel());
</jsp:scriptlet>
</define:page>
<show:all/>
</jsp:root>

View File

@ -1,56 +0,0 @@
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:define="/WEB-INF/bebop-define.tld"
xmlns:show="/WEB-INF/bebop-show.tld"
version="1.2">
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
<jsp:directive.page import="com.arsdigita.bebop.parameters.BigDecimalParameter"/>
<jsp:directive.page import="com.arsdigita.navigation.Navigation"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionDefinition"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionRenderer"/>
<jsp:scriptlet>
long age = Navigation.getConfig().getIndexPageCacheLifetime();
if (age == 0) {
DispatcherHelper.cacheDisable(response);
} else {
DispatcherHelper.cacheForWorld(response, (int)age);
}
</jsp:scriptlet>
<define:page name="recentItemPage" application="navigation"
title="Navigation" cache="true">
<define:component name="greetingItem"
classname="com.arsdigita.navigation.ui.GreetingItem"/>
<define:component name="categoryPath"
classname="com.arsdigita.navigation.ui.category.Path"/>
<define:component name="categoryMenu"
classname="com.arsdigita.navigation.ui.category.Menu"/>
<define:component name="itemList"
classname="com.arsdigita.navigation.ui.object.SimpleObjectList"/>
<jsp:scriptlet>
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).setDefinition(new CMSDataCollectionDefinition());
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).setRenderer(new CMSDataCollectionRenderer());
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getDefinition().setObjectType("com.arsdigita.cms.ContentPage");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getDefinition().setDescendCategories(false);
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getDefinition().addOrder("id");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().setPageSize(30);
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("objectType");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("title");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "definition");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "summary");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "lead");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "eventDate");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "startDate" );
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "endDate");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "newsDate");
</jsp:scriptlet>
</define:page>
<show:all/>
</jsp:root>

View File

@ -1,142 +0,0 @@
<jsp:root
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:define="/WEB-INF/bebop-define.tld"
xmlns:show="/WEB-INF/bebop-show.tld"
version="1.2">
<!-- JSP template for the welcome / start page using navigation -->
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
<jsp:directive.page import="com.arsdigita.bebop.parameters.BigDecimalParameter"/>
<jsp:directive.page import="com.arsdigita.navigation.Navigation"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionDefinition"/>
<jsp:directive.page import="com.arsdigita.navigation.cms.CMSDataCollectionRenderer"/>
<jsp:scriptlet>
long age = Navigation.getConfig().getIndexPageCacheLifetime();
if (age == 0) {
DispatcherHelper.cacheDisable(response);
} else {
DispatcherHelper.cacheForWorld(response, (int)age);
}
</jsp:scriptlet>
<define:page name="defaultItemPage" application="navigation"
title="Navigation" cache="true">
<define:component name="greetingItem"
classname="com.arsdigita.navigation.ui.GreetingItem"/>
<define:component name="categoryPath"
classname="com.arsdigita.navigation.ui.category.Path"/>
<define:component name="categoryMenu"
classname="com.arsdigita.navigation.ui.category.Menu"/>
<define:component name="itemList"
classname="com.arsdigita.navigation.ui.object.SimpleObjectList"/>
<jsp:scriptlet>
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).setDefinition(new CMSDataCollectionDefinition());
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).setRenderer(new CMSDataCollectionRenderer());
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getDefinition().setObjectType("com.arsdigita.cms.ContentPage");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getDefinition().setDescendCategories(false);
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getDefinition().addOrder("parent.categories.link.sortKey");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().setPageSize(30);
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("objectType");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute("title");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "definition");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "summary");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "lead");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "description");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "eventDate");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "startDate" );
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "endDate");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "newsDate");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "imageAttachments.caption");
((com.arsdigita.navigation.ui.object.SimpleObjectList) itemList).getRenderer().addAttribute( "imageAttachments.image.id");
</jsp:scriptlet>
<define:component name="eventList"
classname="com.arsdigita.navigation.ui.object.ComplexObjectList"/>
<jsp:scriptlet>
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).setDefinition(new CMSDataCollectionDefinition());
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).setRenderer(new CMSDataCollectionRenderer());
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getDefinition().setObjectType("com.arsdigita.cms.contenttypes.Event");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).setSQLFilter("(endDate &gt;= :today and (endTime &gt; :time or endTime is null)) or (endDate is null and startDate &gt;= :today)");
// Java ist mal wieder kompliziert. Man braucht ein Calender-Object,
// damit man Datumsarithmetik betreiben kann. java.util.Calendar ist
// allerdings abstract. Deshalb muss man java.util.GregorianCalendar
// verwenden. Dann kann man mit der add-Methode verschiedene Felder
// manipulieren. Aber Achtung - die add-Method liefert void zurueck. Daher
// kann man das nicht alles in einer Zeile machen. Also Variablen anlegen.
// Komplizierter geht's wohl nicht mehr.
java.util.GregorianCalendar now = new java.util.GregorianCalendar();
java.util.Date today = (new java.util.GregorianCalendar(now.get(java.util.GregorianCalendar.YEAR),
now.get(java.util.GregorianCalendar.MONTH),
now.get(java.util.GregorianCalendar.DATE))).getTime();
// Im Event-CT ist das Datum als SQL-Type Date eingetragen, die Uhrzeit
// aber als SQL-Typ timestamptz. Leider wird von ccm im letzten
// das Datum nicht gesetzt, so dass der Timestamp immer eine Uhrzeit am
// 1.1.1970 angibt. Das ist ziemlich bescheuert und macht hier diesen
// kompliezierten Vergleich notwendig. Sonst koennte man einfach mit dem
// aktuellen Timestamp vergleichen.
java.util.Date time = (new java.util.GregorianCalendar(70,0,1, // this is 01.01.1970 - start of UNIX timestamp
now.get(java.util.GregorianCalendar.HOUR_OF_DAY),
now.get(java.util.GregorianCalendar.MINUTE),
now.get(java.util.GregorianCalendar.SECOND))).getTime();
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).setParameter("today", today);
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).setParameter("time", time);
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getDefinition().setDescendCategories(true);
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getDefinition().addOrder("startDate");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().setPageSize(5);
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("objectType");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("title");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("lead");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("eventDate");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("launchDate");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("startDate");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute("endDate");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute( "imageAttachments.caption");
((com.arsdigita.navigation.ui.object.ComplexObjectList) eventList).getRenderer().addAttribute( "imageAttachments.image.id");
</jsp:scriptlet>
<define:component name="newsList"
classname="com.arsdigita.navigation.ui.object.ComplexObjectList"/>
<jsp:scriptlet>
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).setDefinition(new CMSDataCollectionDefinition());
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).setRenderer(new CMSDataCollectionRenderer());
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getDefinition().setObjectType("com.arsdigita.cms.contenttypes.NewsItem");
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).setSQLFilter("newsDate &gt; :oldNewsDate");
// Java ist mal wieder kompliziert. Man braucht ein Calender-Object, damit
// man Datumsarithmetik betreiben kann. java.util.Calendar ist allerdings
// abstract. Deshalb muß man java.util.GregorianCalendar verwenden. Dann
// kann man mit der add-Methode verschiedene Felder manipulieren.
// Aber Achtung - die add-Method liefert void zurück. Daher kann man das
// nicht alles in einer Zeile machen. Also Variablen anlegen.
// Komplizierter geht's wohl nicht mehr.
java.util.GregorianCalendar oldDate = new java.util.GregorianCalendar();
oldDate.add(java.util.Calendar.MONTH, -2);
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).setParameter("oldNewsDate", oldDate.getTime());
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getDefinition().setDescendCategories(true);
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getDefinition().addOrder("newsDate desc");
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getRenderer().setPageSize(5);
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getRenderer().addAttribute("objectType");
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getRenderer().addAttribute("title");
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getRenderer().addAttribute("lead");
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getRenderer().addAttribute("newsDate");
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getRenderer().addAttribute( "imageAttachments.caption");
((com.arsdigita.navigation.ui.object.ComplexObjectList) newsList).getRenderer().addAttribute( "imageAttachments.image.id");
</jsp:scriptlet>
<define:component name="assignedTerms"
classname="com.arsdigita.navigation.ui.CategoryIndexAssignedTerms"/>
</define:page>
<show:all/>
</jsp:root>

View File

@ -1,36 +0,0 @@
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:define="/WEB-INF/bebop-define.tld"
xmlns:show="/WEB-INF/bebop-show.tld"
version="1.2">
<!-- Anpassung sitemap-Seite, die auch Navigationsspalte und Breadcrumbs enthaelt. -->
<jsp:directive.page import="com.arsdigita.dispatcher.DispatcherHelper"/>
<jsp:scriptlet>
DispatcherHelper.cacheForWorld( response );
</jsp:scriptlet>
<define:page name="sitemapPage" application="navigation"
title="APLAWS" cache="true">
<jsp:scriptlet>
sitemapPage.setClassAttr("sitemapPage");
</jsp:scriptlet>
<define:component name="categoryPath"
classname="com.arsdigita.navigation.ui.category.Path"/>
<define:component name="categoryMenu"
classname="com.arsdigita.navigation.ui.category.Menu"/>
<define:component name="categoryNav"
classname="com.arsdigita.navigation.ui.category.Hierarchy">
<jsp:scriptlet>
((com.arsdigita.navigation.ui.category.Hierarchy) categoryNav).setShowItems(false);
</jsp:scriptlet>
</define:component>
</define:page>
<show:all/>
</jsp:root>