cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r148909 - in cocoon/trunk: . src/blocks/portal/WEB-INF/xconf src/blocks/portal/java/org/apache/cocoon/components/variables src/blocks/portal/java/org/apache/cocoon/environment/portlet src/blocks/portal/java/org/apache/cocoon/portal/acting src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input src/blocks/portal/java/org/apache/cocoon/portal/coplet src/blocks/portal/java/org/apache/cocoon/portal/event src/blocks/portal/java/org/apache/cocoon/portal/event/impl src/blocks/portal/java/org/apache/cocoon/portal/impl src/blocks/portal/java/org/apache/cocoon/portal/layout src/blocks/portal/java/org/apache/cocoon/portal/layout/impl src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl src/blocks/portal/java/org/apache/cocoon/portal/profile src/blocks/portal/java/org/apache/cocoon/portal/profile/impl src/blocks/portal/java/org/apache/cocoon/portal/tools src/blocks/portal/java/org/apache/cocoon/portal/tools/acting src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation src/blocks/portal/java/org/apache/cocoon/portal/tools/generation src/blocks/portal/java/org/apache/cocoon/portal/tools/helper src/blocks/portal/java/org/apache/cocoon/portal/tools/model src/blocks/portal/java/org/apache/cocoon/portal/tools/service src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement src/blocks/portal/java/org/apache/cocoon/portal/transformation src/blocks/portal/samples src/blocks/portal/samples/coplets/basket src/blocks/portal/samples/resources src/blocks/portal/samples/skins/basic/css src/blocks/portal/samples/skins/basic/images src/blocks/portal/samples/skins/basic/js src/blocks/portal/samples/skins/basic/styles src/blocks/portal/samples/skins/common/css src/blocks/portal/samples/skins/common/images src/blocks/portal/samples/skins/common/js src/blocks/portal/samples/skins/common/styles src/blocks/portal/samples/tools src/blocks/portal/samples/tools/main src/blocks/portal/samples/tools/plugins src/blocks/portal/samples/tools/plugins/copletManagement src/blocks/portal/samples/tools/plugins/copletManagement/form src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet src/blocks/portal/samples/tools/plugins/copletManagement/form/addTab src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet src/blocks/portal/samples/tools/plugins/copletManagement/i18n src/blocks/portal/samples/tools/plugins/copletManagement/jx src/blocks/portal/samples/tools/plugins/copletManagement/styles src/blocks/portal/samples/tools/plugins/default src/blocks/portal/samples/tools/plugins/default/i18n src/blocks/portal/samples/tools/plugins/userManagement src/blocks/portal/samples/tools/plugins/userManagement/form src/blocks/portal/samples/tools/plugins/userManagement/i18n src/blocks/portal/samples/tools/plugins/userManagement/stylesheets src/blocks/portal/samples/tools/plugins/userManagement/userImages src/blocks/portal/samples/tools/skins src/blocks/portal/samples/tools/skins/basic src/blocks/portal/samples/tools/skins/basic/images src/blocks/portal/samples/tools/skins/basic/styles src/blocks/portal/samples/tools/skins/common src/blocks/portal/samples/tools/skins/common/images src/blocks/portal/samples/tools/skins/common/styles
Date Fri, 28 Jan 2005 17:55:01 GMT
Author: cziegeler
Date: Fri Jan 28 09:54:58 2005
New Revision: 148909

URL: http://svn.apache.org/viewcvs?view=rev&rev=148909
Log:
   <action dev="CZ" type="add" fixes-bug="33287" due-to="Jens Maukisch" due-to-email="jmaukisch@s-und-n.de">
     Portal Block: Add portal tools framework contribution.
   </action>

Added:
   cocoon/trunk/src/blocks/portal/WEB-INF/xconf/cocoon-portal-tools.xconf   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalTool.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolBuilder.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolCatalogue.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolComponent.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolFunction.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolManager.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/acting/
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/acting/CheckAccessAction.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation/
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/generation/
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/generation/I18nCatalogueGenerator.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/MultipleRoleMatcher.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/RoleMatcher.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/SingleRoleMatcher.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/model/
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/model/User.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/ptm.js   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/service/
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/service/UserrightsService.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/CheckAccessTransformer.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/PortalToolsI18nTransformer.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/PortalToolsLayoutTransformer.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/ContextItem.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/css/forms-calendar.css   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/css/forms.css   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/images/cal.gif   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/js/
   cocoon/trunk/src/blocks/portal/samples/skins/basic/js/forms-lib.js   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/js/mattkruse-lib.js   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-advanced-field-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-calendar-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-field-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-htmlarea-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-page-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/css/forms-calendar.css   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/css/forms.css   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/images/cal.gif   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/js/
   cocoon/trunk/src/blocks/portal/samples/skins/common/js/forms-lib.js   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/js/mattkruse-lib.js   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-advanced-field-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-calendar-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-field-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-htmlarea-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-page-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-styling.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/
   cocoon/trunk/src/blocks/portal/samples/tools/auth.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/auth2.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/conf.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/flow.js   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/main/
   cocoon/trunk/src/blocks/portal/samples/tools/main/functions.jx   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/main/menu.jx   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/main/noTools.jx   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/main/tools.jx   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/flow.js   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/binding.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/form.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/template.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addTab/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addTab/form.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addTab/template.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/binding.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/form.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/template.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/binding.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/form.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/template.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement_de.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement_en.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/jx/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/jx/selectSkin.jx   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/sitemap.xmap   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/styles/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/styles/createIndex.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/tool.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages_de.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages_en.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default_de.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default_en.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/tool.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/flow.js   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_binding.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_add.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_edit.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_readonly.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_style.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_template.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement_de.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement_en.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/sitemap.xmap   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/stylesheets/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/stylesheets/convertAbstractForm.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/tool.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/userImages/
   cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/userImages/1.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/portal-bottom.xml   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/sitemap.xmap   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addCol.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addCoplet.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addRow.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addTab.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/del.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/down.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/drillDown.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/edit.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/goUp.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/left.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/right.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/tabs.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/tools.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/up.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/styles/
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/styles/function.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/styles/showTab.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/Thumbs.db   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addCol.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addCoplet.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addRow.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addTab.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/del.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/down.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/drillDown.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/edit.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/goUp.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/left.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/right.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/tabs.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/tools.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/up.jpg   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/styles/
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/styles/function.xsl   (contents, props changed)
   cocoon/trunk/src/blocks/portal/samples/tools/skins/common/styles/showTab.xsl   (contents, props changed)
Modified:
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/environment/portlet/PortletSession.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/BookmarkAction.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/CopletSetDataAction.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl/AbstractAspectalizable.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/AbstractModule.java   (props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java   (contents, props changed)
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletbasedata.xml
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletdata.xml
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletinstancedata.xml
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/CopletDataEvent.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/impl/PageLabelEventConverter.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultLinkService.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Item.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Layout.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/layout.xml
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractCompositeAspect.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/ProfileLS.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
   cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java
   cocoon/trunk/src/blocks/portal/samples/coplets/basket/sitemap.xmap
   cocoon/trunk/src/blocks/portal/samples/resources/save-user-profile.xml
   cocoon/trunk/src/blocks/portal/samples/sitemap.xmap
   cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl
   cocoon/trunk/src/blocks/portal/samples/skins/common/styles/portal-page.xsl
   cocoon/trunk/status.xml

Added: cocoon/trunk/src/blocks/portal/WEB-INF/xconf/cocoon-portal-tools.xconf
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/WEB-INF/xconf/cocoon-portal-tools.xconf?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/WEB-INF/xconf/cocoon-portal-tools.xconf	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<!--+
+    |
+    | SVN $Id$
+    +-->
+<components>
+
+  <!-- Include dependencies -->
+  <include src="context://WEB-INF/xconf/cocoon-portal.xconf"/>
+
+  <component class="org.apache.cocoon.portal.tools.PortalToolManager" 
+             role="org.apache.cocoon.portal.tools.PortalToolManager">
+	<parameter name="root" value="context://samples/blocks/portal/tools/"/>
+	<parameter name="conf" value="conf.xml"/>
+	<parameter name="auth" value="auth.xml"/>
+  </component>
+
+</components>
\ No newline at end of file

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/components/variables/DefaultVariableResolverFactory.java	Fri Jan 28 09:54:58 2005
@@ -59,7 +59,7 @@
     throws PatternException {
         if ( this.needsResolve( expression ) ) {
             return new PreparedVariableResolver( expression, this.manager, this.context);
-        } 
+        }
         return new NOPVariableResolver( expression );
     }
 

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/environment/portlet/PortletSession.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/environment/portlet/PortletSession.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/environment/portlet/PortletSession.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/environment/portlet/PortletSession.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/environment/portlet/PortletSession.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/environment/portlet/PortletSession.java	Fri Jan 28 09:54:58 2005
@@ -49,7 +49,7 @@
      * Construct a new session from an PortletSession
      */
     public PortletSession(javax.portlet.PortletSession session, int scope) {
-        this.scope = scope; 
+        this.scope = scope;
         this.session = session;
     }
 

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/BookmarkAction.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/BookmarkAction.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/BookmarkAction.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/BookmarkAction.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/BookmarkAction.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/BookmarkAction.java	Fri Jan 28 09:54:58 2005
@@ -77,14 +77,27 @@
     
     protected String historyParameterName;
     
+    protected String configurationFile;
+    
     /* (non-Javadoc)
      * @see org.apache.avalon.framework.parameters.Parameterizable#parameterize(org.apache.avalon.framework.parameters.Parameters)
      */
     public void parameterize(Parameters parameters) throws ParameterException {
         this.historyParameterName = parameters.getParameter("history-parameter-name", "history");
-        final String configurationFile = parameters.getParameter("src", null);
-        if ( configurationFile == null ) return;
+        this.configurationFile = parameters.getParameter("src", null);
+        if ( this.configurationFile == null ) return;
+        
+        // The "lazy-load" parameter allows to defer loading of the config from "src" at
+        // the first call to act. This is for now undocumented until
+        // That was needed in the case of a dynamic source ("cocoon://blah") produced by the sitemap where
+        // the action is defined. Loading immediately in that case leads to an infinite loop where the sitemap
+        // is constantly reloaded.
+        if (!parameters.getParameterAsBoolean("lazy-load", false)) {
+            loadConfig();
+        }
+    }
        
+    private void loadConfig() throws ParameterException {
         Configuration config;
         org.apache.excalibur.source.SourceResolver resolver = null;
         try {
@@ -133,7 +146,7 @@
                             mapping.path = path;  
                             this.eventMap.put(id, mapping);
                         } else {
-                           throw new ParameterException("Unknown target type " + targetType);
+                            throw new ParameterException("Unknown target type " + targetType);
                         }
                     } else if ( "fullscreen".equals(type) ) {
                         if ( this.eventMap.containsKey(id)) {
@@ -153,6 +166,9 @@
                 }
             }
         }
+        
+        // Nullify config filename so as not to reload it.
+        this.configurationFile = null;
     }
 
     public Map act(Redirector redirector,
@@ -166,6 +182,10 @@
                                    ", objectModel="+objectModel+
                                    ", source="+source+
                                    ", par="+par);
+        }
+
+        if (this.configurationFile != null) {
+            loadConfig();
         }
 
         Map result;

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/CopletSetDataAction.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/CopletSetDataAction.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/CopletSetDataAction.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/CopletSetDataAction.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/CopletSetDataAction.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/acting/CopletSetDataAction.java	Fri Jan 28 09:54:58 2005
@@ -49,7 +49,7 @@
         try {
 
             portalService = (PortalService)this.manager.lookup(PortalService.ROLE);
-            
+
             // determine coplet id
             String copletId = null;            
             Map context = (Map)objectModel.get(ObjectModelHelper.PARENT_CONTEXT);

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl/AbstractAspectalizable.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl/AbstractAspectalizable.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl/AbstractAspectalizable.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl/AbstractAspectalizable.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl/AbstractAspectalizable.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/aspect/impl/AbstractAspectalizable.java	Fri Jan 28 09:54:58 2005
@@ -59,7 +59,7 @@
     	if (this.aspectDataHandler == null) {
 	    	return this.persistentDatas;
     	}
-		return this.aspectDataHandler.getPersistentAspectDatas(this);
+        return this.aspectDataHandler.getPersistentAspectDatas(this);
     }
 
     /**

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/components/modules/input/SkinModule.java	Fri Jan 28 09:54:58 2005
@@ -31,7 +31,7 @@
 /**
  * This input module provides information about the current selected skin
  * 
- * @version CVS $Id: SkinModule.java,v 1.4 2005/01/07 10:21:46 cziegeler Exp $
+ * @version CVS $Id$
  */
 public class SkinModule 
 extends AbstractModule
@@ -90,9 +90,9 @@
             // use the global module
             if ( skinName == null ) {
                 skinName = (String)this.globalModule.getAttribute("skin", modeConf, objectModel);
-            if ( skinName == null ) {
-                skinName = "common";
-            }
+                if ( skinName == null ) {
+                    skinName = "common";
+                }
             }
             
             // find the correct skin
@@ -117,8 +117,8 @@
                         SkinDescription selected = (SkinDescription) it.next();
                         if(selected.getName().equals(selectedSkinName)) {
                             return selected.getBasePath() + "/"  + selected.getThumbnailPath(); 
-                }
-            }
+                        }
+                    }
                 }
             }
             return null;

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletbasedata.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletbasedata.xml?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletbasedata.xml&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletbasedata.xml&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletbasedata.xml	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletbasedata.xml	Fri Jan 28 09:54:58 2005
@@ -14,6 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!-- SVN $Id:$ -->
 <mapping>
 	<description>Coplet base data mapping file</description>
 

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletdata.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletdata.xml?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletdata.xml&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletdata.xml&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletdata.xml	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletdata.xml	Fri Jan 28 09:54:58 2005
@@ -14,6 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!-- SVN $Id:$ -->
 <mapping>
 	<description>Coplet data mapping file</description>
 

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletinstancedata.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletinstancedata.xml?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletinstancedata.xml&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletinstancedata.xml&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletinstancedata.xml	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/coplet/copletinstancedata.xml	Fri Jan 28 09:54:58 2005
@@ -14,6 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!-- SVN $Id:$ -->
 <mapping>
 	<description>Coplet instance data mapping file</description>
 
@@ -91,7 +92,7 @@
 	</class>
 
   <!-- If you prefer to specify the name and value as attributes of the attribute element
-  just add node="attribute" to the bind-xml elements -->
+       just add node="attribute" to the bind-xml elements -->
   <class name="org.apache.cocoon.portal.util.AttributedMapItem">
     <field name="key" type="java.lang.String">
       <bind-xml name="name"/>

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/CopletDataEvent.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/CopletDataEvent.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/CopletDataEvent.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/CopletDataEvent.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/CopletDataEvent.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/CopletDataEvent.java	Fri Jan 28 09:54:58 2005
@@ -26,6 +26,6 @@
  */
 public interface CopletDataEvent 
     extends ActionEvent {
-    
+
     // just a marker interface
 }

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/impl/PageLabelEventConverter.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/impl/PageLabelEventConverter.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/impl/PageLabelEventConverter.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/impl/PageLabelEventConverter.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/impl/PageLabelEventConverter.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/event/impl/PageLabelEventConverter.java	Fri Jan 28 09:54:58 2005
@@ -126,8 +126,8 @@
     }
 
     /* (non-Javadoc)
-     * @see org.apache.cocoon.portal.event.EventConverter#isMarshallEvents()
-     */
+    * @see org.apache.cocoon.portal.event.EventConverter#isMarshallEvents()
+    */
     public boolean isMarshallEvents() {
         return this.labelManager.isMarshallEvents();
     }

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultLinkService.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultLinkService.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultLinkService.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultLinkService.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultLinkService.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/impl/DefaultLinkService.java	Fri Jan 28 09:54:58 2005
@@ -113,10 +113,10 @@
     public boolean isSecure() {
         return ContextHelper.getRequest(this.context).isSecure();
     }
-        
+
     /* (non-Javadoc)
-    * @see org.apache.cocoon.portal.LinkService#encodeURL(String url).
-    */
+     * @see org.apache.cocoon.portal.LinkService#encodeURL(String url).
+     */
     public String encodeURL(String url) {
         return ContextHelper.getResponse(this.context).encodeURL(url);
     }

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Item.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Item.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Item.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Item.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Item.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Item.java	Fri Jan 28 09:54:58 2005
@@ -44,9 +44,9 @@
 	public final void setLayout(Layout layout) {
 		this.layout = layout;
 		if(layout != null) {
-		layout.setParent(this);
-	}
-	}
+            layout.setParent(this);
+        }
+    }
     
     public final CompositeLayout getParent() {
         return this.parentLayout;

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Layout.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Layout.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Layout.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Layout.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Layout.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/Layout.java	Fri Jan 28 09:54:58 2005
@@ -45,7 +45,7 @@
     Item getParent();
 
     void setParent(Item item);
-    
+
     /**
      * Make a copy of this layout object and of all it's children.
      * This includes copies of items and copletinstancedatas.

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/CompositeLayoutImpl.java	Fri Jan 28 09:54:58 2005
@@ -125,7 +125,7 @@
     public void setItemClassName(String value) {
         this.itemClassName = value;
     }
-    
+
     /* (non-Javadoc)
      * @see java.lang.Object#clone()
      */

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/impl/DefaultLayoutFactory.java	Fri Jan 28 09:54:58 2005
@@ -170,7 +170,7 @@
         desc.setClassName(layoutConf.getAttribute("class"));        
         desc.setCreateId(layoutConf.getAttributeAsBoolean("create-id", false));
         desc.setItemClassName(layoutConf.getAttribute("item-class", null));
-        
+
         // the renderers
         final String defaultRenderer = layoutConf.getChild("renderers").getAttribute("default");
         desc.setDefaultRendererName(defaultRenderer); 

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/layout.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/layout.xml?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/layout.xml&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/layout.xml&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/layout.xml	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/layout.xml	Fri Jan 28 09:54:58 2005
@@ -14,6 +14,7 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
+<!-- SVN $Id:$ -->
 <mapping>
   <description>Portalprofile mapping file</description>
 

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractCompositeAspect.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractCompositeAspect.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractCompositeAspect.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractCompositeAspect.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractCompositeAspect.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/AbstractCompositeAspect.java	Fri Jan 28 09:54:58 2005
@@ -85,7 +85,7 @@
             final String rendererName = layout.getRendererName();
             final Renderer renderer = service.getComponentManager().getRenderer(rendererName);
             renderer.toSAX(layout, service, handler);
-       }
+        }
     }
 
 }

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/TabContentAspect.java	Fri Jan 28 09:54:58 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2002,2004 The Apache Software Foundation.
+ * Copyright 1999-2002,2004-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@
  *   &lt;/composite&gt;
  * </pre>
  *
- * <h2>Example XML with sub-navigation:</h2>
+ * <h2>Example XML with sub-navigation (child-tag-name enabled):</h2>
  * <pre>
  *   &lt;composite&gt;
  *     &lt;named-item name="..." parameter="link-event"/&gt;
@@ -66,6 +66,23 @@
  *   &lt;/composite&gt;
  * </pre>
  *
+ *  <h2>Example XML with sub-navigation (show-all-nav without child-tag-name enabled):</h2>
+ * <pre>
+ *   &lt;composite&gt;
+ *     &lt;named-item name="..." parameter="link-event"/&gt;
+ *     &lt;named-item name="..." selected="true"&gt;
+ *       &lt;!-- output from processing layout --&gt;
+ *     &lt;/named-item&gt;
+ *     &lt;named-item name="..." parameter="link-event"/&gt;
+ *     &lt;named-item name="..." parameter="link-event"&gt;
+ *         &lt;named-item name="..." parameter="link-event"/&gt;
+ *         &lt;named-item name="..." parameter="link-event"/&gt;
+ *     &lt;/named-item&gt;
+ *   &lt;/composite&gt;
+ * </pre>
+
+ *
+ *  *
  * <h2>Applicable to:</h2>
  * <ul>
  *  <li>{@link org.apache.cocoon.portal.layout.CompositeLayout}</li>
@@ -80,9 +97,12 @@
  *  <tr><th>root-tag</th><td>Should a tag enclosing the following output be generated?</td>
  *      <td></td><td>boolean</td><td><code>true</code></td></tr>
  *  <tr><th>child-tag-name</th><td>The name of the tag to enclose named items (i.e. the subnavigation)
- * of non-selected items. If a value is not specified then no sub-navigation named items will be
- * generated.</td>
+ * of non-selected (default) items. Setting this parameter will enable show-all-nav.</td>
  *      <td></td><td>String</td><td><code>""</code></td></tr>
+ *  <tr><th>show-all-nav</th><td>Setting this value to true will output the enclosed named-items</td>
+ *      <td></td><td>boolean</td><td><code>false</code></td></tr>
+ *  <tr><th>include-selected</th><td>Setting this value to true will output the enclosed named-items of the selected tab too.</td>
+ *      <td></td><td>boolean</td><td><code>false</code></td></tr>
  * </tbody></table>
  *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
@@ -141,6 +161,11 @@
                 XMLUtils.startElement(handler, "named-item", attributes);
                 if (j == selected) {
                     this.processLayout(tab.getLayout(), service, handler);
+                    if (config.includeSelected) {
+                        List events = new ArrayList();
+                        events.add(event);
+                        this.processNav(context, tab.getLayout(), service, handler, events);
+                    }
                 } else if (config.showAllNav) {
                     List events = new ArrayList();
                     events.add(event);
@@ -207,7 +232,7 @@
                 // open named-item tag
                 attributes.clear();
                 if (tab instanceof NamedItem) {
-                    if (!subNav) {
+                    if (!subNav && !config.childTagName.equals("")) {
                         XMLUtils.startElement(handler, config.childTagName);
                         subNav = true;
                     }
@@ -250,6 +275,7 @@
         public String aspectName;
         public String store;
         public boolean showAllNav = false;
+        public boolean includeSelected = false;
         public String childTagName;
 
         public void takeValues(TabPreparedConfiguration from) {
@@ -257,6 +283,7 @@
             this.aspectName = from.aspectName;
             this.store = from.store;
             this.showAllNav = from.showAllNav;
+            this.includeSelected = from.includeSelected;
             this.childTagName = from.childTagName;
         }
     }
@@ -273,7 +300,10 @@
         pc.childTagName = configuration.getParameter("child-tag-name", "");
         if (!pc.childTagName.equals("")) {
             pc.showAllNav = true;
+        } else {
+            pc.showAllNav = configuration.getParameterAsBoolean("show-all-nav", false);
         }
+        pc.includeSelected = configuration.getParameterAsBoolean("include-selected", false);
         return pc;
     }
 

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/XSLTAspect.java	Fri Jan 28 09:54:58 2005
@@ -258,4 +258,4 @@
             this.variableFactory = null;
         }
     }
-}
+}
\ No newline at end of file

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/ProfileLS.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/ProfileLS.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/ProfileLS.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/ProfileLS.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/ProfileLS.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/ProfileLS.java	Fri Jan 28 09:54:58 2005
@@ -21,7 +21,7 @@
 
 /**
  * This component is used for loading/saving of a profile.
- * 
+ *
  * @author <a href="mailto:cziegeler@s-und-n.de">Carsten Ziegeler</a>
  * @author <a href="mailto:volker.schmitt@basf-it-services.com">Volker Schmitt</a>
  * @author <a href="mailto:bluetkemeier@s-und-n.de">Bj&ouml;rn L&uuml;tkemeier</a>

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/profile/impl/AuthenticationProfileManager.java	Fri Jan 28 09:54:58 2005
@@ -193,7 +193,7 @@
         try {
             adapter = (ProfileLS) this.manager.lookup(ProfileLS.ROLE);
             service = (PortalService) this.manager.lookup(PortalService.ROLE);
-            if (layoutKey == null) {
+            if ( layoutKey == null ) {
                 layoutKey = service.getDefaultLayoutKey();
             }
 

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalTool.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalTool.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalTool.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,122 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Represents a PortalTool
+ * 
+ * @version CVS $Id$
+ */
+public class PortalTool {
+	
+	HashMap functions = new HashMap();
+	
+	String toolName = "";
+	String toolId = "";
+	ArrayList i18n = new ArrayList();
+	
+	/**
+	 * Creates a new Portal Tool
+	 * @param toolName
+	 * @param toolId
+	 * @param functions
+	 * @param i18n
+	 */
+	public PortalTool(String toolName, String toolId, HashMap functions, ArrayList i18n) {
+	    this.toolName = toolName;
+	    this.toolId = toolId;
+	    this.functions = functions;
+	    this.i18n = i18n;
+	}
+	
+	/**
+	 * returns a collection of available function
+	 * @return
+	 */
+	public Collection getFunctions() {
+	    return functions.values();
+	}
+	
+	/**
+	 * returns the function with the id id
+	 * @param id
+	 * @return
+	 */
+	public PortalToolFunction getFunction(String id) {
+	    return (PortalToolFunction) functions.get(id); 
+	}
+	
+	/**
+	 * not in use!
+	 * @return
+	 */
+	public Collection getInternalFunctions() {
+	    ArrayList internal = new ArrayList();
+	    Collection funs = functions.values();
+	    for(Iterator it = funs.iterator(); it.hasNext(); ) {
+	        PortalToolFunction ptf = (PortalToolFunction) it.next();
+	        if(ptf.isInternal()) {
+	            internal.add(ptf);
+	        }
+	    }
+	    return internal;
+	}
+	
+	/**
+	 * return all public functions
+	 */
+	public Collection getPublicFunctions() {
+	    ArrayList publik = new ArrayList();
+	    Collection funs = functions.values();
+	    for(Iterator it = funs.iterator(); it.hasNext(); ) {
+	        PortalToolFunction ptf = (PortalToolFunction) it.next();
+	        if(!ptf.isInternal()) {
+	            publik.add(ptf);
+	        }
+	    }
+	    return publik;	    
+	}
+
+    /**
+     * returns the id of the tools
+     * @return
+     */
+    public String getId() {
+        return toolId;
+    }
+    
+    /**
+     * returns the name of the tool
+     * @return
+     */
+    public String getName() {
+        return toolName;
+    }
+    
+    /**
+     * @return
+     */
+    public List getI18n() {
+        return i18n;
+    }
+    
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolBuilder.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolBuilder.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolBuilder.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,69 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
+import org.xml.sax.SAXException;
+
+/**
+ * 
+ * @version CVS $Id$
+ */
+public class PortalToolBuilder {
+    
+    
+    public PortalTool buildTool(File confFile, String rootDir, String pluginDir, String i18nDir) {
+        PortalTool pTool = null;
+        try {
+	        DefaultConfigurationBuilder dcb = new DefaultConfigurationBuilder();
+	        Configuration conf = dcb.buildFromFile(confFile);
+	        String toolName = conf.getAttribute("name");
+	        String toolId = conf.getAttribute("id");
+	        HashMap functions = new HashMap();
+			ArrayList i18n = new ArrayList();
+			 
+			Configuration[] funcs = conf.getChild("functions").getChildren();
+			for(int i = 0; i < funcs.length; i++) {
+			    PortalToolFunction ptf = new PortalToolFunction();
+			    ptf.setName(funcs[i].getAttribute("name"));
+			    ptf.setFunction(funcs[i].getAttribute("pipeline"));
+			    ptf.setId(funcs[i].getAttribute("id"));
+			    ptf.setInternal(new Boolean(funcs[i].getAttribute("internal", "false")).booleanValue());
+			    functions.put(ptf.getName(), ptf);
+			}
+			Configuration[] i18ns = conf.getChild("i18n").getChildren();
+			for(int i = 0; i < i18ns.length; i++) {
+			    PortalToolCatalogue ptc = new PortalToolCatalogue();
+			    ptc.setId(i18ns[i].getAttribute("id"));
+			    ptc.setLocation(rootDir + pluginDir + toolId + "/" + i18nDir);
+			    ptc.setName(i18ns[i].getAttribute("name"));
+			    i18n.add(ptc);
+			}
+			pTool = new PortalTool(toolName, toolId, functions, i18n);
+        } catch (ConfigurationException ece) {
+        } catch (SAXException esax) {
+		} catch (IOException eio) {}
+		return pTool;
+    }
+   
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolCatalogue.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolCatalogue.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolCatalogue.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,70 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools;
+
+/**
+ * Represents a i18n Catalogue for a tool
+ * 
+ * @version CVS $Id$
+ */
+public class PortalToolCatalogue {
+    
+    private String id = "";
+    private String name = "";
+    private String location = "";
+
+    /**
+     * @return
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    /**
+     * @return
+     */
+    public String getLocation() {
+        return location;
+    }
+
+    /**
+     * @param location
+     */
+    public void setLocation(String location) {
+        this.location = location;
+    }
+
+    /**
+     * @return
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * @param name
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolComponent.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolComponent.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolComponent.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,47 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools;
+
+
+/**
+ * 
+ * @version CVS $Id$
+ */
+public interface PortalToolComponent {
+
+    /**
+     * Sets the id of the component
+     * @param id
+     */
+    void setId(String id);
+    
+    /**
+     * Returns the id of the component
+     * @return
+     */
+    String getId();
+    
+    /**
+     * Sets the name of the component
+     * @param name
+     */
+    void setName(String name);
+    /**
+     * Returns the name of the component
+     * @return
+     */
+    String getName();
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolFunction.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolFunction.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolFunction.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,106 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools;
+
+/**
+ * Represents a function the user can call via the ui or the ToolManager
+ * 
+ * @version CVS $Id$
+ */
+public class PortalToolFunction implements PortalToolComponent {
+	
+    // Function name (displayed to the user, maybe an i18n-key)
+    private String name ="";
+    // id to access the function
+	private String id ="";
+	// corresponding flow function
+	private String function="";
+	
+	private boolean internal = false;
+	/**
+	 * Constructor
+	 */
+	public PortalToolFunction() {}
+	
+	/**
+	 * Constructor
+	 * @param name Function-Name
+	 * @param id Id
+	 * @param function Corresponding flow functino
+	 */
+	public PortalToolFunction(String name, String id, String function) {
+		this.name = name;
+		this.id = id;
+		this.function = function;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.apache.cocoon.portal.tools.PortalToolComponent#getId()
+	 */
+	public String getId() {
+		return id;
+	}
+	/* (non-Javadoc)
+	 * @see org.apache.cocoon.portal.tools.PortalToolComponent#setId(java.lang.String)
+	 */
+	public void setId(String id) {
+		this.id = id;
+	}
+	/* (non-Javadoc)
+	 * @see org.apache.cocoon.portal.tools.PortalToolComponent#getName()
+	 */
+	public String getName() {
+		return name;
+	}
+	/* (non-Javadoc)
+	 * @see org.apache.cocoon.portal.tools.PortalToolComponent#setName(java.lang.String)
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+	/**
+	 * Returns the Functionname
+	 * @return
+	 */
+	public String getFunction() {
+		return function;
+	}
+	
+	/**
+	 * Sets the Functionname
+	 * @param path
+	 */
+	public void setFunction(String path) {
+		this.function = path;
+	}
+	
+	
+	/**
+	 * not in use!
+	 * @return
+	 */
+    public boolean isInternal() {
+        return internal;
+    }
+    
+    /**
+     * not in use!
+     * @param internal
+     */
+    public void setInternal(boolean internal) {
+        this.internal = internal;
+    }
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolManager.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolManager.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/PortalToolManager.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,321 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.avalon.framework.activity.Disposable;
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
+import org.apache.avalon.framework.configuration.DefaultConfigurationSerializer;
+import org.apache.avalon.framework.parameters.ParameterException;
+import org.apache.avalon.framework.parameters.Parameterizable;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.avalon.framework.service.Serviceable;
+import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.portal.PortalService;
+import org.apache.cocoon.portal.tools.helper.PortalObjects;
+import org.apache.cocoon.portal.tools.service.UserrightsService;
+import org.apache.cocoon.webapps.session.ContextManager;
+import org.apache.cocoon.webapps.session.context.SessionContext;
+import org.apache.excalibur.source.ModifiableSource;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceException;
+import org.apache.excalibur.source.SourceResolver;
+import org.apache.excalibur.source.SourceUtil;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Text;
+import org.xml.sax.SAXException;
+
+/**
+ * 
+ * @version CVS $Id$
+ */
+public class PortalToolManager implements ThreadSafe, Parameterizable, Serviceable, Disposable {
+	
+	public static final String ROLE = PortalToolManager.class.getName();
+		
+	private HashMap tools = new HashMap();
+
+	private ServiceManager manager;
+	
+	// parameters from the component-configuration
+	private Parameters para;
+	
+	private List i18n = new ArrayList();
+	
+	
+	private String rootDir;
+	private String confFile;
+	private String authFile;
+	private static final String pluginDir = "plugins/";
+	private static final String pluginConfFile = "tool.xml";
+	private static final String i18nDir = "i18n/";
+	
+	private Configuration configuration;
+	private UserrightsService userRightsService;
+
+    private ContextManager contextManager;
+
+    /** The source resolver */
+    protected SourceResolver resolver;
+    
+    /**
+	 * Constructor
+	 */
+	public PortalToolManager() {}
+
+	/* (non-Javadoc)
+	 * @see org.apache.avalon.framework.parameters.Parameterizable#parameterize(org.apache.avalon.framework.parameters.Parameters)
+	 */
+	public void parameterize(Parameters para) throws ParameterException {
+		this.para = para;
+		this.rootDir = para.getParameter("root", "/");
+		this.confFile = para.getParameter("conf", "conf.xml");
+		this.authFile = para.getParameter("auth", "auth.xml");
+        
+        Source fSource = null;
+		try {
+		    fSource = this.resolver.resolveURI(rootDir + confFile);
+		    DefaultConfigurationBuilder confBuilder = new DefaultConfigurationBuilder();
+		    this.configuration = confBuilder.build(fSource.getInputStream());
+		    fSource = this.resolver.resolveURI(rootDir + authFile);
+		    this.userRightsService = new UserrightsService();
+		    this.userRightsService.setLocation(fSource);
+		    this.userRightsService.initialize();
+			this.init();
+		} catch (ProcessingException e) {
+			e.printStackTrace();
+		} catch (IOException e) {
+			e.printStackTrace();
+        } catch (ConfigurationException e) {
+            e.printStackTrace();
+        } catch (SAXException e) {
+            e.printStackTrace();
+        } finally {
+            this.resolver.release(fSource);
+        }
+	}
+	
+	
+	/**
+	 * Initializes the PortalToolManager. Reads the configuration of all plugins etc.
+	 * @throws ProcessingException
+	 * @throws IOException
+	 */
+	public void init() throws ProcessingException, IOException {
+        Source toolsDir = null;
+        PortalToolBuilder builder = new PortalToolBuilder();
+        try {
+            toolsDir = this.resolver.resolveURI(rootDir + pluginDir);
+            
+            final File td = SourceUtil.getFile(toolsDir);
+            
+            if( td == null || !td.isDirectory() ) {
+                throw new ProcessingException("PortalToolManager: tool-dir must be a directory: " + toolsDir.getURI());
+            }
+            final File[] dirs = td.listFiles();
+            for(int i = 0; i< dirs.length; i++) {
+                final File f = dirs[i];
+                if (f.isDirectory()) {
+                    String path = f.getAbsolutePath().endsWith(File.separator) ? f.getAbsolutePath() : f.getAbsoluteFile() + File.separator;
+                    File conf = new File(path + pluginConfFile);
+                    if (conf.exists()) {
+                        PortalTool pTool = builder.buildTool(conf, this.rootDir, pluginDir, i18nDir);
+                        if(pTool != null) {
+	                	 	tools.put(pTool.getId(), pTool);
+	                	 	i18n.addAll(pTool.getI18n());
+                        }
+                    }
+                }
+            }            
+        } finally {
+            this.resolver.release(toolsDir);
+        }
+	}
+	
+	/**
+	 * Returns a Collection of all Tools
+	 * @return
+	 */
+	public Collection getTools() {
+		return tools.values();
+	}
+	
+	/**
+	 * Returns the tool with the id.
+	 * @param id Tool-Id
+	 * @return
+	 */
+	public PortalTool getTool(String id) {
+		return (PortalTool) tools.get(id);
+	}
+
+	/**
+	 * Returns a Collection of tools which offers functions
+	 * @return
+	 */
+	public Collection getToolsWithFunctions() {
+		ArrayList tmp = new ArrayList();
+		for(Iterator it = tools.values().iterator(); it.hasNext();) {
+			PortalTool pt;
+			if(((pt = (PortalTool) it.next())).getPublicFunctions().size() > 0)
+				tmp.add(pt);
+		}
+		return tmp;
+	}
+
+	public List getI18n() {
+	    return i18n;
+	}
+	
+    /* (non-Javadoc)
+     * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
+     */
+    public void service(ServiceManager manager) throws ServiceException {
+        this.manager = manager;
+        this.resolver = (SourceResolver)this.manager.lookup(SourceResolver.ROLE);
+        this.contextManager = (ContextManager)this.manager.lookup(ContextManager.ROLE);
+    }
+    
+    /**
+     * Returns the Configuration for the plugins
+     * @return
+     */
+    public Configuration getConfiguration() {
+        return configuration;
+    }
+    
+    /**
+     * Saves the configuration
+     */
+    public synchronized void saveConfiguration() {
+        DefaultConfigurationSerializer confSer = new DefaultConfigurationSerializer();
+        Source confSource = null;
+        try {
+        
+	        confSource = this.resolver.resolveURI(rootDir + confFile);
+            if (confSource instanceof ModifiableSource) {
+                confSer.serialize(((ModifiableSource) confSource).getOutputStream(), configuration);
+            }
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        } catch (SourceException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (ConfigurationException e) {
+            e.printStackTrace();
+        } catch (SAXException e) {
+            e.printStackTrace();
+        } finally {
+            this.resolver.release(confSource);
+        }
+    }
+    
+    public UserrightsService getUserRightsService() {
+    	return this.userRightsService;
+    }
+    
+    /**
+     * Returns a value from the auth context 
+     * @param key Path (e.g. /foo/bar)
+     * @return
+     */
+    public String sGet(String key) {
+        SessionContext ctx;
+        try {
+		    ctx = this.contextManager.getContext("authentication");
+		} catch (Exception e) {
+		    return null;
+		}
+
+        if(!key.startsWith("/"))
+    		key = "/" + key;
+    	DocumentFragment node = null;
+        try {
+            node = ctx.getXML("/portalTools" + key);
+        } catch (Exception e) {
+            // TODO
+        }
+        return org.apache.cocoon.xml.dom.DOMUtil.getValueOfNode(node);
+    }
+    
+    /**
+     * Sets a value in the auth context
+     * @param key Path (e.g. /foo/bar)
+     * @param value Value
+     */
+    public void sSet(String key, String value) {
+        SessionContext ctx;
+        try {
+            ctx = this.contextManager.getContext("authentication");
+        } catch (Exception e) {
+            return;
+        }
+
+        if(!key.startsWith("/"))
+    		key = "/" + key;
+        DocumentFragment frag;
+        try {
+            frag = ctx.getXML("/");
+            org.w3c.dom.Document doc = frag.getOwnerDocument();
+            DocumentFragment newFrag = doc.createDocumentFragment();
+            Text txt = doc.createTextNode(value);
+            newFrag.appendChild(txt);
+            ctx.setXML("/portalTools" + key, newFrag);
+        } catch (ProcessingException e) {
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.avalon.framework.activity.Disposable#dispose()
+     */
+    public void dispose() {
+        if ( this.manager != null ) {
+            this.manager.release(this.resolver);
+            this.manager.release(this.contextManager);
+            this.resolver = null;
+            this.contextManager = null;
+            this.manager = null;
+        }
+    }
+    
+    public PortalObjects getPortalObjects() {
+    	try {
+			return new PortalObjects((PortalService) this.manager.lookup(org.apache.cocoon.portal.PortalService.ROLE));
+    	} catch (ServiceException e) {
+    		return null;
+		}
+    
+    }
+    
+    public void releasePortalObjects(PortalObjects pObj) {
+    	this.manager.release(pObj.getPortalService());
+    }
+    
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/acting/CheckAccessAction.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/acting/CheckAccessAction.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/acting/CheckAccessAction.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,73 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.acting;
+
+import java.util.Map;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.acting.ServiceableAction;
+import org.apache.cocoon.environment.Redirector;
+import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.portal.tools.PortalToolManager;
+import org.apache.cocoon.portal.tools.model.User;
+import org.apache.cocoon.portal.tools.service.UserrightsService;
+
+/**
+ * Check whether the current user is allowed to access the given page.
+ * 
+ * @version CVS $Id$
+ */
+public class CheckAccessAction
+extends ServiceableAction
+implements ThreadSafe {
+    
+    /**
+     * The userrights service.
+     */
+    private UserrightsService userrightsService;
+
+    /** 
+     * Overridden from superclass.
+     * 
+     * @see org.apache.cocoon.acting.Action#act(org.apache.cocoon.environment.Redirector, org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
+     */
+    public Map act(
+        Redirector redirector,
+        SourceResolver resolver,
+        Map objectModel,
+        String source,
+        Parameters parameters)
+    throws Exception
+    {
+    	String name = parameters.getParameter("name", "anonymous");
+    	String role = parameters.getParameter("role", "guest");
+        String url = parameters.getParameter("url");
+        User user = new User(name, role);
+        PortalToolManager ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
+        userrightsService = ptm.getUserRightsService();
+        // FIXME: replace the throw with something else
+        if (!this.userrightsService.userIsAllowed(url, user)) {
+            this.manager.release(ptm);
+            throw new ProcessingException(
+                "You are not allowed to request this page.");
+        }
+        this.manager.release(ptm);
+        return EMPTY_MAP;
+    }
+
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/LayoutActions.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,347 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.copletManagement;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.forms.formmodel.Repeater;
+import org.apache.cocoon.forms.formmodel.Widget;
+import org.apache.cocoon.forms.formmodel.Repeater.RepeaterRow;
+import org.apache.cocoon.portal.coplet.CopletData;
+import org.apache.cocoon.portal.coplet.CopletFactory;
+import org.apache.cocoon.portal.coplet.CopletInstanceData;
+import org.apache.cocoon.portal.layout.CompositeLayout;
+import org.apache.cocoon.portal.layout.Item;
+import org.apache.cocoon.portal.layout.Layout;
+import org.apache.cocoon.portal.layout.LayoutFactory;
+import org.apache.cocoon.portal.layout.NamedItem;
+import org.apache.cocoon.portal.layout.impl.CopletLayout;
+import org.apache.cocoon.portal.profile.ProfileManager;
+
+/**
+ * 
+ * @version CVS $Id$
+ */
+public class LayoutActions {
+    
+    private Layout layout = null;
+    private LayoutFactory lf = null;
+    private ProfileManager pm = null;
+    private CopletFactory cf = null;
+    
+    public LayoutActions(Layout layout, LayoutFactory lf, CopletFactory cf, ProfileManager pm) {
+        this.layout = layout;
+        this.lf = lf;
+        this.pm = pm;
+        this.cf = cf;
+    }
+    
+    public static int line = 1;
+    
+    /**
+     * Delets the Object with the id in the layout
+     * @param id 
+     * @return
+     */
+	public boolean del(String id) {
+		
+		// get layout element:
+		Object layoutObj = getLayoutElement (layout, id, "", 1);
+		if (layoutObj == null) return false;
+		
+		// do the job:
+		Layout lay;
+		if (layoutObj instanceof NamedItem)
+			lay =  ((NamedItem)layoutObj).getLayout();
+		else
+			lay = (Layout) layoutObj;
+		
+		try {
+			// an empty item can not be handled by the LayoutFactory, do the job manual:
+			if (lay == null) {
+				List items = ((NamedItem)layoutObj).getParent().getItems(); 
+				for (ListIterator iter = items.listIterator(); iter.hasNext(); ) {
+					
+					Item itemElem = (Item) iter.next();
+					
+					if(itemElem.equals(((NamedItem)layoutObj))) {
+						items.remove (iter.nextIndex()-1);
+						return true;
+					}
+				}
+			} else if(lay.getParent() instanceof NamedItem) {
+				// FIXME: Causes that only the contents inside a tab are deleted instead of the tab
+			    NamedItem par = (NamedItem) lay.getParent();
+			    par.setLayout(null);
+			} else { 
+				lf.remove(lay);
+			}
+			
+		} catch (ProcessingException e) {
+			e.printStackTrace();
+		}
+		
+		return true;
+	}
+	
+	
+	/**
+	 * Moves the object one position up or down
+	 * @param id id of the element
+	 * @param moveUp set 'true', to move the element up ('false' to move it down)
+	 * @return 
+	 */
+	public boolean move(String id, boolean moveUp) {
+		
+		// get layout element:
+		Object layoutObj = getLayoutElement (layout, id, "", 1);
+		if (layoutObj == null) return false;
+		
+		// do the job:
+		Layout lay;
+		Item item;
+		if (layoutObj instanceof NamedItem) {
+			lay =  ((NamedItem)layoutObj).getLayout();
+			if (lay == null)
+				item = (NamedItem) layoutObj;
+			else
+				item = lay.getParent();
+		}
+		else {
+			lay = (Layout) layoutObj;
+			item = lay.getParent();
+		}
+		
+		// find element in the list and move it:
+		List items = item.getParent().getItems();
+		for (ListIterator iter = items.listIterator(); iter.hasNext(); ) {
+			
+			Item itemElem = (Item) iter.next();
+			
+			if(itemElem.equals(item)) {
+				
+				int pos = iter.nextIndex()-1;
+				int newpos = pos;
+				if (moveUp)
+					newpos --;
+				else
+					newpos ++;
+				
+				if (newpos >= items.size()) newpos = 0;
+				if (newpos < 0) newpos = items.size()-1;
+				
+				Object obj = items.remove (pos);
+				items.add(newpos,obj);
+				
+				return true;
+			}
+		}
+		return false;
+	}
+    
+    /**
+     * Adds the object to the layout
+     * @param parent Object to which the new Object should be added
+     * @param type Type of the Object (row, col ...)
+     */
+    public void add(String parent, String type) {
+		
+		Object layoutObj = getLayoutElement (layout, parent, "", 1);
+		if (layoutObj == null) return;
+		
+		Layout lay;
+		if (layoutObj instanceof NamedItem)
+			lay =  ((NamedItem)layoutObj).getLayout();
+		
+		else
+			lay = (Layout) layoutObj;
+		
+		try {
+			Layout nObj = lf.newInstance(type);
+			pm.register(nObj);
+			
+			Item e = new Item();
+			nObj.setParent(e);
+			e.setLayout(nObj);
+			
+			if (lay != null)
+				((CompositeLayout) lay).addItem(e);
+			else
+			{
+				NamedItem ni = (NamedItem)layoutObj;
+				nObj.setParent(ni);
+				ni.setLayout(nObj);
+			}
+			
+		} catch (ProcessingException e) {
+			e.printStackTrace();
+		}
+    }
+    
+    /**
+     * Adds a new Tab
+     * @param parent Parent Object
+     * @param name Name of the Tab
+     */
+    public void addTab(String parent, String name) {
+    	
+    	// get layout element:
+		Object layoutObj = getLayoutElement (layout, parent, "", 1);
+		if (layoutObj == null) return;
+		
+		Layout lay;
+		
+		if (layoutObj instanceof NamedItem)
+			lay =  ((NamedItem)layoutObj).getLayout();
+		else
+			lay = (Layout) layoutObj;
+		
+		// add tab:
+		if(lay != null && lay.getName().equals("tab")) {
+			
+			NamedItem tab = new NamedItem();
+			tab.setName(name);
+			((CompositeLayout) lay).addItem(tab);
+			
+		} else {
+			
+			try {
+				
+				Layout tab = lf.newInstance("tab");
+				pm.register(tab);
+				
+				NamedItem e = new NamedItem();
+				e.setName(name);
+				
+				((CompositeLayout) tab).addItem(e);
+				
+				if (lay == null) {
+					
+					((NamedItem)layoutObj).setLayout(tab);
+				}
+				else {
+					Item m = new Item();
+					m.setParent((CompositeLayout) lay);
+					((CompositeLayout) lay).addItem(m);
+					m.setLayout(tab);
+				}
+				
+			} catch (ProcessingException e) {
+				e.printStackTrace();
+			}
+		}
+    }
+    
+    public Collection getSelectedCoplets(Repeater r, Collection lets, String parent) {
+    	
+		// get layout element:
+		Object obj = getLayoutElement (layout, parent, "", 1);
+		if (obj == null) return null;
+		
+		ArrayList coplets = new ArrayList();
+		ArrayList copletDatas = new ArrayList();
+        
+		int size = r.getSize();
+		for(int i = 0; i < size; i++) {
+			RepeaterRow row = r.getRow(i);
+			Widget widget = row.getChild("selected");
+			Boolean val = (Boolean) widget.getValue();
+			if(val.booleanValue()) {
+				coplets.add(row.getChild("coplet").getValue());
+			}
+		}
+		for(Iterator it = lets.iterator(); it.hasNext();) {
+			CopletData cd = (CopletData) it.next();
+			String cdid = cd.getId();
+			for(Iterator it2 = coplets.iterator(); it2.hasNext();) {
+				String cdidTmp = (String) it2.next();
+				if(cdidTmp.equals(cdid))
+					copletDatas.add(cd);
+			}
+		}
+		
+		for(Iterator it = copletDatas.iterator(); it.hasNext();) {
+			CopletData cd = (CopletData) it.next();
+			
+			try {
+				CopletInstanceData cinst = cf.newInstance(cd);
+				CopletLayout lay = (CopletLayout) lf.newInstance("coplet");
+				lay.setCopletInstanceData(cinst);
+				
+			   if(obj instanceof Item) {
+				   Item item = (Item) obj;
+				   item.setLayout(lay);
+				   lay.setParent(item);
+			   } else if(obj instanceof CompositeLayout) {
+				   CompositeLayout cl = (CompositeLayout) obj;
+				   Item item = new Item();
+				   item.setLayout(lay);
+				   lay.setParent(item);
+				   cl.addItem(item);
+			   }
+			   
+			} catch (ProcessingException e) {}
+		}
+		return copletDatas;
+    }
+    
+    public CopletInstanceData getCopletInstanceData(String id) {
+        Object obj = getLayoutElement(layout, id, "", 1);
+        if(obj instanceof CopletLayout) {
+            return ((CopletLayout) obj).getCopletInstanceData();
+        } else {
+            return null;    
+        }
+    }
+    
+    /**
+     * interal method; search for a Layout or an Item Object
+     */
+	private Object getLayoutElement (Layout layout, String id, String prefix, int pos) {
+		
+		if (layout != null) {
+			
+			if (id.equals((prefix+pos)))
+				return layout;
+			
+			if (layout instanceof CompositeLayout) {
+				Iterator i = ((CompositeLayout) layout).getItems().iterator();
+				
+				int currentpos = pos;
+				pos = 1;
+				while (i.hasNext()) {
+					
+					Item current = (Item) i.next();
+					
+					if (id.equals((prefix+currentpos+"."+pos)))
+						return current;
+					
+					Object lay = getLayoutElement(current.getLayout(), id, prefix+currentpos+"."+pos+".",1);
+					if(lay != null)
+						return lay;
+					
+					pos ++;
+				}
+			}
+		}
+		return null;
+	}
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/copletManagement/generation/XMLProfileGenerator.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,126 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.copletManagement.generation;
+
+import java.beans.PropertyDescriptor;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.StringReader;
+import java.lang.reflect.Method;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.components.flow.FlowHelper;
+import org.apache.cocoon.components.persistence.CastorSourceConverter;
+import org.apache.cocoon.components.persistence.ConverterException;
+import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.environment.Request;
+import org.apache.cocoon.generation.ServiceableGenerator;
+import org.apache.commons.jxpath.DynamicPropertyHandler;
+import org.apache.commons.jxpath.JXPathBeanInfo;
+import org.apache.commons.jxpath.JXPathIntrospector;
+import org.apache.excalibur.xml.sax.SAXParser;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+
+/**
+ * 
+ * @version CVS $Id$
+ */
+public class XMLProfileGenerator 
+extends ServiceableGenerator {
+
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.generation.Generator#generate()
+     */
+    public void generate()
+    throws IOException, SAXException, ProcessingException {
+        
+        SAXParser parser = null;
+        CastorSourceConverter converter = null;
+        final Request request = ObjectModelHelper.getRequest(this.objectModel);
+        final Object context = FlowHelper.getContextObject(this.objectModel);
+        Map myMap = new HashMap();
+        if(context instanceof Map) {
+            myMap = (Map) context;
+        } else {
+            fillContext(context, myMap);
+        }
+        try {
+        	Object layout = myMap.get("layout");
+        	converter = (CastorSourceConverter) this.manager.lookup(org.apache.cocoon.components.persistence.CastorSourceConverter.ROLE);
+        	ByteArrayOutputStream os = new java.io.ByteArrayOutputStream();
+        	HashMap para = new HashMap();
+        	para.put("profiletype", "layout");
+        	converter.storeObject(os, para, layout);
+        	String xml = new String();
+        	xml = os.toString();
+            final InputSource inputSource = new InputSource(new StringReader(xml));
+            parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
+            parser.parse(inputSource, super.xmlConsumer);
+        } catch (ServiceException e) {
+        	throw new ProcessingException(e);
+		} catch (ConverterException e) {
+			throw new ProcessingException(e);
+		}  finally {
+            this.manager.release(parser);
+            this.manager.release(converter);
+        }
+    }
+    
+    // FIXME: Copy from JXTemplateGenerator
+    private void fillContext(Object contextObject, Map map) {
+        if (contextObject != null) {
+            // Hack: I use jxpath to populate the context object's properties
+            // in the jexl context
+            final JXPathBeanInfo bi = JXPathIntrospector.getBeanInfo(contextObject.getClass());
+            if (bi.isDynamic()) {
+                Class cl = bi.getDynamicPropertyHandlerClass();
+                try {
+                    DynamicPropertyHandler h = (DynamicPropertyHandler)cl.newInstance();
+                    String[] result = h.getPropertyNames(contextObject);
+                    int len = result.length;
+                    for (int i = 0; i < len; i++) {
+                        try {
+                            map.put(result[i], h.getProperty(contextObject, result[i]));
+                        } catch (Exception exc) {
+                            exc.printStackTrace();
+                        }
+                    }
+                } catch (Exception ignored) {
+                    ignored.printStackTrace();
+                }
+            } else {
+                PropertyDescriptor[] props =  bi.getPropertyDescriptors();
+                int len = props.length;
+                for (int i = 0; i < len; i++) {
+                    try {
+                        Method read = props[i].getReadMethod();
+                        if (read != null) {
+                            map.put(props[i].getName(), read.invoke(contextObject, null));
+                        }
+                    } catch (Exception ignored) {
+                        ignored.printStackTrace();
+                    }
+                }
+            }
+        }
+    }
+}
+

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/generation/I18nCatalogueGenerator.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/generation/I18nCatalogueGenerator.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/generation/I18nCatalogueGenerator.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,110 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.generation;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.StringReader;
+import java.net.MalformedURLException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.generation.ServiceableGenerator;
+import org.apache.cocoon.portal.tools.PortalToolCatalogue;
+import org.apache.cocoon.portal.tools.PortalToolManager;
+import org.apache.excalibur.source.Source;
+import org.apache.excalibur.xml.sax.SAXParser;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * 
+ * @version CVS $Id$
+ */
+public class I18nCatalogueGenerator extends ServiceableGenerator {
+    
+    private SAXParser parser;
+
+    private String catalogueStartTag = "<?xml version=\"1.0\"?><catalogue>";
+    private String catalogueEndTag = "</catalogue>";
+    private String lang = ".xml";
+    private PortalToolManager ptm = null;
+    private StringBuffer i18n = new StringBuffer();
+    
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.generation.Generator#generate()
+     */
+    public void generate() throws IOException, SAXException,
+            ProcessingException {
+        StringBuffer catalogue = new StringBuffer();
+        catalogue.append(catalogueStartTag).append(i18n.toString()).append(catalogueEndTag); //add pi and catalogue tags
+        final InputSource inputSource = new InputSource(new StringReader(catalogue.toString()));
+        try {
+            parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
+        } catch (ServiceException e) {
+            e.printStackTrace();
+        }
+        parser.parse(inputSource, super.xmlConsumer);
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
+     */
+    public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) 
+    					throws ProcessingException, SAXException, IOException {
+        super.setup(resolver, objectModel, src, par);
+        if(src.indexOf("_") != -1) {
+            lang = src.substring(src.indexOf("_"), src.length());
+            lang = lang.toLowerCase();
+        }
+        try {
+            ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
+            List cats = ptm.getI18n();
+            for(Iterator it = cats.iterator(); it.hasNext();) {
+                PortalToolCatalogue ptc = (PortalToolCatalogue) it.next();
+                try {
+                    Source cat;
+	                cat = resolver.resolveURI(ptc.getLocation() + ptc.getName() + lang);
+	                // if(!cat.exists()) {
+	                //    cat = resolver.resolveURI(ptc.getLocation() + ptc.getName() + ".xml"); // default file
+	                // }
+	                BufferedReader br = new BufferedReader(new InputStreamReader(cat.getInputStream()));
+	                String tmp = new String();
+	                while(br.ready()) {
+	                    tmp = tmp + br.readLine();
+	                }
+                    tmp = tmp.replaceAll("<\\?(.+)\\?>",""); // remove processing instr.
+                    tmp = tmp.replaceAll("<catalogue([^>]+)?>{1}" ,""); // remove catalogue tags
+                    tmp = tmp.replaceAll("</catalogue>", "");
+                    tmp = tmp.replaceAll("<!--(.+)-->", "");
+                    i18n.append(tmp);
+                } catch (MalformedURLException e) {
+                } catch (IOException e) {
+                }
+            }
+        } catch (ServiceException e) {
+            e.printStackTrace();
+        } 
+        
+    }
+
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/MultipleRoleMatcher.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/MultipleRoleMatcher.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/MultipleRoleMatcher.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,77 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.helper;
+
+import java.util.StringTokenizer;
+
+import org.apache.cocoon.portal.tools.model.User;
+
+/**
+ * A role matcher matching against several role.
+ * 
+ * @version CVS $Id$
+ */
+public class MultipleRoleMatcher
+implements
+    RoleMatcher
+{
+    /**
+     * The character used to seperate multiple roles.
+     */
+    public static final String ROLE_SEPARATOR = "+";
+
+    /**
+     * The role.
+     */
+    private String[] roles;
+
+    /**
+     * Creates a new MultipleRoleMatcher.
+     */
+    public MultipleRoleMatcher(String roles)
+    {
+        StringTokenizer tokenizer = new StringTokenizer(
+            roles,
+            ROLE_SEPARATOR,
+            false);
+
+        this.roles = new String[tokenizer.countTokens()];
+
+        String token;
+        int i = 0;
+        while (tokenizer.hasMoreTokens())
+        {
+            token = tokenizer.nextToken();
+            this.roles[i] = token;
+            i++;
+        }
+    }
+
+    /** 
+     * Overridden from superclass.
+     * 
+     * @see com.vodafone.veap.util.RoleMatcher#matches(com.vodafone.veap.model.User)
+     */
+    public boolean matches(User user)
+    {
+        // The user must have all roles
+        int length = this.roles.length;
+        for (int i = 0; i < length; i++)
+            if (!user.hasRole(this.roles[i]))
+                return false;
+        return true;
+    }
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/PortalObjects.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,56 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.helper;
+
+import org.apache.cocoon.portal.PortalComponentManager;
+import org.apache.cocoon.portal.PortalService;
+import org.apache.cocoon.portal.layout.Layout;
+import org.apache.cocoon.portal.profile.ProfileManager;
+
+/**
+ * 
+ * @version CVS $Id$
+ */
+public class PortalObjects {
+	
+	private PortalService portalService;
+	private String portalName;
+	private PortalComponentManager componentManager;
+	private ProfileManager profileManager;
+	private Layout portalLayout;
+	
+	
+	public PortalObjects(PortalService portalService) {
+		this.portalService = portalService;
+		this.componentManager = portalService.getComponentManager();
+		this.profileManager = componentManager.getProfileManager();
+		this.portalLayout = profileManager.getPortalLayout(null, null);
+	}
+
+
+	public PortalComponentManager getComponentManager() {
+		return componentManager;
+	}
+	public Layout getPortalLayout() {
+		return portalLayout;
+	}
+	public PortalService getPortalService() {
+		return portalService;
+	}
+	public ProfileManager getProfileManager() {
+		return profileManager;
+	}
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/RoleMatcher.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/RoleMatcher.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/RoleMatcher.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,31 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.helper;
+
+import org.apache.cocoon.portal.tools.model.User;
+
+/**
+ * Defines the interface for role matchers.
+ * 
+ * @version CVS $Id$
+ */
+public interface RoleMatcher
+{
+    /**
+     * @return Whether the user matches this role.
+     */
+    boolean matches(User user);
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/SingleRoleMatcher.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/SingleRoleMatcher.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/helper/SingleRoleMatcher.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,51 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.helper;
+
+import org.apache.cocoon.portal.tools.model.User;
+
+/**
+ * A role matcher matching against a single role.
+ * 
+ * @version CVS $Id$
+ */
+public class SingleRoleMatcher
+implements
+    RoleMatcher
+{
+    /**
+     * The role.
+     */
+    private String role;
+
+    /**
+     * Creates a new SingleRoleMatcher.
+     */
+    public SingleRoleMatcher(String role)
+    {
+        this.role = role;
+    }
+
+    /** 
+     * Overridden from superclass.
+     * 
+     * @see com.vodafone.veap.util.RoleMatcher#matches(com.vodafone.veap.model.User)
+     */
+    public boolean matches(User user)
+    {
+        return user.hasRole(this.role);
+    }
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/model/User.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/model/User.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/model/User.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,68 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+/**
+ * 
+ * @version CVS $Id$
+ */
+public class User {
+	
+    private String name;
+    private ArrayList roles = new ArrayList();
+	
+    public User(String name, String role) {
+        this.name = name;
+        this.roles.add(role);
+    }
+    
+    public User(String name, ArrayList roles) {
+        this.name = name;
+        this.roles = roles;
+    }
+
+    public User(String name, String[] roles) {
+        this.name = name;
+        for(int i = 0; i < roles.length; i++) {
+            this.roles.add(roles[i]);
+        }
+    }
+
+    
+    public String getName() {
+	    return this.name;
+	}
+    
+	public void setName(String name) {
+	    this.name = name;
+	}
+	
+	public ArrayList getRoles() {
+	    return this.roles;
+	}
+	
+    public boolean hasRole(String role) {
+        for(Iterator it = roles.iterator(); it.hasNext();) {
+            if(((String) it.next()).equals(role)) 
+                return true;
+        }
+		return false;
+	}
+
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/ptm.js
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/ptm.js?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/ptm.js	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,26 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+// SVN $ID:$
+cocoon.load("resource://org/apache/cocoon/forms/flow/javascript/Form.js");
+importPackage(Packages.org.apache.cocoon.portal);
+
+function getPTM() {
+     return cocoon.getComponent("org.apache.cocoon.portal.tools.PortalToolManager");
+}
+
+function relPTM(ptm) {
+	cocoon.releaseComponent(ptm);
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/service/UserrightsService.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/service/UserrightsService.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/service/UserrightsService.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,253 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.service;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.StringTokenizer;
+
+import org.apache.cocoon.matching.helpers.WildcardHelper;
+import org.apache.cocoon.portal.tools.helper.MultipleRoleMatcher;
+import org.apache.cocoon.portal.tools.helper.RoleMatcher;
+import org.apache.cocoon.portal.tools.helper.SingleRoleMatcher;
+import org.apache.cocoon.portal.tools.model.User;
+import org.apache.excalibur.source.Source;
+
+/**
+ * Service, that provides access to the user rights configuration.
+ * 
+ * @version CVS $Id$
+ */
+public class UserrightsService
+{
+    /** 
+     * The properties' location.
+     */
+    private Source location;
+
+    /**
+     * The properties.
+     */
+    private Properties properties = null;
+
+    /**
+     * Signals when the properties have been loaded last.
+     */
+    private long lastModified = -1;
+
+    /**
+     * Signals whether to reload the properties. 
+     */
+    private boolean reload = false;
+
+    /**
+     * Holds the userrights.
+     */
+    private Map userrights;
+
+    /**
+     * @return The location
+     */
+    
+    public Source getLocation()
+    {
+        return this.location;
+    }
+
+    /**
+     * @param location The location to set
+     */
+
+    public void setLocation(Source location)
+    {
+        this.location = location;
+    }
+
+    /**
+     * @return The reload
+     */
+    public boolean getReload()
+    {
+        return this.reload;
+    }
+
+    /**
+     * @param reload The reload to set
+     */
+    public void setReload(boolean reload)
+    {
+        this.reload = reload;
+    }
+
+    /**
+     * Initialize the bean.
+     */
+    public void initialize()
+    {
+        boolean load;
+
+        // Check if called for the first time
+        if (this.properties == null)
+            load = true;
+        else
+        {
+            // Check if reload is required
+            load = this.reload;
+        }
+
+        try
+        {
+            if (load)
+            {
+                // Check file timestamp
+                long lastModified = this.location.getLastModified();
+                if (this.lastModified >= lastModified)
+                    load = false;
+
+                if (load)
+                {
+                    this.lastModified = lastModified;
+                    this.properties = new Properties();
+                    this.properties.load(this.location.getInputStream());
+                    this.parseProperties();
+                }
+            }
+        }
+        catch (IOException e)
+        {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * @return Whether the current user is allowed to call the given url.
+     */
+    public boolean userIsAllowed(String url, User user)
+    {
+        this.initialize();
+
+        boolean isAllowed = true;
+
+        // Iterate all userrights
+        Iterator iterator = this.userrights.entrySet().iterator();
+        Map.Entry entry;
+        int[] pattern;
+        RoleMatcher[] matcher;
+        while (iterator.hasNext() && isAllowed)
+        {
+            entry = (Map.Entry)iterator.next();
+            pattern = (int[])entry.getKey();
+
+            // If userright matches try to find a matching role
+            if (WildcardHelper.match(new HashMap(), url, pattern))
+            {
+                matcher = (RoleMatcher[])entry.getValue();
+
+                isAllowed = false;
+
+                int length = matcher.length;
+                for (int i = 0; i < length; i++)
+                {
+                    if (matcher[i].matches(user))
+                        isAllowed = true;
+                }
+            }
+        }
+
+        return isAllowed;
+    }
+
+    public boolean userFunctionIsAllowed(String id, User user)
+    {
+        this.initialize();
+
+        boolean isAllowed = true;
+
+        // Iterate all userrights
+        Iterator iterator = this.userrights.entrySet().iterator();
+        Map.Entry entry;
+        int[] pattern;
+        RoleMatcher[] matcher;
+        while (iterator.hasNext() && isAllowed)
+        {
+            entry = (Map.Entry)iterator.next();
+            pattern = (int[])entry.getKey();
+
+            // If userright matches try to find a matching role
+            if (WildcardHelper.match(new HashMap(), id, pattern))
+            {
+                matcher = (RoleMatcher[])entry.getValue();
+
+                isAllowed = false;
+
+                int length = matcher.length;
+                for (int i = 0; i < length; i++)
+                {
+                    if (matcher[i].matches(user))
+                        isAllowed = true;
+                }
+            }
+        }
+
+        return isAllowed;
+    }
+
+    /**
+     * Parse the properties.
+     */
+    private void parseProperties()
+    {
+        Map userrights = new HashMap();
+
+        Iterator iterator = this.properties.entrySet().iterator();
+        Map.Entry entry;
+        while (iterator.hasNext())
+        {
+            entry = (Map.Entry)iterator.next();
+            userrights.put(
+                WildcardHelper.compilePattern((String)entry.getKey()),
+                this.buildRoles((String)entry.getValue()));
+        }
+
+        this.userrights = userrights;
+    }
+
+    /**
+     * @return A list representing the given roles.
+     */
+    private RoleMatcher[] buildRoles(String roles)
+    {
+        StringTokenizer tokenizer = new StringTokenizer(roles, ",", false);
+
+        RoleMatcher[] result = new RoleMatcher[tokenizer.countTokens()];
+
+        String token;
+        int i = 0;
+        while (tokenizer.hasMoreTokens())
+        {
+            token = tokenizer.nextToken();
+            if (token.indexOf(MultipleRoleMatcher.ROLE_SEPARATOR) == -1)
+                result[i] = new SingleRoleMatcher(token);
+            else result[i] = new MultipleRoleMatcher(token);
+            i++;
+        }
+
+        return result;
+    }
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/CheckAccessTransformer.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/CheckAccessTransformer.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/CheckAccessTransformer.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,102 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.transformation;
+
+import org.apache.avalon.framework.activity.Disposable;
+import org.apache.avalon.framework.parameters.ParameterException;
+import org.apache.avalon.framework.parameters.Parameterizable;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.cocoon.portal.tools.PortalToolManager;
+import org.apache.cocoon.portal.tools.model.User;
+import org.apache.cocoon.portal.tools.service.UserrightsService;
+import org.apache.cocoon.transformation.AbstractSAXTransformer;
+import org.apache.cocoon.xml.IncludeXMLConsumer;
+import org.w3c.dom.DocumentFragment;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+/**
+ * 
+ * @version CVS $Id$
+ */
+public class CheckAccessTransformer extends AbstractSAXTransformer implements Parameterizable, Disposable {
+
+    public static final String RIGHTS_NAMESPACE_URI =
+        "http://apache.org/cocoon/portal/tools/rights/1.0";
+    public static final String ACCESS_TAG = "access";
+    public static final String RIGHT_ID = "id";
+    
+    private UserrightsService urs;
+    private PortalToolManager ptm;
+    private User user;
+    
+    /* (non-Javadoc)
+     * @see org.apache.avalon.framework.parameters.Parameterizable#parameterize(org.apache.avalon.framework.parameters.Parameters)
+     */
+    public void parameterize(Parameters para) throws ParameterException {
+        this.user = new User(para.getParameter("user"), para.getParameter("role"));
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.transformation.AbstractSAXTransformer#service(org.apache.avalon.framework.service.ServiceManager)
+     */
+    public void service(ServiceManager manager) throws ServiceException {
+        super.service(manager);
+        ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
+        urs = ptm.getUserRightsService();
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.transformation.AbstractSAXTransformer#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
+     */
+    public void startElement(String uri, String name, String raw,
+            Attributes attr) throws SAXException {
+        if(RIGHTS_NAMESPACE_URI.equals(uri) && ACCESS_TAG.equals(name)) {
+            String id = attr.getValue(RIGHT_ID);
+            if(!urs.userIsAllowed(id, user)) {
+                this.stack.push(new Boolean(false));
+            } 
+            this.startRecording();
+        } else {
+            super.startElement(uri, name, raw, attr);
+        }
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.cocoon.transformation.AbstractSAXTransformer#endElement(java.lang.String, java.lang.String, java.lang.String)
+     */
+    public void endElement(String uri, String name, String raw)
+            throws SAXException {
+        if(RIGHTS_NAMESPACE_URI.equals(uri) && ACCESS_TAG.equals(name)) {
+            DocumentFragment frag = this.endRecording();
+            Boolean ignore = (Boolean) this.stack.pop();
+            if(!ignore.booleanValue())
+                IncludeXMLConsumer.includeNode(frag, this.contentHandler, this.lexicalHandler);
+        } else {
+            super.endElement(uri, name, raw);
+        }
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.avalon.framework.activity.Disposable#dispose()
+     */
+    public void dispose() {
+        this.manager.release(ptm);
+    }
+
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/PortalToolsI18nTransformer.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/PortalToolsI18nTransformer.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/PortalToolsI18nTransformer.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,84 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.transformation;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.avalon.framework.configuration.DefaultConfiguration;
+import org.apache.avalon.framework.configuration.DefaultConfigurationSerializer;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.cocoon.portal.tools.PortalToolCatalogue;
+import org.apache.cocoon.portal.tools.PortalToolManager;
+import org.apache.cocoon.transformation.I18nTransformer;
+import org.xml.sax.SAXException;
+
+/**
+ * 
+ * @version CVS $Id$
+ */
+public class PortalToolsI18nTransformer extends I18nTransformer {
+    
+    public static String ROLE = PortalToolsI18nTransformer.class.getName();
+    
+    public void configure(Configuration conf) throws ConfigurationException {
+      /*
+      <catalogues default="portalTools">
+                <catalogue id="portalTools" name="portalTools" location="cocoon:/i18n"/>
+      </catalogues>
+      */
+        
+        if(conf.getChild("catalogues").getAttribute("new", "no").equals("no")) {
+            super.configure(conf);
+            return;
+        }
+      DefaultConfiguration root = new DefaultConfiguration("root");
+      DefaultConfiguration defconf = new DefaultConfiguration("catalogues");
+      defconf.setAttribute("default", "default");
+      root.addChild(defconf);
+      PortalToolManager ptm;
+      try {
+          System.out.println("getting toolmananger:");
+      ptm = (PortalToolManager) this.manager.lookup(PortalToolManager.ROLE);
+      System.out.println("getting catalog list");
+      List i18nc = ptm.getI18n();
+      for(Iterator it = i18nc.iterator(); it.hasNext();) {
+          PortalToolCatalogue ptc = (PortalToolCatalogue) it.next();
+	    System.out.println("ptc: " + ptc);
+	    DefaultConfiguration catConf = new DefaultConfiguration("catalogue");
+	    catConf.setAttribute("id", ptc.getId());
+	    catConf.setAttribute("name", ptc.getName());
+	    catConf.setAttribute("location", ptc.getLocation());
+	    defconf.addChild(catConf);
+      }
+      System.out.println("conf:");
+      System.out.println(new DefaultConfigurationSerializer().serialize(conf));
+      System.out.println("new Conf:");
+      System.out.println(new DefaultConfigurationSerializer().serialize(defconf));
+      super.configure(root);
+      this.manager.release(ptm);
+      } catch (ServiceException e) {
+         e.printStackTrace();
+      } catch (ConfigurationException e) {
+                e.printStackTrace();
+      } catch (SAXException e) {
+                e.printStackTrace();
+      }
+    }
+
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/PortalToolsLayoutTransformer.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/PortalToolsLayoutTransformer.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/transformation/PortalToolsLayoutTransformer.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,137 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.transformation;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.avalon.framework.activity.Disposable;
+import org.apache.avalon.framework.parameters.ParameterException;
+import org.apache.avalon.framework.parameters.Parameters;
+import org.apache.avalon.framework.service.ServiceException;
+import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.cocoon.ProcessingException;
+import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.portal.tools.PortalTool;
+import org.apache.cocoon.portal.tools.PortalToolFunction;
+import org.apache.cocoon.portal.tools.PortalToolManager;
+import org.apache.cocoon.transformation.AbstractSAXTransformer;
+import org.apache.cocoon.xml.AttributesImpl;
+import org.xml.sax.SAXException;
+
+/**
+ * Adds the navigation etc. to the document
+ * 
+ * @version CVS $Id$
+ */
+public class PortalToolsLayoutTransformer extends AbstractSAXTransformer implements Disposable /*, Parameterizable */{
+
+	public static final String ROLE = PortalToolsLayoutTransformer.class.getName();
+	
+	private PortalToolManager pm;
+	private String selected = null;
+	public PortalToolsLayoutTransformer() {
+	}
+
+	/* (non-Javadoc)
+	 * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
+	 */
+	public void service(ServiceManager manager) throws ServiceException {
+		super.service(manager);
+		pm =  (PortalToolManager) manager.lookup(PortalToolManager.ROLE);
+	}
+
+	/* (non-Javadoc)
+     * @see org.apache.cocoon.transformation.AbstractSAXTransformer#setup(org.apache.cocoon.environment.SourceResolver, java.util.Map, java.lang.String, org.apache.avalon.framework.parameters.Parameters)
+     */
+    public void setup(SourceResolver resolver, Map objectModel, String src,
+            Parameters par) throws ProcessingException, SAXException,
+            IOException {
+        super.setup(resolver, objectModel, src, par);
+        try {
+            selected = par.getParameter("selected");
+        } catch (ParameterException e) {
+            // does not matter, default handling
+        }
+    }
+
+	/* (non-Javadoc)
+	 * @see org.apache.avalon.framework.activity.Disposable#dispose()
+	 */
+	public void dispose() {
+		this.manager.release(pm);
+	}
+	
+
+	/* (non-Javadoc)
+	 * @see org.xml.sax.ContentHandler#startDocument()
+	 */
+	public void startDocument() throws SAXException {
+		super.startDocument();
+		AttributesImpl a = new AttributesImpl();
+		
+		// took the div-tag as root, because it does not matter in the output, if it passes the xsl transformation
+		super.startPrefixMapping("i18n", "http://apache.org/cocoon/i18n/2.1");
+		super.startElement("", "div","div", a);
+		super.startElement("", "tab-layout", "tab-layout", a);
+			Collection tools = pm.getToolsWithFunctions();
+			for(Iterator it = tools.iterator(); it.hasNext();) {
+				AttributesImpl attr = new AttributesImpl();
+				PortalTool pt = (PortalTool) it.next();
+				attr.addCDATAAttribute("parameter", "tools/functions/" + pt.getId());
+				attr.addCDATAAttribute("name", pt.getName());
+				attr.addCDATAAttribute("http://apache.org/cocoon/i18n/2.1", "attr", "i18n:attr", "name");
+				if(selected != null) {
+				    if(selected.equals(pt.getId())) {
+				        attr.addCDATAAttribute("selected", "true");
+				    }
+				}
+				super.startElement("","named-item", "named-item", attr);
+				super.endElement("", "named-item", "named-item");
+			}
+		super.endElement("", "tab-layout", "tab-layout");
+		if(selected != null) {
+			PortalTool ct = pm.getTool(selected);
+			if(ct != null) {
+				super.startElement("", "tool-functions", "tool-functions", a);
+				Collection funs = ct.getFunctions();
+				for(Iterator it = funs.iterator();it.hasNext();) {
+						PortalToolFunction ptf = (PortalToolFunction) it.next();
+						AttributesImpl attr = new AttributesImpl();
+						attr.addCDATAAttribute("parameter", "tools/plugins/" + ct.getId() + "/" + ptf.getFunction());
+						attr.addCDATAAttribute("name", ptf.getName());
+						attr.addCDATAAttribute("http://apache.org/cocoon/i18n/2.1", "attr", "i18n:attr", "name");						super.startElement("", "function", "function", attr);
+						super.endElement("", "function", "function");
+				}
+				super.endElement("", "tool-functions", "tool-functions");
+			}
+	    }
+	}
+
+	
+	/* (non-Javadoc)
+	 * @see org.xml.sax.ContentHandler#endDocument()
+	 */
+	public void endDocument() throws SAXException {
+		super.endElement("", "div", "div");
+		super.endPrefixMapping("i18n");
+		selected= null;
+		super.endDocument();
+	}
+
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/ContextGrabber.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,69 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.userManagement;
+
+import org.apache.cocoon.webapps.authentication.context.AuthenticationContext;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Node;
+
+/**
+ * Grabbing the context of an user, which is set in the file sunrise-user.xml
+ * and is stored in the class AuthenticationContext.
+ * 
+ * @version CVS $Id$
+ */
+public class ContextGrabber {
+	
+	public ContextGrabber () { /* NOP */ }
+	
+	/**
+	 * Grabbing the context of the current user
+	 * 
+	 * @param context the instantiated class AuthenticationContext
+	 * @return Object of context information
+	 */
+	public UserBean grab (AuthenticationContext context)
+	{
+		UserBean ub = new UserBean ();
+		DocumentFragment df = null;
+		try {
+			df = context.getXML ("/authentication/");
+		} catch (Exception e) {}
+		
+		grabAuthContext (df.getFirstChild(),ub);
+		
+		return ub;
+	}
+	
+	private void grabAuthContext (Node node, UserBean ub){
+		
+		while (node != null){
+			
+			if (!node.getNodeName().equals("#text"))
+			{
+				if (node.getFirstChild() != null)
+				{
+					grabAuthContext  (node.getFirstChild () ,ub);
+					ub.addContext(node.getNodeName(),node.getFirstChild().getNodeValue());
+				}
+				else
+					ub.addContext(node.getNodeName(),"");
+			}
+			node = node.getNextSibling();
+		}
+	}
+	
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/ContextItem.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/ContextItem.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/ContextItem.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,46 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.userManagement;
+
+/**
+ * Capsule a key and its value of an user context 
+ * 
+ * @version CVS $Id$
+ */
+public class ContextItem {
+	
+	private String key = "";
+	private String value = "";
+	
+	public ContextItem(String key, String value){
+		this.key = key;
+		this.value = value;
+	}
+	
+	
+	public String getKey() {
+		return key;
+	}
+	public String getValue() {
+		return value;
+	}
+	public void setKey(String string) {
+		key = string;
+	}
+	public void setValue(String string) {
+		value = string;
+	}
+}

Added: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/tools/userManagement/UserBean.java	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,85 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+package org.apache.cocoon.portal.tools.userManagement;
+
+import java.util.Collection;
+import java.util.HashMap;
+
+/**
+ * Object storing information of an user context. 
+ * 
+ * @version CVS $Id$
+ */
+public class UserBean {
+	
+	private HashMap context = new HashMap ();
+	private String picture = "";
+	
+	
+    public UserBean () {}
+    
+    /**
+     * Add a single context information
+     * 
+     * @param key name of the context
+     * @param value value of the context
+     */
+    public void addContext (String key, String value){
+    	this.context.put (key, new ContextItem (key, value));
+    }
+	
+	/**
+	 * Get the whole context of the current user
+	 * 
+	 * @return Collection of the whole context
+	 */
+	public Collection getContext () {
+		return this.context.values();
+	}
+	
+	/**
+	 * return specified context value
+	 * 
+	 * @param key 
+	 * @return
+	 */
+	public String getContextItem (String key) {
+		if (this.context.get(key) != null)
+			return ((ContextItem) this.context.get(key)).getValue();
+		else
+			return "";
+	}
+	
+	/**
+	 * Special Attribute for the cocoon portal tool example:
+	 * you can store even extra attributes in the bean
+	 * 
+	 * @return name of the picture file
+	 */
+	public String getPicture() {
+		return picture;
+	}
+	
+	/**
+	 * Special Attribute for the cocoon portal tool example:
+	 * you can store even extra attributes in the bean
+	 * 
+	 * @param string name of the picture file
+	 */
+	public void setPicture(String string) {
+		picture = string;
+	}
+}

Modified: cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java&r1=148908&p2=cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java	(original)
+++ cocoon/trunk/src/blocks/portal/java/org/apache/cocoon/portal/transformation/NewEventLinkTransformer.java	Fri Jan 28 09:54:58 2005
@@ -246,7 +246,7 @@
      * @see org.apache.cocoon.transformation.AbstractSAXTransformer#endTransformingElement(String, String, String)
      */
     public void endTransformingElement(String uri, String name, String raw)
-        throws SAXException {
+    throws SAXException {
         String elementName = (String) this.stack.pop();
         contentHandler.endElement("", elementName, elementName);
     }

Modified: cocoon/trunk/src/blocks/portal/samples/coplets/basket/sitemap.xmap
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/coplets/basket/sitemap.xmap?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/samples/coplets/basket/sitemap.xmap&r1=148908&p2=cocoon/trunk/src/blocks/portal/samples/coplets/basket/sitemap.xmap&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/samples/coplets/basket/sitemap.xmap	(original)
+++ cocoon/trunk/src/blocks/portal/samples/coplets/basket/sitemap.xmap	Fri Jan 28 09:54:58 2005
@@ -234,6 +234,6 @@
         </map:act>
       </map:match>
 
-    </map:pipeline>
+  </map:pipeline>
 </map:pipelines>
 </map:sitemap>

Modified: cocoon/trunk/src/blocks/portal/samples/resources/save-user-profile.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/resources/save-user-profile.xml?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/samples/resources/save-user-profile.xml&r1=148908&p2=cocoon/trunk/src/blocks/portal/samples/resources/save-user-profile.xml&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/samples/resources/save-user-profile.xml	(original)
+++ cocoon/trunk/src/blocks/portal/samples/resources/save-user-profile.xml	Fri Jan 28 09:54:58 2005
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
-  Copyright 1999-2004 The Apache Software Foundation
+  Copyright 1999-2005 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -15,14 +15,14 @@
   limitations under the License.
 -->
 
-<!-- $Id: save-user-profile.xml,v 1.2 2004/03/06 02:26:05 antonio Exp $ 
+<!-- $Id$ 
  Description: This resource save the user profile to a file.
 
 -->
 
 <user xmlns:source="http://apache.org/cocoon/source/1.0" xmlns:session="http://apache.org/cocoon/session/1.0">
     <source:insert>
-    	<source:source>profiles/<session:getxml context="request" path="/parameter/profile"/>/<session:getxml context="request" path="/parameter/portal"/>-user-<session:getxml context="request" path="/parameter/user"/>.xml</source:source>
+    	<source:source>context://samples/blocks/portal/profiles/<session:getxml context="request" path="/parameter/profile"/>/<session:getxml context="request" path="/parameter/portal"/>-user-<session:getxml context="request" path="/parameter/user"/>.xml</source:source>
         <source:path>/</source:path>
         <source:fragment><session:getxml context="request" path="/parameter/content"/></source:fragment>
         <source:replace>*</source:replace>

Modified: cocoon/trunk/src/blocks/portal/samples/sitemap.xmap
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/sitemap.xmap?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/samples/sitemap.xmap&r1=148908&p2=cocoon/trunk/src/blocks/portal/samples/sitemap.xmap&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/samples/sitemap.xmap	(original)
+++ cocoon/trunk/src/blocks/portal/samples/sitemap.xmap	Fri Jan 28 09:54:58 2005
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
-  Copyright 1999-2004 The Apache Software Foundation
+  Copyright 1999-2005 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -72,7 +72,7 @@
       <map:action src="org.apache.cocoon.portal.acting.BookmarkAction" name="portal-bookmark">
         <parameter name="src" value="resources/bookmarks.xml"/>
       </map:action>
-    <map:action src="org.apache.cocoon.portal.acting.PreparePortalAction" name="portal-prepare"/>
+      <map:action src="org.apache.cocoon.portal.acting.PreparePortalAction" name="portal-prepare"/>
     </map:actions>
   </map:components>
 
@@ -334,6 +334,26 @@
         <!-- TODO logout page -->
         <map:redirect-to uri="login"/>
       </map:match>
+      
+      	<!-- ==== P O R T A L   T O O L S ==== -->
+	
+	<!-- mount sitemap of the portal tools -->
+	<map:match pattern="tools/**"> 
+		<map:act type="auth-protect">
+			<map:parameter name="handler" value="portal-handler"/> 
+			<map:parameter name="application" value="portal"/> 
+			
+			<map:mount uri-prefix="tools" check-reload="no" src="tools/sitemap.xmap"/>
+		</map:act>
+	</map:match>
+	
+    <!-- portal tools image reader -->
+	<map:match pattern="toolImages/*/*.jpg">
+		<map:read mime-type="image/jpg" src="tools/skins/{1}/images/{2}.jpg"/>
+	</map:match>
+	<map:match pattern="userImages/*.jpg">
+		<map:read mime-type="image/jpg" src="tools/plugins/userManagement/userImages/{1}.jpg"/>
+	</map:match>
 
       <!-- Everything else redirect to the portal -->
       <map:match pattern="**">

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/css/forms-calendar.css
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/css/forms-calendar.css?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/css/forms-calendar.css	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,92 @@
+/*
+* Copyright 1999-2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* 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.
+*/
+#forms_calendarDiv {
+    position: absolute;
+    visibility: hidden;
+    background-color: white;
+    layer-background-color: white;
+}
+
+.forms_cpYearNavigation, .forms_cpMonthNavigation {
+    background-color:#C0C0C0;
+    text-align:center;
+    vertical-align:center;
+    text-decoration:none;
+    color:#000000;
+    font-weight:bold;
+}
+  
+.forms_cpDayColumnHeader, .forms_cpYearNavigation, .forms_cpMonthNavigation, .forms_cpCurrentMonthDate, .forms_cpCurrentMonthDateDisabled, .forms_cpOtherMonthDate, .forms_cpOtherMonthDateDisabled, .forms_cpCurrentDate, .forms_cpCurrentDateDisabled, .forms_cpTodayText, .forms_cpTodayTextDisabled, .forms_cpText {
+    font-family:arial;
+    font-size:8pt;
+}
+  
+TD.forms_cpDayColumnHeader {
+    text-align:right;
+    border:solid thin #C0C0C0;
+    border-width:0 0 19 0;
+}
+  
+.forms_cpCurrentMonthDate, .forms_cpOtherMonthDate, .forms_cpCurrentDate  {
+    text-align:right;
+    text-decoration:none;
+}
+  
+.forms_cpCurrentMonthDateDisabled, .forms_cpOtherMonthDateDisabled, .forms_cpCurrentDateDisabled {
+    color:#D0D0D0;
+    text-align:right;
+    text-decoration:line-through;
+}
+  
+.forms_cpCurrentMonthDate, .forms_cpCurrentDate {
+    color:#000000;
+}
+  
+.forms_cpOtherMonthDate {
+    color:#808080;
+}
+  
+TD.forms_cpCurrentDate {
+    color:white; background-color: #C0C0C0;
+    border-width:1;
+    border:solid thin #800000;
+}
+  
+TD.forms_cpCurrentDateDisabled {
+    border-width:1;
+    border:solid thin #FFAAAA;
+}
+  
+TD.forms_cpTodayText, TD.forms_cpTodayTextDisabled {
+    border:solid thin #C0C0C0;
+    border-width:1 0 0 0;
+}
+  
+A.forms_cpTodayText, SPAN.forms_cpTodayTextDisabled {
+    height:20px;
+}
+  
+A.forms_cpTodayText {
+    color:black;
+}
+  
+.forms_cpTodayTextDisabled {
+    color:#D0D0D0;
+}
+  
+.forms_cpBorder {
+    border:solid thin #808080;
+}

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/css/forms.css
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/css/forms.css?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/css/forms.css	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,75 @@
+/*
+* Copyright 1999-2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* 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.
+*/
+.forms-tab {
+    background-color: white;
+    border: 1px solid black;
+    border-bottom-width: 0px;
+    padding: 2px 1em 2px 1em;
+    margin-right: 5px;
+    position: relative;
+    text-decoration: none;
+    top: -1px;
+    z-index: 1;
+    cursor: pointer;
+}
+
+.forms-tab.forms-activeTab {
+    font-weight: bold;
+    padding-top: 5px;
+    cursor: default;
+    z-index: 3;
+}
+
+.forms-tabContent {
+    background-color: white;
+    border: 1px solid black;
+    padding: 1em;
+    position: relative;
+    z-index: 2;
+}
+
+.forms-validation-message, a.forms-validation-message:link {
+    color: red;
+    font-weight: bold;
+}
+
+.forms-validation-errors {
+}
+
+.forms-validation-error {
+}
+
+.forms-field-required {
+	color:blue;
+    font-weight: bold;
+}
+
+.forms-help {
+    border-style: dotted;
+    border-width: 1px;
+    padding: 5px;
+    background-color:#FFFFC0; /* light yellow */
+    width: 200px; /* otherwise IE does a weird layout */
+    z-index:1000; /* must be higher than forms-tabContent */
+}
+
+.forms-doubleList select {
+    width: 150px;
+}
+
+.forms-doubleList input {
+    width: 40px;
+}

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/images/cal.gif
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/images/cal.gif?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/js/forms-lib.js
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/js/forms-lib.js?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/js/forms-lib.js	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,186 @@
+/*
+* Copyright 1999-2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* 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.
+*/
+/**
+ * Runtime JavaScript library for Cocoon forms.
+ *
+ * @author <a href="http://www.apache.org/~sylvain/">Sylvain Wallez</a>
+ * @version CVS $Id$
+ */
+
+// Handlers that are to be called in the document's "onload" event
+var forms_onloadHandlers = new Array();
+
+function forms_onload() {
+    for (var i = 0; i < forms_onloadHandlers.length; i++) {
+        forms_onloadHandlers[i].forms_onload();
+    }
+    // Clear it (we no more need them)
+    forms_onloadHandlers = null;
+}
+
+// Handlers that are to be called in form's "onsubmit" event
+//FIXME: this single var implies only one form per page, and needs to be
+//       visited if we decide to support several forms per page.
+var forms_onsubmitHandlers = new Array();
+
+function forms_onsubmit() {
+    if (forms_onsubmitHandlers == null) {
+        alert("onsubmit called twice!");
+    }
+
+    for (var i = 0; i < forms_onsubmitHandlers.length; i++) {
+        forms_onsubmitHandlers[i].forms_onsubmit();
+    }
+    // clear it
+    forms_onsubmitHandlers = null;
+}
+
+/**
+ * Submit the form containing an element, also storing in the hidden
+ * 'forms_submit_id' field the name of the element which triggered the submit.
+ */
+function forms_submitForm(element, name) {
+    if (name == undefined) {
+        name = element.name;
+    }
+    
+    var form = forms_getForm(element);
+    if (form == null) {
+        alert("Cannot find form for " + element);
+    } else {
+        form["forms_submit_id"].value = name;
+        // FIXME: programmatically submitting the form doesn't trigger onsubmit ? (both in IE and Moz)
+        forms_onsubmit();
+        form.submit();
+    }
+}
+
+/**
+ * Crawl the parents of an element up to finding a form.
+ */
+function forms_getForm(element) {
+    while(element != null && element.tagName != "FORM") {
+        element = element.parentNode;
+    }
+    return element;
+}
+
+/**
+ * Move a named element as an immediate child of the <body> element.
+ * This is required for help popups inside <wi:group> tabs. The reason is that CSS positioning
+ * properties ("left" and "top") on a block with a "position: absolute" are actually relative to
+ * the nearest ancestor that has a position of "absolute", "relative" or "fixed".
+ * See http://www.w3.org/TR/CSS21/visudet.html#containing-block-details $4
+ */
+
+function forms_moveInBody(element) {
+    element.parentNode.removeChild(element);
+    document.body.appendChild(element);
+}
+
+/**
+ * Create a popup window for a named element.
+ *
+ * @param id the ID of the element to make a popup with.
+ */
+function forms_createPopupWindow(id) {
+    var result = new PopupWindow(id);
+    result.autoHide();
+    // add to onload handlers
+    result.forms_id = id;
+    result.forms_onload = function() {
+        forms_moveInBody(document.getElementById(this.forms_id));
+    }
+    forms_onloadHandlers.push(result);
+    return result;
+}
+
+
+function forms_createOptionTransfer(id, submitOnChange) {
+    var result = new OptionTransfer(id + ".unselected", id);
+    result.setAutoSort(true);
+    // add to onload handlers
+    result.forms_id = id;
+    result.forms_onload = function() {
+        var form = forms_getForm(document.getElementById(this.forms_id));
+        this.init(form);
+        sortSelect(this.left);
+        sortSelect(this.right);
+    }
+    result.submitOnChange = submitOnChange;
+    result.forms_transferLeft = function() {
+        this.transferLeft();
+        if (this.submitOnChange) {
+            forms_submitForm(document.getElementById(this.forms_id));
+        }
+    }
+    result.forms_transferRight = function() {
+        this.transferRight();
+        if (this.submitOnChange) {
+            forms_submitForm(document.getElementById(this.forms_id));
+        }
+    }
+    result.forms_transferAllLeft = function() {
+        this.transferAllLeft();
+        if (this.submitOnChange) {
+            forms_submitForm(document.getElementById(this.forms_id));
+        }
+    };
+    result.forms_transferAllRight = function() {
+        this.transferAllRight();
+        if (this.submitOnChange) {
+            forms_submitForm(document.getElementById(this.forms_id));
+        }
+    };
+    forms_onloadHandlers.push(result);
+    
+    // add to onsubmit handlers
+    result.forms_onsubmit = function() {
+        // Select all options in the "selected" list to that
+        // its values are sent.
+        selectAllOptions(this.right);
+    }
+    forms_onsubmitHandlers.push(result);
+    return result;
+}
+
+
+/**
+ * Show a tab in a <wi:group>
+ *
+ * @param tabgroup (string) name of the <wi:group>
+ * @param idx (integer) index of the selected tab
+ * @param length (integer) total number of tabs
+ * @param state (string, optional) name of the input storing the tabgroup state
+ */
+function forms_showTab(tabgroup, idx, length, state) {
+    for (var i = 0; i < length; i++) {
+        // Change tab status (selected/unselected)
+        var tab = document.getElementById(tabgroup + "_tab_" + i);
+        if (tab != null) {
+            tab.className = (i == idx) ? 'forms-tab forms-activeTab': 'forms-tab';
+        }
+        // Change tab content visibilty
+        var tabitems = document.getElementById(tabgroup + "_items_" + i);
+        if (tabitems != null) {
+            tabitems.style.display = (i == idx) ? '' : 'none';
+        }
+    }
+    // Change state value
+    if (state.length > 0) {
+        document.forms[0][state].value = idx;
+    }
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/js/mattkruse-lib.js
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/js/mattkruse-lib.js?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/js/mattkruse-lib.js	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,124 @@
+// ===================================================================
+// Author: Matt Kruse <matt@mattkruse.com>
+// WWW: http://www.mattkruse.com/
+//
+// NOTICE: You may use this code for any purpose, commercial or
+// private, without any further permission from the author. You may
+// remove this notice from your final code if you wish, however it is
+// appreciated by the author if at least my web site address is kept.
+//
+// You may *NOT* re-distribute this code in any way except through its
+// use. That means, you can include it in your product, or your web
+// site, or any other form where the code is actually being used. You
+// may not put the plain javascript up on your site for download or
+// include it in your javascript libraries for download. 
+// If you wish to share this code with others, please just point them
+// to the URL instead.
+// Please DO NOT link directly to my .js files from your site. Copy
+// the files to your server and use them there. Thank you.
+// ===================================================================
+
+/* SOURCE FILE: selectbox.js */
+function selectUnselectMatchingOptions(obj,regex,which,only){if(window.RegExp){if(which == "select"){var selected1=true;var selected2=false;}else if(which == "unselect"){var selected1=false;var selected2=true;}else{return;}var re = new RegExp(regex);for(var i=0;i<obj.options.length;i++){if(re.test(obj.options[i].text)){obj.options[i].selected = selected1;}else{if(only == true){obj.options[i].selected = selected2;}}}}}
+function selectMatchingOptions(obj,regex){selectUnselectMatchingOptions(obj,regex,"select",false);}
+function selectOnlyMatchingOptions(obj,regex){selectUnselectMatchingOptions(obj,regex,"select",true);}
+function unSelectMatchingOptions(obj,regex){selectUnselectMatchingOptions(obj,regex,"unselect",false);}
+function sortSelect(obj){var o = new Array();if(obj.options==null){return;}for(var i=0;i<obj.options.length;i++){o[o.length] = new Option( obj.options[i].text, obj.options[i].value, obj.options[i].defaultSelected, obj.options[i].selected) ;}if(o.length==0){return;}o = o.sort(
+function(a,b){if((a.text+"") <(b.text+"")){return -1;}if((a.text+"") >(b.text+"")){return 1;}return 0;});for(var i=0;i<o.length;i++){obj.options[i] = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected);}}
+function selectAllOptions(obj){for(var i=0;i<obj.options.length;i++){obj.options[i].selected = true;}}
+function moveSelectedOptions(from,to){if(arguments.length>3){var regex = arguments[3];if(regex != ""){unSelectMatchingOptions(from,regex);}}for(var i=0;i<from.options.length;i++){var o = from.options[i];if(o.selected){to.options[to.options.length] = new Option( o.text, o.value, false, false);}}for(var i=(from.options.length-1);i>=0;i--){var o = from.options[i];if(o.selected){from.options[i] = null;}}if((arguments.length<3) ||(arguments[2]==true)){sortSelect(from);sortSelect(to);}from.selectedIndex = -1;to.selectedIndex = -1;}
+function copySelectedOptions(from,to){var options = new Object();for(var i=0;i<to.options.length;i++){options[to.options[i].text] = true;}for(var i=0;i<from.options.length;i++){var o = from.options[i];if(o.selected){if(options[o.text] == null || options[o.text] == "undefined"){to.options[to.options.length] = new Option( o.text, o.value, false, false);}}}if((arguments.length<3) ||(arguments[2]==true)){sortSelect(to);}from.selectedIndex = -1;to.selectedIndex = -1;}
+function moveAllOptions(from,to){selectAllOptions(from);if(arguments.length==2){moveSelectedOptions(from,to);}else if(arguments.length==3){moveSelectedOptions(from,to,arguments[2]);}else if(arguments.length==4){moveSelectedOptions(from,to,arguments[2],arguments[3]);}}
+function copyAllOptions(from,to){selectAllOptions(from);if(arguments.length==2){copySelectedOptions(from,to);}else if(arguments.length==3){copySelectedOptions(from,to,arguments[2]);}}
+function swapOptions(obj,i,j){var o = obj.options;var i_selected = o[i].selected;var j_selected = o[j].selected;var temp = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected);var temp2= new Option(o[j].text, o[j].value, o[j].defaultSelected, o[j].selected);o[i] = temp2;o[j] = temp;o[i].selected = j_selected;o[j].selected = i_selected;}
+function moveOptionUp(obj){var selectedCount=0;for(i=0;i<obj.options.length;i++){if(obj.options[i].selected){selectedCount++;}}if(selectedCount!=1){return;}var i = obj.selectedIndex;if(i == 0){return;}swapOptions(obj,i,i-1);obj.options[i-1].selected = true;}
+function moveOptionDown(obj){var selectedCount=0;for(i=0;i<obj.options.length;i++){if(obj.options[i].selected){selectedCount++;}}if(selectedCount != 1){return;}var i = obj.selectedIndex;if(i ==(obj.options.length-1)){return;}swapOptions(obj,i,i+1);obj.options[i+1].selected = true;}
+function removeSelectedOptions(from){for(var i=(from.options.length-1);i>=0;i--){var o=from.options[i];if(o.selected){from.options[i] = null;}}from.selectedIndex = -1;}
+
+
+/* SOURCE FILE: OptionTransfer.js */
+
+function OT_transferLeft(){moveSelectedOptions(this.right,this.left,this.autoSort);this.update();}
+function OT_transferRight(){moveSelectedOptions(this.left,this.right,this.autoSort);this.update();}
+function OT_transferAllLeft(){moveAllOptions(this.right,this.left,this.autoSort);this.update();}
+function OT_transferAllRight(){moveAllOptions(this.left,this.right,this.autoSort);this.update();}
+function OT_saveRemovedLeftOptions(f){this.removedLeftField = f;}
+function OT_saveRemovedRightOptions(f){this.removedRightField = f;}
+function OT_saveAddedLeftOptions(f){this.addedLeftField = f;}
+function OT_saveAddedRightOptions(f){this.addedRightField = f;}
+function OT_saveNewLeftOptions(f){this.newLeftField = f;}
+function OT_saveNewRightOptions(f){this.newRightField = f;}
+function OT_update(){var removedLeft = new Object();var removedRight = new Object();var addedLeft = new Object();var addedRight = new Object();var newLeft = new Object();var newRight = new Object();for(var i=0;i<this.left.options.length;i++){var o=this.left.options[i];newLeft[o.value]=1;if(typeof(this.originalLeftValues[o.value])=="undefined"){addedLeft[o.value]=1;removedRight[o.value]=1;}}for(var i=0;i<this.right.options.length;i++){var o=this.right.options[i];newRight[o.value]=1;if(typeof(this.originalRightValues[o.value])=="undefined"){addedRight[o.value]=1;removedLeft[o.value]=1;}}if(this.removedLeftField!=null){this.removedLeftField.value = OT_join(removedLeft,this.delimiter);}if(this.removedRightField!=null){this.removedRightField.value = OT_join(removedRight,this.delimiter);}if(this.addedLeftField!=null){this.addedLeftField.value = OT_join(addedLeft,this.delimiter);}if(this.addedRightField!=null){this.addedRightField.value = OT_join(addedRight,this.delimiter);}if(this.newLeftField!=null){this.newLeftField.value = OT_join(newLeft,this.delimiter);}if(this.newRightField!=null){this.newRightField.value = OT_join(newRight,this.delimiter);}}
+function OT_join(o,delimiter){var val;var str="";for(val in o){if(str.length>0){str=str+delimiter;}str=str+val;}return str;}
+function OT_setDelimiter(val){this.delimiter=val;}
+function OT_setAutoSort(val){this.autoSort=val;}
+function OT_init(theform){this.form = theform;if(!theform[this.left]){alert("OptionTransfer init(): Left select list does not exist in form!");return false;}if(!theform[this.right]){alert("OptionTransfer init(): Right select list does not exist in form!");return false;}this.left=theform[this.left];this.right=theform[this.right];for(var i=0;i<this.left.options.length;i++){this.originalLeftValues[this.left.options[i].value]=1;}for(var i=0;i<this.right.options.length;i++){this.originalRightValues[this.right.options[i].value]=1;}if(this.removedLeftField!=null){this.removedLeftField=theform[this.removedLeftField];}if(this.removedRightField!=null){this.removedRightField=theform[this.removedRightField];}if(this.addedLeftField!=null){this.addedLeftField=theform[this.addedLeftField];}if(this.addedRightField!=null){this.addedRightField=theform[this.addedRightField];}if(this.newLeftField!=null){this.newLeftField=theform[this.newLeftField];}if(this.newRightField!=null){this.newRightField=theform[this.newRightField];}this.update();}
+function OptionTransfer(l,r){this.form = null;this.left=l;this.right=r;this.autoSort=true;this.delimiter=",";this.originalLeftValues = new Object();this.originalRightValues = new Object();this.removedLeftField = null;this.removedRightField = null;this.addedLeftField = null;this.addedRightField = null;this.newLeftField = null;this.newRightField = null;this.transferLeft=OT_transferLeft;this.transferRight=OT_transferRight;this.transferAllLeft=OT_transferAllLeft;this.transferAllRight=OT_transferAllRight;this.saveRemovedLeftOptions=OT_saveRemovedLeftOptions;this.saveRemovedRightOptions=OT_saveRemovedRightOptions;this.saveAddedLeftOptions=OT_saveAddedLeftOptions;this.saveAddedRightOptions=OT_saveAddedRightOptions;this.saveNewLeftOptions=OT_saveNewLeftOptions;this.saveNewRightOptions=OT_saveNewRightOptions;this.setDelimiter=OT_setDelimiter;this.setAutoSort=OT_setAutoSort;this.init=OT_init;this.update=OT_update;}
+
+/* SOURCE FILE: date.js */
+var MONTH_NAMES=new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');var DAY_NAMES=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sun','Mon','Tue','Wed','Thu','Fri','Sat');
+function LZ(x){return(x<0||x>9?"":"0")+x}
+function isDate(val,format){var date=getDateFromFormat(val,format);if(date==0){return false;}return true;}
+function compareDates(date1,dateformat1,date2,dateformat2){var d1=getDateFromFormat(date1,dateformat1);var d2=getDateFromFormat(date2,dateformat2);if(d1==0 || d2==0){return -1;}else if(d1 > d2){return 1;}return 0;}
+function formatDate(date,format){format=format+"";var result="";var i_format=0;var c="";var token="";var y=date.getYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value=new Object();if(y.length < 4){y=""+(y-0+1900);}value["y"]=""+y;value["yyyy"]=y;value["yy"]=y.substring(2,4);value["M"]=M;value["MM"]=LZ(M);value["MMM"]=MONTH_NAMES[M-1];value["NNN"]=MONTH_NAMES[M+11];value["d"]=d;value["dd"]=LZ(d);value["E"]=DAY_NAMES[E+7];value["EE"]=DAY_NAMES[E];value["H"]=H;value["HH"]=LZ(H);if(H==0){value["h"]=12;}else if(H>12){value["h"]=H-12;}else{value["h"]=H;}value["hh"]=LZ(value["h"]);if(H>11){value["K"]=H-12;}else{value["K"]=H;}value["k"]=H+1;value["KK"]=LZ(value["K"]);value["kk"]=LZ(value["k"]);if(H > 11){value["a"]="PM";}else{value["a"]="AM";}value["m"]=m;value["mm"]=LZ(m);value["s"]=s;value["ss"]=LZ(s);while(i_format < format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c) &&(i_format < format.length)){token += format.charAt(i_format++);}if(value[token] != null){result=result + value[token];}else{result=result + token;}}return result;}
+function _isInteger(val){var digits="1234567890";for(var i=0;i < val.length;i++){if(digits.indexOf(val.charAt(i))==-1){return false;}}return true;}
+function _getInt(str,i,minlength,maxlength){for(var x=maxlength;x>=minlength;x--){var token=str.substring(i,i+x);if(token.length < minlength){return null;}if(_isInteger(token)){return token;}}return null;}
+function getDateFromFormat(val,format){val=val+"";format=format+"";var i_val=0;var i_format=0;var c="";var token="";var token2="";var x,y;var now=new Date();var year=now.getYear();var month=now.getMonth()+1;var date=1;var hh=now.getHours();var mm=now.getMinutes();var ss=now.getSeconds();var ampm="";while(i_format < format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c) &&(i_format < format.length)){token += format.charAt(i_format++);}if(token=="yyyy" || token=="yy" || token=="y"){if(token=="yyyy"){x=4;y=4;}if(token=="yy"){x=2;y=2;}if(token=="y"){x=2;y=4;}year=_getInt(val,i_val,x,y);if(year==null){return 0;}i_val += year.length;if(year.length==2){if(year > 70){year=1900+(year-0);}else{year=2000+(year-0);}}}else if(token=="MMM"||token=="NNN"){month=0;for(var i=0;i<MONTH_NAMES.length;i++){var month_name=MONTH_NAMES[i];if(val.substring(i_val,i_val+month_name.length).toLowerCase()==month_name.toLowerCase()){if(token=="MMM"||(token=="NNN"&&i>11)){month=i+1;if(month>12){month -= 12;}i_val += month_name.length;break;}}}if((month < 1)||(month>12)){return 0;}}else if(token=="EE"||token=="E"){for(var i=0;i<DAY_NAMES.length;i++){var day_name=DAY_NAMES[i];if(val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()){i_val += day_name.length;break;}}}else if(token=="MM"||token=="M"){month=_getInt(val,i_val,token.length,2);if(month==null||(month<1)||(month>12)){return 0;}i_val+=month.length;}else if(token=="dd"||token=="d"){date=_getInt(val,i_val,token.length,2);if(date==null||(date<1)||(date>31)){return 0;}i_val+=date.length;}else if(token=="hh"||token=="h"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<1)||(hh>12)){return 0;}i_val+=hh.length;}else if(token=="HH"||token=="H"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<0)||(hh>23)){return 0;}i_val+=hh.length;}else if(token=="KK"||token=="K"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<0)||(hh>11)){return 0;}i_val+=hh.length;}else if(token=="kk"||token=="k"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<1)||(hh>24)){return 0;}i_val+=hh.length;hh--;}else if(token=="mm"||token=="m"){mm=_getInt(val,i_val,token.length,2);if(mm==null||(mm<0)||(mm>59)){return 0;}i_val+=mm.length;}else if(token=="ss"||token=="s"){ss=_getInt(val,i_val,token.length,2);if(ss==null||(ss<0)||(ss>59)){return 0;}i_val+=ss.length;}else if(token=="a"){if(val.substring(i_val,i_val+2).toLowerCase()=="am"){ampm="AM";}else if(val.substring(i_val,i_val+2).toLowerCase()=="pm"){ampm="PM";}else{return 0;}i_val+=2;}else{if(val.substring(i_val,i_val+token.length)!=token){return 0;}else{i_val+=token.length;}}}if(i_val != val.length){return 0;}if(month==2){if( ((year%4==0)&&(year%100 != 0) ) ||(year%400==0) ){if(date > 29){return 0;}}else{if(date > 28){return 0;}}}if((month==4)||(month==6)||(month==9)||(month==11)){if(date > 30){return 0;}}if(hh<12 && ampm=="PM"){hh=hh-0+12;}else if(hh>11 && ampm=="AM"){hh-=12;}var newdate=new Date(year,month-1,date,hh,mm,ss);return newdate.getTime();}
+function parseDate(val){var preferEuro=(arguments.length==2)?arguments[1]:false;generalFormats=new Array('y-M-d','MMM d, y','MMM d,y','y-MMM-d','d-MMM-y','MMM d');monthFirst=new Array('M/d/y','M-d-y','M.d.y','MMM-d','M/d','M-d');dateFirst =new Array('d/M/y','d-M-y','d.M.y','d-MMM','d/M','d-M');var checkList=new Array('generalFormats',preferEuro?'dateFirst':'monthFirst',preferEuro?'monthFirst':'dateFirst');var d=null;for(var i=0;i<checkList.length;i++){var l=window[checkList[i]];for(var j=0;j<l.length;j++){d=getDateFromFormat(val,l[j]);if(d!=0){return new Date(d);}}}return null;}
+
+/* SOURCE FILE: AnchorPosition.js */
+function getAnchorPosition(anchorname){var useWindow=false;var coordinates=new Object();var x=0,y=0;var use_gebi=false, use_css=false, use_layers=false;if(document.getElementById){use_gebi=true;}else if(document.all){use_css=true;}else if(document.layers){use_layers=true;}if(use_gebi && document.all){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else if(use_gebi){var o=document.getElementById(anchorname);x=AnchorPosition_getPageOffsetLeft(o);y=AnchorPosition_getPageOffsetTop(o);}else if(use_css){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else if(use_layers){var found=0;for(var i=0;i<document.anchors.length;i++){if(document.anchors[i].name==anchorname){found=1;break;}}if(found==0){coordinates.x=0;coordinates.y=0;return coordinates;}x=document.anchors[i].x;y=document.anchors[i].y;}else{coordinates.x=0;coordinates.y=0;return coordinates;}coordinates.x=x;coordinates.y=y;return coordinates;}
+function getAnchorWindowPosition(anchorname){var coordinates=getAnchorPosition(anchorname);var x=0;var y=0;if(document.getElementById){if(isNaN(window.screenX)){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop;}else{x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}}else if(document.all){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop;}else if(document.layers){x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}coordinates.x=x;coordinates.y=y;return coordinates;}
+function AnchorPosition_getPageOffsetLeft(el){var ol=el.offsetLeft;while((el=el.offsetParent) != null){ol += el.offsetLeft;}return ol;}
+function AnchorPosition_getWindowOffsetLeft(el){return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;}
+function AnchorPosition_getPageOffsetTop(el){var ot=el.offsetTop;while((el=el.offsetParent) != null){ot += el.offsetTop;}return ot;}
+function AnchorPosition_getWindowOffsetTop(el){return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;}
+
+/* SOURCE FILE: PopupWindow.js */
+function PopupWindow_getXYPosition(anchorname){var coordinates;if(this.type == "WINDOW"){coordinates = getAnchorWindowPosition(anchorname);}else{coordinates = getAnchorPosition(anchorname);}this.x = coordinates.x;this.y = coordinates.y;}
+function PopupWindow_setSize(width,height){this.width = width;this.height = height;}
+function PopupWindow_populate(contents){this.contents = contents;this.populated = false;}
+function PopupWindow_setUrl(url){this.url = url;}
+function PopupWindow_setWindowProperties(props){this.windowProperties = props;}
+function PopupWindow_refresh(){if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).innerHTML = this.contents;}else if(this.use_css){document.all[this.divName].innerHTML = this.contents;}else if(this.use_layers){var d = document.layers[this.divName];d.document.open();d.document.writeln(this.contents);d.document.close();}}else{if(this.popupWindow != null && !this.popupWindow.closed){if(this.url!=""){this.popupWindow.location.href=this.url;}else{this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);this.popupWindow.document.close();}this.popupWindow.focus();}}}
+function PopupWindow_showPopup(anchorname){this.getXYPosition(anchorname);this.x += this.offsetX;this.y += this.offsetY;if(!this.populated &&(this.contents != "")){this.populated = true;this.refresh();}if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).style.left = this.x;document.getElementById(this.divName).style.top = this.y;document.getElementById(this.divName).style.visibility = "visible";}else if(this.use_css){document.all[this.divName].style.left = this.x;document.all[this.divName].style.top = this.y;document.all[this.divName].style.visibility = "visible";}else if(this.use_layers){document.layers[this.divName].left = this.x;document.layers[this.divName].top = this.y;document.layers[this.divName].visibility = "visible";}}else{if(this.popupWindow == null || this.popupWindow.closed){if(this.x<0){this.x=0;}if(this.y<0){this.y=0;}if(screen && screen.availHeight){if((this.y + this.height) > screen.availHeight){this.y = screen.availHeight - this.height;}}if(screen && screen.availWidth){if((this.x + this.width) > screen.availWidth){this.x = screen.availWidth - this.width;}}var avoidAboutBlank = window.opera ||( document.layers && !navigator.mimeTypes['*']) || navigator.vendor == 'KDE' ||( document.childNodes && !document.all && !navigator.taintEnabled);this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");}this.refresh();}}
+function PopupWindow_hidePopup(){if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).style.visibility = "hidden";}else if(this.use_css){document.all[this.divName].style.visibility = "hidden";}else if(this.use_layers){document.layers[this.divName].visibility = "hidden";}}else{if(this.popupWindow && !this.popupWindow.closed){this.popupWindow.close();this.popupWindow = null;}}}
+function PopupWindow_isClicked(e){if(this.divName != null){if(this.use_layers){var clickX = e.pageX;var clickY = e.pageY;var t = document.layers[this.divName];if((clickX > t.left) &&(clickX < t.left+t.clip.width) &&(clickY > t.top) &&(clickY < t.top+t.clip.height)){return true;}else{return false;}}else if(document.all){var t = window.event.srcElement;while(t.parentElement != null){if(t.id==this.divName){return true;}t = t.parentElement;}return false;}else if(this.use_gebi){var t = e.originalTarget;while(t.parentNode != null){if(t.id==this.divName){return true;}t = t.parentNode;}return false;}return false;}return false;}
+function PopupWindow_hideIfNotClicked(e){if(this.autoHideEnabled && !this.isClicked(e)){this.hidePopup();}}
+function PopupWindow_autoHide(){this.autoHideEnabled = true;}
+function PopupWindow_hidePopupWindows(e){for(var i=0;i<popupWindowObjects.length;i++){if(popupWindowObjects[i] != null){var p = popupWindowObjects[i];p.hideIfNotClicked(e);}}}
+function PopupWindow_attachListener(){if(document.layers){document.captureEvents(Event.MOUSEUP);}window.popupWindowOldEventListener = document.onmouseup;if(window.popupWindowOldEventListener != null){document.onmouseup = new Function("window.popupWindowOldEventListener();PopupWindow_hidePopupWindows();");}else{document.onmouseup = PopupWindow_hidePopupWindows;}}
+function PopupWindow(){if(!window.popupWindowIndex){window.popupWindowIndex = 0;}if(!window.popupWindowObjects){window.popupWindowObjects = new Array();}if(!window.listenerAttached){window.listenerAttached = true;PopupWindow_attachListener();}this.index = popupWindowIndex++;popupWindowObjects[this.index] = this;this.divName = null;this.popupWindow = null;this.width=0;this.height=0;this.populated = false;this.visible = false;this.autoHideEnabled = false;this.contents = "";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";if(arguments.length>0){this.type="DIV";this.divName = arguments[0];}else{this.type="WINDOW";}this.use_gebi = false;this.use_css = false;this.use_layers = false;if(document.getElementById){this.use_gebi = true;}else if(document.all){this.use_css = true;}else if(document.layers){this.use_layers = true;}else{this.type = "WINDOW";}this.offsetX = 0;this.offsetY = 0;this.getXYPosition = PopupWindow_getXYPosition;this.populate = PopupWindow_populate;this.setUrl = PopupWindow_setUrl;this.setWindowProperties = PopupWindow_setWindowProperties;this.refresh = PopupWindow_refresh;this.showPopup = PopupWindow_showPopup;this.hidePopup = PopupWindow_hidePopup;this.setSize = PopupWindow_setSize;this.isClicked = PopupWindow_isClicked;this.autoHide = PopupWindow_autoHide;this.hideIfNotClicked = PopupWindow_hideIfNotClicked;}
+
+
+/* SOURCE FILE: CalendarPopup.js */
+
+function CalendarPopup(){var c;if(arguments.length>0){c = new PopupWindow(arguments[0]);}else{c = new PopupWindow();c.setSize(150,175);}c.offsetX = -152;c.offsetY = 25;c.autoHide();c.monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");c.monthAbbreviations = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");c.dayHeaders = new Array("S","M","T","W","T","F","S");c.returnFunction = "CP_tmpReturnFunction";c.returnMonthFunction = "CP_tmpReturnMonthFunction";c.returnQuarterFunction = "CP_tmpReturnQuarterFunction";c.returnYearFunction = "CP_tmpReturnYearFunction";c.weekStartDay = 0;c.isShowYearNavigation = false;c.displayType = "date";c.disabledWeekDays = new Object();c.disabledDatesExpression = "";c.yearSelectStartOffset = 2;c.currentDate = null;c.todayText="Today";c.cssPrefix="";c.isShowYearNavigationInput=false;window.CP_targetInput = null;window.CP_dateFormat = "MM/dd/yyyy";c.setReturnFunction = CP_setReturnFunction;c.setReturnMonthFunction = CP_setReturnMonthFunction;c.setReturnQuarterFunction = CP_setReturnQuarterFunction;c.setReturnYearFunction = CP_setReturnYearFunction;c.setMonthNames = CP_setMonthNames;c.setMonthAbbreviations = CP_setMonthAbbreviations;c.setDayHeaders = CP_setDayHeaders;c.setWeekStartDay = CP_setWeekStartDay;c.setDisplayType = CP_setDisplayType;c.setDisabledWeekDays = CP_setDisabledWeekDays;c.addDisabledDates = CP_addDisabledDates;c.setYearSelectStartOffset = CP_setYearSelectStartOffset;c.setTodayText = CP_setTodayText;c.showYearNavigation = CP_showYearNavigation;c.showCalendar = CP_showCalendar;c.hideCalendar = CP_hideCalendar;c.getStyles = getCalendarStyles;c.refreshCalendar = CP_refreshCalendar;c.getCalendar = CP_getCalendar;c.select = CP_select;c.setCssPrefix = CP_setCssPrefix;c.showYearNavigationInput = CP_showYearNavigationInput
+return c;}
+function CP_tmpReturnFunction(y,m,d){if(window.CP_targetInput!=null){var dt = new Date(y,m-1,d,0,0,0);window.CP_targetInput.value = formatDate(dt,window.CP_dateFormat);}else{alert('Use setReturnFunction() to define which function will get the clicked results!');}}
+function CP_tmpReturnMonthFunction(y,m){alert('Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , month='+m);}
+function CP_tmpReturnQuarterFunction(y,q){alert('Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , quarter='+q);}
+function CP_tmpReturnYearFunction(y){alert('Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year='+y);}
+function CP_setReturnFunction(name){this.returnFunction = name;}
+function CP_setReturnMonthFunction(name){this.returnMonthFunction = name;}
+function CP_setReturnQuarterFunction(name){this.returnQuarterFunction = name;}
+function CP_setReturnYearFunction(name){this.returnYearFunction = name;}
+function CP_setMonthNames(){for(var i=0;i<arguments.length;i++){this.monthNames[i] = arguments[i];}}
+function CP_setMonthAbbreviations(){for(var i=0;i<arguments.length;i++){this.monthAbbreviations[i] = arguments[i];}}
+function CP_setDayHeaders(){for(var i=0;i<arguments.length;i++){this.dayHeaders[i] = arguments[i];}}
+function CP_setWeekStartDay(day){this.weekStartDay = day;}
+function CP_showYearNavigation(){this.isShowYearNavigation =(arguments.length>0)?arguments[0]:true;}
+function CP_setDisplayType(type){if(type!="date"&&type!="week-end"&&type!="month"&&type!="quarter"&&type!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false;}this.displayType=type;}
+function CP_setYearSelectStartOffset(num){this.yearSelectStartOffset=num;}
+function CP_setDisabledWeekDays(){this.disabledWeekDays = new Object();for(var i=0;i<arguments.length;i++){this.disabledWeekDays[arguments[i]] = true;}}
+function CP_addDisabledDates(start, end){if(arguments.length==1){end=start;}if(start==null && end==null){return;}if(this.disabledDatesExpression!=""){this.disabledDatesExpression+= "||";}if(start!=null){start = parseDate(start);start=""+start.getFullYear()+LZ(start.getMonth()+1)+LZ(start.getDate());}if(end!=null){end=parseDate(end);end=""+end.getFullYear()+LZ(end.getMonth()+1)+LZ(end.getDate());}if(start==null){this.disabledDatesExpression+="(ds<="+end+")";}else if(end  ==null){this.disabledDatesExpression+="(ds>="+start+")";}else{this.disabledDatesExpression+="(ds>="+start+"&&ds<="+end+")";}}
+function CP_setTodayText(text){this.todayText = text;}
+function CP_setCssPrefix(val){this.cssPrefix = val;}
+function CP_showYearNavigationInput(){this.isShowYearNavigationInput =(arguments.length>0)?arguments[0]:true;}
+function CP_hideCalendar(){if(arguments.length > 0){window.popupWindowObjects[arguments[0]].hidePopup();}else{this.hidePopup();}}
+function CP_refreshCalendar(index){var calObject = window.popupWindowObjects[index];if(arguments.length>1){calObject.populate(calObject.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));}else{calObject.populate(calObject.getCalendar());}calObject.refresh();}
+function CP_showCalendar(anchorname){if(arguments.length>1){if(arguments[1]==null||arguments[1]==""){this.currentDate=new Date();}else{this.currentDate=new Date(parseDate(arguments[1]));}}this.populate(this.getCalendar());this.showPopup(anchorname);}
+function CP_select(inputobj, linkname, format){var selectedDate=(arguments.length>3)?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return;}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return;}if(inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CP_targetInput=null;return;}window.CP_targetInput = inputobj;this.currentDate=null;var time=0;if(selectedDate!=null){time = getDateFromFormat(selectedDate,format)}else if(inputobj.value!=""){time = getDateFromFormat(inputobj.value,format);}if(selectedDate!=null || inputobj.value!=""){if(time==0){this.currentDate=null;}else{this.currentDate=new Date(time);}}window.CP_dateFormat = format;this.showCalendar(linkname);}
+function getCalendarStyles(){var result = "";var p = "";if(this!=null && typeof(this.cssPrefix)!="undefined" && this.cssPrefix!=null && this.cssPrefix!=""){p=this.cssPrefix;}result += "<STYLE>\n";result += "."+p+"cpYearNavigation,."+p+"cpMonthNavigation{background-color:#C0C0C0;text-align:center;vertical-align:center;text-decoration:none;color:#000000;font-weight:bold;}\n";result += "."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+p+"cpMonthNavigation,."+p+"cpCurrentMonthDate,."+p+"cpCurrentMonthDateDisabled,."+p+"cpOtherMonthDate,."+p+"cpOtherMonthDateDisabled,."+p+"cpCurrentDate,."+p+"cpCurrentDateDisabled,."+p+"cpTodayText,."+p+"cpTodayTextDisabled,."+p+"cpText{font-family:arial;font-size:8pt;}\n";result += "TD."+p+"cpDayColumnHeader{text-align:right;border:solid thin #C0C0C0;border-width:0 0 1 0;}\n";result += "."+p+"cpCurrentMonthDate, ."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate{text-align:right;text-decoration:none;}\n";result += "."+p+"cpCurrentMonthDateDisabled, ."+p+"cpOtherMonthDateDisabled, ."+p+"cpCurrentDateDisabled{color:#D0D0D0;text-align:right;text-decoration:line-through;}\n";result += "."+p+"cpCurrentMonthDate, .cpCurrentDate{color:#000000;}\n";result += "."+p+"cpOtherMonthDate{color:#808080;}\n";result += "TD."+p+"cpCurrentDate{color:white;background-color: #C0C0C0;border-width:1;border:solid thin #800000;}\n";result += "TD."+p+"cpCurrentDateDisabled{border-width:1;border:solid thin #FFAAAA;}\n";result += "TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisabled{border:solid thin #C0C0C0;border-width:1 0 0 0;}\n";result += "A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisabled{height:20px;}\n";result += "A."+p+"cpTodayText{color:black;}\n";result += "."+p+"cpTodayTextDisabled{color:#D0D0D0;}\n";result += "."+p+"cpBorder{border:solid thin #808080;}\n";result += "</STYLE>\n";return result;}
+function CP_getCalendar(){var now = new Date();if(this.type == "WINDOW"){var windowref = "window.opener.";}else{var windowref = "";}var result = "";if(this.type == "WINDOW"){result += "<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result += '<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n';}else{result += '<TABLE CLASS="'+this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result += '<TR><TD ALIGN=CENTER>\n';result += '<CENTER>\n';}if(this.displayType=="date" || this.displayType=="week-end"){if(this.currentDate==null){this.currentDate = now;}if(arguments.length > 0){var month = arguments[0];}else{var month = this.currentDate.getMonth()+1;}if(arguments.length > 1 && arguments[1]>0 && arguments[1]-0==arguments[1]){var year = arguments[1];}else{var year = this.currentDate.getFullYear();}var daysinmonth= new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);if( ((year%4 == 0)&&(year%100 != 0) ) ||(year%400 == 0) ){daysinmonth[2] = 29;}var current_month = new Date(year,month-1,1);var display_year = year;var display_month = month;var display_date = 1;var weekday= current_month.getDay();var offset = 0;offset =(weekday >= this.weekStartDay) ? weekday-this.weekStartDay : 7-this.weekStartDay+weekday ;if(offset > 0){display_month--;if(display_month < 1){display_month = 12;display_year--;}display_date = daysinmonth[display_month]-offset+1;}var next_month = month+1;var next_month_year = year;if(next_month > 12){next_month=1;next_month_year++;}var last_month = month-1;var last_month_year = year;if(last_month < 1){last_month=12;last_month_year--;}var date_class;if(this.type!="WINDOW"){result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";}result += '<TR>\n';var refresh = 'javascript:'+windowref+'CP_refreshCalendar';if(this.isShowYearNavigation){result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+'('+this.index+','+last_month+','+last_month_year+');">&lt;</A></TD>';result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="58"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+'</SPAN></TD>';result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+'('+this.index+','+next_month+','+next_month_year+');">&gt;</A></TD>';result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refresh+'('+this.index+','+month+','+(year-1)+');">&lt;</A></TD>';if(this.isShowYearNavigationInput){result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+'('+this.index+','+month+',this.value-0);"></TD>';}else{result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><SPAN CLASS="'+this.cssPrefix+'cpYearNavigation">'+year+'</SPAN></TD>';}result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refresh+'('+this.index+','+month+','+(year+1)+');">&gt;</A></TD>';}else{result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+'('+this.index+','+last_month+','+last_month_year+');">&lt;&lt;</A></TD>\n';result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="100"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+' '+year+'</SPAN></TD>\n';result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+'('+this.index+','+next_month+','+next_month_year+');">&gt;&gt;</A></TD>\n';}result += '</TR></TABLE>\n';result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n';result += '<TR>\n';for(var j=0;j<7;j++){result += '<TD CLASS="'+this.cssPrefix+'cpDayColumnHeader" WIDTH="14%"><SPAN CLASS="'+this.cssPrefix+'cpDayColumnHeader">'+this.dayHeaders[(this.weekStartDay+j)%7]+'</TD>\n';}result += '</TR>\n';for(var row=1;row<=6;row++){result += '<TR>\n';for(var col=1;col<=7;col++){var disabled=false;if(this.disabledDatesExpression!=""){var ds=""+display_year+LZ(display_month)+LZ(display_date);eval("disabled=("+this.disabledDatesExpression+")");}var dateClass = "";if((display_month == this.currentDate.getMonth()+1) &&(display_date==this.currentDate.getDate()) &&(display_year==this.currentDate.getFullYear())){dateClass = "cpCurrentDate";}else if(display_month == month){dateClass = "cpCurrentMonthDate";}else{dateClass = "cpOtherMonthDate";}if(disabled || this.disabledWeekDays[col-1]){result += '	<TD CLASS="'+this.cssPrefix+dateClass+'"><SPAN CLASS="'+this.cssPrefix+dateClass+'Disabled">'+display_date+'</SPAN></TD>\n';}else{var selected_date = display_date;var selected_month = display_month;var selected_year = display_year;if(this.displayType=="week-end"){var d = new Date(selected_year,selected_month-1,selected_date,0,0,0,0);d.setDate(d.getDate() +(7-col));selected_year = d.getYear();if(selected_year < 1000){selected_year += 1900;}selected_month = d.getMonth()+1;selected_date = d.getDate();}result += '	<TD CLASS="'+this.cssPrefix+dateClass+'"><A HREF="javascript:'+windowref+this.returnFunction+'('+selected_year+','+selected_month+','+selected_date+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+this.cssPrefix+dateClass+'">'+display_date+'</A></TD>\n';}display_date++;if(display_date > daysinmonth[display_month]){display_date=1;display_month++;}if(display_month > 12){display_month=1;display_year++;}}result += '</TR>';}var current_weekday = now.getDay() - this.weekStartDay;if(current_weekday < 0){current_weekday += 7;}result += '<TR>\n';result += '	<TD COLSPAN=7 ALIGN=CENTER CLASS="'+this.cssPrefix+'cpTodayText">\n';if(this.disabledDatesExpression!=""){var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate());eval("disabled=("+this.disabledDatesExpression+")");}if(disabled || this.disabledWeekDays[current_weekday+1]){result += '		<SPAN CLASS="'+this.cssPrefix+'cpTodayTextDisabled">'+this.todayText+'</SPAN>\n';}else{result += '		<A CLASS="'+this.cssPrefix+'cpTodayText" HREF="javascript:'+windowref+this.returnFunction+'(\''+now.getFullYear()+'\',\''+(now.getMonth()+1)+'\',\''+now.getDate()+'\');'+windowref+'CP_hideCalendar(\''+this.index+'\');">'+this.todayText+'</A>\n';}result += '		<BR>\n';result += '	</TD></TR></TABLE></CENTER></TD></TR></TABLE>\n';}if(this.displayType=="month" || this.displayType=="quarter" || this.displayType=="year"){if(arguments.length > 0){var year = arguments[0];}else{if(this.displayType=="year"){var year = now.getFullYear()-this.yearSelectStartOffset;}else{var year = now.getFullYear();}}if(this.displayType!="year" && this.isShowYearNavigation){result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result += '<TR>\n';result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year-1)+');">&lt;&lt;</A></TD>\n';result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="100">'+year+'</TD>\n';result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year+1)+');">&gt;&gt;</A></TD>\n';result += '</TR></TABLE>\n';}}if(this.displayType=="month"){result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<4;i++){result += '<TR>';for(var j=0;j<3;j++){var monthindex =((i*3)+j);result += '<TD WIDTH=33% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnMonthFunction+'('+year+','+(monthindex+1)+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+'</A></TD>';}result += '</TR>';}result += '</TABLE></CENTER></TD></TR></TABLE>\n';}if(this.displayType=="quarter"){result += '<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<2;i++){result += '<TR>';for(var j=0;j<2;j++){var quarter =((i*2)+j+1);result += '<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnQuarterFunction+'('+year+','+quarter+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+'</A><BR><BR></TD>';}result += '</TR>';}result += '</TABLE></CENTER></TD></TR></TABLE>\n';}if(this.displayType=="year"){var yearColumnSize = 4;result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result += '<TR>\n';result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year-(yearColumnSize*2))+');">&lt;&lt;</A></TD>\n';result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year+(yearColumnSize*2))+');">&gt;&gt;</A></TD>\n';result += '</TR></TABLE>\n';result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<yearColumnSize;i++){for(var j=0;j<2;j++){var currentyear = year+(j*yearColumnSize)+i;result += '<TD WIDTH=50% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnYearFunction+'('+currentyear+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+currentyear+'</A></TD>';}result += '</TR>';}result += '</TABLE></CENTER></TD></TR></TABLE>\n';}if(this.type == "WINDOW"){result += "</BODY></HTML>\n";}return result;}
+

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-advanced-field-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-advanced-field-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-advanced-field-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,164 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                exclude-result-prefixes="fi">
+  <!--+
+      | This stylesheet is designed to be included by 'forms-samples-styling.xsl'.
+      | It extends the 'forms-field-styling.xsl' with additional stylings.
+      | The very specific advanced stylings as the calendar or htmlarea (both
+      | also need additional JS files) are separated out of this file.
+      +-->
+
+  <xsl:import href="forms-field-styling.xsl"/>
+  <xsl:include href="forms-calendar-styling.xsl"/>
+  <xsl:include href="forms-htmlarea-styling.xsl"/>
+  <!-- Location of the resources directory, where JS libs and icons are stored -->
+  <xsl:param name="resources-uri">resources</xsl:param>
+
+  <xsl:template match="head" mode="forms-field">
+    <xsl:apply-imports/>
+    <script src="{$resources-uri}/mattkruse-lib/AnchorPosition.js" type="text/javascript"/>
+    <script src="{$resources-uri}/mattkruse-lib/PopupWindow.js" type="text/javascript"/>
+    <script src="{$resources-uri}/mattkruse-lib/OptionTransfer.js" type="text/javascript"/>
+    <script src="{$resources-uri}/mattkruse-lib/selectbox.js" type="text/javascript"/>
+    <xsl:apply-templates select="." mode="forms-calendar"/>
+    <xsl:apply-templates select="." mode="forms-htmlarea"/>
+  </xsl:template>
+
+  <xsl:template match="body" mode="forms-field">
+    <xsl:apply-imports/>
+    <xsl:apply-templates select="." mode="forms-calendar"/>
+    <xsl:apply-templates select="." mode="forms-htmlarea"/>
+  </xsl:template>
+
+  <!--+ This template should not be necessary as this stylesheet "inherits"
+      | all templates from 'forms-field-styling.xsl', but without it, it does
+      | not work for me (using Xalan 2.5.1). It's like adding all methods of
+      | a superclass in a subclass and calling everywhere only the super
+      | implementation.
+      +-->
+  <xsl:template match="*">
+    <xsl:apply-imports/>
+  </xsl:template>
+
+  <!--+
+      | Add fi:help to the common stuff.
+      +-->
+  <xsl:template match="fi:*" mode="common">
+    <xsl:apply-imports/>
+    <xsl:apply-templates select="fi:help"/>
+  </xsl:template>
+
+  <!--+
+      | 
+      +-->
+  <xsl:template match="fi:help">
+    <xsl:variable name="id" select="generate-id()"/>
+    <div class="forms-help" id="help{$id}" style="visibility:hidden; position:absolute;">
+      <xsl:apply-templates select="node()"/>
+    </div>
+    <script type="text/javascript">
+      var helpWin<xsl:value-of select="$id"/> = forms_createPopupWindow('help<xsl:value-of select="$id"/>');
+    </script>
+    <a id="{$id}" name="{$id}" href="#" onclick="helpWin{$id}.showPopup('{$id}');return false;"><img border="0" src="{$resources-uri}/help.gif"/></a>
+  </xsl:template>
+
+  <!--+
+      | fi:multivaluefield with list-type='double-listbox' styling
+      +-->
+  <xsl:template match="fi:multivaluefield[fi:styling/@list-type='double-listbox']">
+    <xsl:variable name="id" select="@id"/>
+    <xsl:variable name="values" select="fi:values/fi:value/text()"/>
+
+    <span class="forms-doubleList" title="{fi:hint}">
+      <table>
+        <xsl:if test="fi:styling/fi:available-label|fi:styling/fi:selected-label">
+          <tr>
+            <th>
+              <xsl:copy-of select="fi:styling/fi:available-label/node()"/>
+            </th>
+            <th> </th>
+            <th>
+              <xsl:copy-of select="fi:styling/fi:selected-label/node()"/>
+            </th>
+          </tr>
+        </xsl:if>
+        <tr>
+          <td>
+            <!-- select for the unselected values -->
+            <select id="{@id}.unselected" name="{@id}.unselected" multiple="multiple"
+                    ondblclick="opt{generate-id()}.forms_transferRight()">
+              <xsl:apply-templates select="." mode="styling"/>
+              <xsl:for-each select="fi:selection-list/fi:item">
+                <xsl:variable name="value" select="@value"/>
+                <xsl:if test="not($values[. = $value])">
+                  <option value="{$value}">
+                    <xsl:copy-of select="fi:label/node()"/>
+                  </option>
+                </xsl:if>
+              </xsl:for-each>
+            </select>
+          </td>
+          <td>
+            <!-- command buttons -->
+            <!-- strangely, IE adds an extra blank line if there only a button on a line. So we surround it with nbsp -->
+            <xsl:text>&#160;</xsl:text>
+            <input type="button" value="&gt;" onclick="opt{generate-id()}.forms_transferRight()"/>
+            <xsl:text>&#160;</xsl:text>
+            <br/>
+            <xsl:text>&#160;</xsl:text>
+            <input type="button" value="&gt;&gt;" onclick="opt{generate-id()}.forms_transferAllRight()"/>
+            <xsl:text>&#160;</xsl:text>
+            <br/>
+            <xsl:text>&#160;</xsl:text>
+            <input type="button" value="&lt;" onclick="opt{generate-id()}.forms_transferLeft()"/>
+            <xsl:text>&#160;</xsl:text>
+            <br/>
+            <xsl:text>&#160;</xsl:text>
+            <input type="button" value="&lt;&lt;" onclick="opt{generate-id()}.forms_transferAllLeft()"/>
+            <xsl:text>&#160;</xsl:text>
+            <br/>
+            <xsl:apply-templates select="." mode="common"/>
+          </td>
+          <td>
+            <!-- select for the selected values -->
+            <select id="{@id}" name="{@id}" multiple="multiple"
+                    ondblclick="opt{generate-id()}.forms_transferLeft()" >
+              <xsl:apply-templates select="." mode="styling"/>
+              <xsl:for-each select="fi:selection-list/fi:item">
+                <xsl:variable name="value" select="@value"/>
+                <xsl:if test="$values[. = $value]">
+                  <option value="{$value}">
+                    <xsl:copy-of select="fi:label/node()"/>
+                  </option>
+                </xsl:if>
+              </xsl:for-each>
+            </select>
+          </td>
+        </tr>
+      </table>
+      <script type="text/javascript">
+        var opt<xsl:value-of select="generate-id()"/> = forms_createOptionTransfer('<xsl:value-of select="@id"/>', <xsl:value-of select="fi:styling/@submit-on-change = 'true'"/>);
+      </script>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="fi:multivaluefield/fi:styling[@list-type='double-listbox']/@submit-on-change" mode="styling"/>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-calendar-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-calendar-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-calendar-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                exclude-result-prefixes="fi">
+  <!--+
+      | This stylesheet is designed to be included by 'forms-advanced-styling.xsl'.
+      +-->
+
+  <!-- Location of the resources directory, where JS libs and icons are stored -->
+  <xsl:param name="resources-uri">resources</xsl:param>
+
+  <xsl:template match="head" mode="forms-calendar">
+    <script src="{$resources-uri}/mattkruse-lib/CalendarPopup.js" type="text/javascript"/>
+    <script src="{$resources-uri}/mattkruse-lib/date.js" type="text/javascript"/>
+    <script type="text/javascript">
+      // Setup calendar
+      var forms_calendar = CalendarPopup('forms_calendarDiv');
+      forms_calendar.setWeekStartDay(1);
+      forms_calendar.showYearNavigation();
+      forms_calendar.showYearNavigationInput();
+      forms_calendar.setCssPrefix("forms_");
+    </script>
+    <link rel="stylesheet" type="text/css" href="{$resources-uri}/forms-calendar.css"/>
+  </xsl:template>
+
+  <xsl:template match="body" mode="forms-calendar">
+    <div id="forms_calendarDiv"/>
+  </xsl:template>
+
+  <!--+
+      | fi:field with either
+      | - explicit styling @type = 'date' or
+      | - implicit if no styling @type is specified,
+      |   but datatype @type = 'date', selection lists must be excluded here
+      +-->
+  <xsl:template match="fi:field[fi:styling/@type='date'] |
+                       fi:field[not(fi:styling/@type)][fi:datatype[@type='date']][not(fi:selection-list)]">
+    <xsl:variable name="id" select="generate-id()"/>
+    
+    <xsl:variable name="format">
+      <xsl:choose>
+        <xsl:when test="fi:datatype[@type='date']/fi:convertor/@pattern">
+          <xsl:value-of select="fi:datatype[@type='date']/fi:convertor/@pattern"/>
+        </xsl:when>
+        <xsl:otherwise>yyyy-MM-dd</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    
+    <!-- regular input -->
+    <input id="{@id}" name="{@id}" value="{fi:value}" title="{normalize-space(fi:hint)}" type="text">
+      <xsl:apply-templates select="." mode="styling"/>
+    </input>
+    
+    <!-- calendar popup -->
+    <a href="#" name="{$id}" id="{$id}"
+       onClick="forms_calendar.select(forms_getForm(this)['{@id}'],'{$id}','{$format}'); return false;">
+      <img src="{$resources-uri}/cal.gif" border="0" alt="Calendar"/>
+    </a>
+
+    <!-- common stuff -->
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-field-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-field-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-field-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,522 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                exclude-result-prefixes="fi">
+  <!--+
+      | This stylesheet is designed to be included by 'forms-samples-styling.xsl'.
+      | Version CVS $Id$
+      +-->
+
+  <!-- Location of the resources directory, where JS libs and icons are stored -->
+  <xsl:param name="resources-uri">resources</xsl:param>
+
+  <xsl:template match="head" mode="forms-field">
+    <script src="{$resources-uri}/forms-lib.js" type="text/javascript"/>
+    <link rel="stylesheet" type="text/css" href="{$resources-uri}/forms.css"/>
+  </xsl:template>
+
+  <xsl:template match="body" mode="forms-field">
+    <xsl:copy-of select="@*"/>
+    <xsl:attribute name="onload">forms_onload(); <xsl:value-of select="@onload"/></xsl:attribute>
+  </xsl:template>
+
+  <!--+
+      | Generic fi:field : produce an <input>
+      +-->
+  <xsl:template match="fi:field">
+    <input name="{@id}" id="{@id}" value="{fi:value}" title="{fi:hint}" type="text">
+      <xsl:apply-templates select="." mode="styling"/>
+    </input>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | Common stuff like fi:validation-message, @required.
+      +-->
+  <xsl:template match="fi:*" mode="common">
+    <!-- validation message -->
+    <xsl:apply-templates select="fi:validation-message"/>
+    <!-- required mark -->
+    <xsl:if test="@required='true'">
+      <span class="forms-field-required"> * </span>
+    </xsl:if>
+  </xsl:template>
+
+  <!--+
+      | Handling the common styling. You may only add attributes to the output
+      | in this template as later processing might add attributes too, for
+      | example @checked or @selected
+      +-->
+  <xsl:template match="fi:*" mode="styling">
+    <xsl:apply-templates select="fi:styling/@*" mode="styling"/>
+
+    <!--+ 
+        | @listbox-size needs to be handled separately as even if it is not
+        | specified some output (@size) must be generated.
+        +-->
+    <xsl:if test="self::fi:field[fi:selection-list][fi:styling/@list-type = 'listbox'] or
+                  self::fi:multivaluefield[not(fi:styling/@list-type = 'checkbox')]">
+      <xsl:variable name="size">
+        <xsl:value-of select="fi:styling/@listbox-size"/>
+        <xsl:if test="not(fi:styling/@listbox-size)">5</xsl:if>
+      </xsl:variable>
+      <xsl:attribute name="size">
+        <xsl:value-of select="$size"/>
+      </xsl:attribute>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="fi:styling/@*" mode="styling">
+    <xsl:copy-of select="."/>
+  </xsl:template>
+
+  <xsl:template match="fi:styling/@submit-on-change" mode="styling">
+    <xsl:if test=". = 'true'">
+      <xsl:attribute name="onchange">forms_submitForm(this)</xsl:attribute>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="fi:styling/@list-type | fi:styling/@list-orientation |
+                       fi:styling/@listbox-size | fi:styling/@format | fi:styling/@layout"
+                mode="styling">
+    <!--+
+        | Ignore marker attributes so they don't go into the resuling HTML.
+        +-->
+  </xsl:template>
+
+  <xsl:template match="fi:styling/@type" mode="styling">
+    <!--+ 
+        | Do we have a duplicate semantic usage of @type?
+        | @type is only a marker for the stylesheet in general, but some of the
+        | types must/should be in the HTML output too.
+        +-->
+    <xsl:variable name="validHTMLTypes"
+                  select="'text hidden textarea checkbox radio password image reset submit'"/>
+    <xsl:if test="normalize-space(.) and
+                  contains(concat(' ', $validHTMLTypes, ' '), concat(' ', ., ' '))">
+      <xsl:copy-of select="."/>
+    </xsl:if>
+  </xsl:template>
+
+  <!--+
+      |
+      +-->
+  <xsl:template match="fi:validation-message">
+    <a href="#" class="forms-validation-message" onclick="alert('{normalize-space(.)}');return false;">&#160;!&#160;</a>
+  </xsl:template>
+
+  <!--+
+      | Hidden fi:field : produce input with type='hidden'
+      +-->
+  <xsl:template match="fi:field[fi:styling/@type='hidden']" priority="2">
+    <input type="hidden" name="{@id}" id="{@id}" value="{fi:value}">
+      <xsl:apply-templates select="." mode="styling"/>
+    </input>
+  </xsl:template>
+
+  <!--+
+      | fi:field with a selection list and @list-type 'radio' : produce
+      | radio-buttons oriented according to @list-orientation
+      | ("horizontal" or "vertical" - default)
+      +-->
+  <xsl:template match="fi:field[fi:selection-list][fi:styling/@list-type='radio']" priority="2">
+    <xsl:variable name="id" select="@id"/>
+    <xsl:variable name="value" select="fi:value"/>
+    <xsl:variable name="vertical" select="string(fi:styling/@list-orientation) != 'horizontal'"/>
+    <xsl:choose>
+      <xsl:when test="$vertical">
+        <table cellpadding="0" cellspacing="0" border="0" title="{fi:hint}">
+          <xsl:for-each select="fi:selection-list/fi:item">
+            <tr>
+              <td>
+                <input type="radio" id="{generate-id()}" name="{$id}" value="{@value}">
+                  <xsl:if test="@value = $value">
+                    <xsl:attribute name="checked">checked</xsl:attribute>
+                  </xsl:if>
+                  <xsl:apply-templates select="." mode="styling"/>
+                </input>
+              </td>
+              <td>
+                <label for="{generate-id()}"><xsl:copy-of select="fi:label/node()"/></label>
+              </td>
+              <xsl:if test="position() = 1">
+                <td rowspan="{count(../fi:item)}">
+                  <xsl:apply-templates select="../.." mode="common"/>
+                </td>
+              </xsl:if>
+            </tr>
+          </xsl:for-each>
+        </table>
+      </xsl:when>
+      <xsl:otherwise>
+        <span title="{fi:hint}">
+          <xsl:for-each select="fi:selection-list/fi:item">
+            <input type="radio" id="{generate-id()}" name="{$id}" value="{@value}">
+              <xsl:if test="@value = $value">
+                <xsl:attribute name="checked">checked</xsl:attribute>
+              </xsl:if>
+              <xsl:apply-templates select="." mode="styling"/>
+            </input>
+            <label for="{generate-id()}"><xsl:copy-of select="fi:label/node()"/></label>
+          </xsl:for-each>
+        </span>
+        <xsl:apply-templates select="." mode="common"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!--+
+      | fi:field with a selection list (not 'radio' style)
+      | Rendering depends on the attributes of fi:styling :
+      | - if @list-type is "listbox" : produce a list box with @listbox-size visible
+      |   items (default 5)
+      | - otherwise, produce a dropdown menu
+      +-->
+  <xsl:template match="fi:field[fi:selection-list]" priority="1">
+    <xsl:variable name="value" select="fi:value"/>
+
+    <!-- dropdown or listbox -->
+    <select title="{fi:hint}" id="{@id}" name="{@id}">
+      <xsl:apply-templates select="." mode="styling"/>
+      <xsl:for-each select="fi:selection-list/fi:item">
+        <option value="{@value}">
+          <xsl:if test="@value = $value">
+            <xsl:attribute name="selected">selected</xsl:attribute>
+          </xsl:if>
+          <xsl:copy-of select="fi:label/node()"/>
+        </option>
+      </xsl:for-each>
+    </select>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:field with a selection list and @type 'output'
+      +-->
+  <xsl:template match="fi:field[fi:selection-list][fi:styling/@type='output']" priority="3">
+    <xsl:variable name="value" select="fi:value"/>
+    <xsl:variable name="selected" select="fi:selection-list/fi:item[@value = $value]"/>
+    <xsl:choose>
+      <xsl:when test="$selected/fi:label">
+        <xsl:apply-templates select="$selected/fi:label"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$value"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!--+
+      | fi:field with @type 'textarea'
+      +-->
+  <xsl:template match="fi:field[fi:styling/@type='textarea']">
+    <textarea id="{@id}" name="{@id}" title="{fi:hint}">
+      <xsl:apply-templates select="." mode="styling"/>
+      <!-- remove carriage-returns (occurs on certain versions of IE and doubles linebreaks at each submit) -->
+      <xsl:copy-of select="translate(fi:value/node(), '&#13;', '')"/>
+    </textarea>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:field with @type 'output' and fi:output are both rendered as text
+      +-->
+  <xsl:template match="fi:output | fi:field[fi:styling/@type='output']" priority="2">
+    <xsl:copy-of select="fi:value/node()"/>
+  </xsl:template>
+
+  <!--+
+      | Labels for form elements.
+      +-->
+  <xsl:template match="fi:*" mode="label">
+    <label for="{@id}" title="{fi:hint}">
+      <xsl:copy-of select="fi:label/node()"/>
+    </label>
+  </xsl:template>
+
+  <!--+
+      | Labels for pure outputs must not contain <label/> as there is no element to point to.
+      +-->
+  <xsl:template match="fi:output | fi:field[fi:styling/@type='output']" mode="label">
+    <xsl:copy-of select="fi:label/node()"/>
+  </xsl:template>
+
+  <!--+
+      | fi:booleanfield : produce a checkbox
+      +-->
+  <xsl:template match="fi:booleanfield">
+    <input id="{@id}" type="checkbox" value="true" name="{@id}" title="{fi:hint}">
+      <xsl:apply-templates select="." mode="styling"/>
+      <xsl:if test="fi:value = 'true'">
+        <xsl:attribute name="checked">checked</xsl:attribute>
+      </xsl:if>
+    </input>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:booleanfield with @type 'output' : rendered as text
+      +-->
+  <xsl:template match="fi:booleanfield[fi:styling/@type='output']">
+    <xsl:choose>
+      <xsl:when test="fi:value = 'true'">
+        yes
+      </xsl:when>
+      <xsl:otherwise>
+        no
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!--+
+      | fi:action
+      +-->
+  <xsl:template match="fi:action">
+    <input id="{@id}" type="submit" name="{@id}" title="{fi:hint}">
+      <xsl:attribute name="value"><xsl:value-of select="fi:label/node()"/></xsl:attribute>
+      <xsl:apply-templates select="." mode="styling"/>
+    </input>
+  </xsl:template>
+
+  <!--+
+      | fi:continuation-id : produce a hidden "continuation-id" input
+      +-->
+  <xsl:template match="fi:continuation-id">
+    <xsl:variable name="name">
+      <xsl:value-of select="@name"/>
+      <xsl:if test="not(@name)">continuation-id</xsl:if>
+    </xsl:variable>
+    <input name="{$name}" type="hidden" value="{.}"/>
+  </xsl:template>
+
+  <!--+
+      | fi:multivaluefield : produce a list of checkboxes
+      +-->
+  <xsl:template match="fi:multivaluefield[fi:styling/@list-type='checkbox']">
+    <xsl:variable name="id" select="@id"/>
+    <xsl:variable name="values" select="fi:values/fi:value/text()"/>
+
+    <span title="{fi:hint}">
+      <xsl:for-each select="fi:selection-list/fi:item">
+        <xsl:variable name="value" select="@value"/>
+        <input id="{generate-id()}" type="checkbox" value="{@value}" name="{$id}">
+          <xsl:if test="$values[. = $value]">
+            <xsl:attribute name="checked">checked</xsl:attribute>
+          </xsl:if>
+        </input>
+        <label for="{generate-id()}"><xsl:copy-of select="fi:label/node()"/></label>
+        <br/>
+      </xsl:for-each>
+    </span>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:multivaluefield : produce a multiple-selection list
+      +-->
+  <xsl:template match="fi:multivaluefield">
+    <xsl:variable name="id" select="@id"/>
+    <xsl:variable name="values" select="fi:values/fi:value/text()"/>
+
+    <span title="{fi:hint}">
+      <select id="{@id}" name="{$id}" multiple="multiple">
+        <xsl:apply-templates select="." mode="styling"/>
+        <xsl:for-each select="fi:selection-list/fi:item">
+          <xsl:variable name="value" select="@value"/>
+          <option value="{$value}">
+            <xsl:if test="$values[. = $value]">
+              <xsl:attribute name="selected">selected</xsl:attribute>
+            </xsl:if>
+            <xsl:copy-of select="fi:label/node()"/>
+          </option>
+        </xsl:for-each>
+      </select>
+    </span>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:upload
+      +-->
+  <xsl:template match="fi:upload">
+    <xsl:choose>
+      <xsl:when test="fi:value">
+        <!-- Has a value (filename): display it with a change button -->
+        <span title="{fi:hint}">
+          [<xsl:value-of select="fi:value"/>] <input type="submit" id="{@id}" name="{@id}" value="..."/>
+        </span>
+      </xsl:when>
+      <xsl:otherwise>
+        <input type="file" id="{@id}" name="{@id}" title="{fi:hint}" accept="{@mime-types}"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:repeater
+      +-->
+  <xsl:template match="fi:repeater">
+    <input type="hidden" name="{@id}.size" value="{@size}"/>
+    <table border="1">
+      <tr>
+        <xsl:for-each select="fi:headings/fi:heading">
+          <th><xsl:value-of select="."/></th>
+        </xsl:for-each>
+      </tr>
+      <xsl:apply-templates select="fi:repeater-row"/>
+    </table>
+  </xsl:template>
+
+  <!--+
+      | fi:repeater-row
+      +-->
+  <xsl:template match="fi:repeater-row">
+    <tr>
+      <xsl:for-each select="*">
+        <td>
+          <xsl:apply-templates select="."/>
+        </td>
+      </xsl:for-each>
+    </tr>
+  </xsl:template>
+
+  <!--+
+      | fi:repeater-size
+      +-->
+  <xsl:template match="fi:repeater-size">
+    <input type="hidden" name="{@id}.size" value="{@size}"/>
+  </xsl:template>
+
+  <!--+
+      | fi:form-template|fi:form-generated 
+      +-->
+  <xsl:template match="fi:form-template|fi:form-generated">
+    <form>
+      <xsl:copy-of select="@*"/>
+      <xsl:attribute name="onsubmit">forms_onsubmit(); <xsl:value-of select="@onsubmit"/></xsl:attribute>
+      <!-- hidden field to store the submit id -->
+      <div><input type="hidden" name="forms_submit_id"/></div>
+      <xsl:apply-templates/>
+      
+      <!-- TODO: consider putting this in the xml stream from the generator? -->
+      <xsl:if test="self::fi:form-generated">
+        <input type="submit"/>
+      </xsl:if>
+    </form>
+  </xsl:template>
+
+  <!--+
+      | fi:form
+      +-->
+  <xsl:template match="fi:form">
+    <table border="1">
+      <xsl:for-each select="fi:widgets/*">
+        <tr>
+          <xsl:choose>
+            <xsl:when test="self::fi:repeater">
+              <td colspan="2">
+                <xsl:apply-templates select="."/>
+              </td>
+            </xsl:when>
+            <xsl:when test="self::fi:booleanfield">
+              <td>&#160;</td>
+              <td>
+                <xsl:apply-templates select="."/>
+                <xsl:text> </xsl:text>
+                <xsl:copy-of select="fi:label"/>
+              </td>
+            </xsl:when>
+            <xsl:otherwise>
+              <td>
+                <xsl:copy-of select="fi:label"/>
+              </td>
+              <td>
+                <xsl:apply-templates select="."/>
+              </td>
+            </xsl:otherwise>
+          </xsl:choose>
+        </tr>
+      </xsl:for-each>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="fi:aggregatefield">
+    <input id="{@id}" name="{@id}" value="{fi:value}" title="{fi:hint}">
+      <xsl:apply-templates select="." mode="styling"/>
+    </input>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <xsl:template match="fi:messages">
+    <xsl:if test="fi:message">
+      <xsl:copy-of select="fi:label/node()"/>:
+      <ul>
+        <xsl:for-each select="fi:message">
+          <li><xsl:apply-templates/></li>
+        </xsl:for-each>
+      </ul>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="fi:validation-errors">
+    <xsl:variable name="header">
+      <xsl:choose>
+        <xsl:when test="header">
+          <xsl:copy-of select="header"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <p class="forms-validation-errors">The following errors have been detected (marked with !):</p>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="footer">
+      <xsl:choose>
+        <xsl:when test="footer">
+          <xsl:copy-of select="footer"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <p class="forms-validation-errors">Please, correct them and re-submit the form.</p>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="frm" select="ancestor::fi:form-template"/>
+    <xsl:if test="$frm and $frm//fi:validation-message">
+      <xsl:copy-of select="$header"/>
+      <ul>
+        <xsl:for-each select="$frm//fi:validation-message">
+          <li class="forms-validation-error">
+            <xsl:if test="../fi:label">
+              <xsl:value-of select="../fi:label"/><xsl:text>: </xsl:text>
+            </xsl:if>
+            <xsl:value-of select="."/>
+          </li>
+        </xsl:for-each>
+      </ul>
+      <xsl:copy-of select="$footer"/>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-htmlarea-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-htmlarea-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-htmlarea-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                exclude-result-prefixes="fi">
+  <!--+
+      | This stylesheet is designed to be included by 'forms-advanced-styling.xsl'.
+      +-->
+
+  <!-- Location of the resources directory, where JS libs and icons are stored -->
+  <xsl:param name="resources-uri">resources</xsl:param>
+  <xsl:param name="htmlarea-lang">en</xsl:param>
+
+  <xsl:template match="head" mode="forms-htmlarea">
+    <script type="text/javascript">
+      _editor_url = "<xsl:value-of select="concat($resources-uri, '/htmlarea/')"/>";
+      _editor_lang = "<xsl:value-of select="$htmlarea-lang"/>";
+    </script>
+    <script type="text/javascript" src="{$resources-uri}/htmlarea/htmlarea.js"></script>
+  </xsl:template>
+
+  <xsl:template match="body" mode="forms-htmlarea"/>
+
+  <!--+
+      | fi:field with @type 'htmlarea'
+      +-->
+  <xsl:template match="fi:field[fi:styling[@type='htmlarea']]">
+    <textarea id="{@id}" name="{@id}" title="{fi:hint}">
+      <xsl:apply-templates select="." mode="styling"/>
+      <!-- remove carriage-returns (occurs on certain versions of IE and doubles linebreaks at each submit) -->
+      <xsl:apply-templates select="fi:value/node()" mode="htmlarea-copy"/>
+    </textarea>
+    <xsl:apply-templates select="." mode="common"/>
+    <xsl:choose>
+      <xsl:when test="fi:styling/initFunction">
+        <script language="JavaScript"><xsl:value-of select="fi:styling/initFunction"/>('<xsl:value-of select="@id"/>');</script>
+      </xsl:when>
+      <xsl:otherwise>
+        <script language="JavaScript">HTMLArea.replace('<xsl:value-of select="@id"/>');</script>        
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="@*|*" mode="htmlarea-copy">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()" mode="htmlarea-copy"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="text()" mode="htmlarea-copy">
+    <xsl:copy-of select="translate(., '&#13;', '')"/>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-page-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-page-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-page-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,331 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                exclude-result-prefixes="fi">
+  <!--+
+      | This stylesheet is designed to be included by 'forms-samples-styling.xsl'.
+      +-->
+  <xsl:template match="head" mode="forms-page">
+    <!--+ 'forms-page-styling.xsl' relies on 'forms-field-styling.xsl' for the
+        | inclusion of the correct JS and CSS files. To fix it, we have to
+        | separate the page specific parts into their own files.
+        +-->
+  </xsl:template>
+
+  <xsl:template match="body" mode="forms-page"/>
+
+  <!--
+    fi:group : default is to enclose items in a div
+  -->
+  <xsl:template match="fi:group">
+    <div title="{fi:hint}">
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates mode="group-layout" select="."/>
+    </div>
+  </xsl:template>
+
+  <!--
+    fi:group of type tabs
+  -->
+  <xsl:template match="fi:group[fi:styling/@type='tabs']">
+    <!-- find the currently selected tab.
+         Thoughts still needed here, such as autogenerating a field in the
+         forms transformer to hold this state.
+    -->
+    <xsl:variable name="active">
+      <xsl:variable name="value" select="normalize-space(fi:state/fi:*/fi:value)"/>
+      <xsl:choose>
+        <xsl:when test="$value">
+          <xsl:value-of select="$value"/>
+        </xsl:when>
+        <xsl:otherwise>0</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <!-- copy the "state-widget" attribute for use in for-each -->
+    <xsl:variable name="state-widget" select="fi:state/fi:*/@id"/>
+    <xsl:variable name="id" select="generate-id()"/>
+
+    <div id="{$id}" title="{fi:hint}">
+      <!-- add an hidden input for the state -->
+      <xsl:if test="$state-widget">
+        <input type="hidden" name="{$state-widget}" value="{$active}"/>
+      </xsl:if>
+      <!-- div containing the tabs -->
+      <div class="forms-tabArea">
+        <xsl:for-each select="fi:items/fi:*">
+          <xsl:variable name="pos" select="position() - 1"/>
+          <span id="{$id}_tab_{$pos}" onclick="forms_showTab('{$id}', {$pos}, {last()}, '{$state-widget}')">
+            <xsl:attribute name="class">
+              <xsl:text>forms-tab</xsl:text>
+              <xsl:if test="$active = $pos"> forms-activeTab</xsl:if>
+            </xsl:attribute>
+            <xsl:copy-of select="fi:label/node()"/>
+            <xsl:if test="fi:items/*//fi:validation-message">
+              <span class="forms-validation-message">&#160;!&#160;</span>
+            </xsl:if>
+          </span>
+        </xsl:for-each>
+      </div>
+      <!-- a div for each of the items -->
+      <xsl:for-each select="fi:items/fi:*">
+        <xsl:variable name="pos" select="position() - 1"/>
+        <div class="forms-tabContent" id="{$id}_items_{$pos}">
+          <xsl:if test="$active != $pos">
+            <xsl:attribute name="style">display:none</xsl:attribute>
+          </xsl:if>
+          <xsl:apply-templates select="."/>
+        </div>
+      </xsl:for-each>
+    </div>
+  </xsl:template>
+
+  <!--
+    fi:group of type choice : a popup is used instead of tabs
+  -->
+  <xsl:template match="fi:group[fi:styling/@type='choice']">
+    <!-- find the currently selected tab.
+         Thoughts still needed here, such as autogenerating a field in the formstransformer
+         to hold this state.
+    -->
+    <xsl:variable name="active">
+      <xsl:variable name="value" select="normalize-space(fi:state/fi:*/fi:value)"/>
+      <xsl:choose>
+        <xsl:when test="$value">
+          <xsl:value-of select="$value"/>
+        </xsl:when>
+        <xsl:otherwise>0</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <!-- copy the "state-widget" attribute for use in for-each -->
+    <xsl:variable name="state-widget" select="fi:state/fi:*/@id"/>
+    <xsl:variable name="id" select="generate-id()"/>
+
+    <fieldset id="{$id}">
+      <legend title="{fi:hint}">
+        <xsl:apply-templates select="fi:label/node()"/>
+        <select name="{$state-widget}" onchange="forms_showTab('{$id}', this.selectedIndex, {count(fi:items/*)}, '{$state-widget}')">
+          <xsl:for-each select="fi:items/fi:*">
+            <xsl:variable name="pos" select="position() - 1"/>
+            <option>
+              <xsl:attribute name="value">
+                <xsl:choose>
+                  <xsl:when test="fi:value">
+                    <xsl:value-of select="fi:value"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:value-of select="$pos"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:attribute>
+              <xsl:if test="$active = $pos">
+                <xsl:attribute name="selected">selected</xsl:attribute>
+              </xsl:if>
+              <xsl:copy-of select="fi:label/node()"/>
+            </option>
+          </xsl:for-each>
+        </select>
+        <xsl:if test="fi:items/*//fi:validation-message">
+          <span class="forms-validation-message">&#160;!&#160;</span>
+        </xsl:if>
+      </legend>
+      <!-- a div for each of the items -->
+      <xsl:for-each select="fi:items/fi:*">
+        <xsl:variable name="pos" select="position() - 1"/>
+        <div id="{$id}_items_{$pos}">
+          <xsl:if test="$active != $pos">
+            <xsl:attribute name="style">display:none</xsl:attribute>
+          </xsl:if>
+          <xsl:apply-templates select="."/>
+        </div>
+      </xsl:for-each>
+    </fieldset>
+  </xsl:template>
+
+  <!--
+    fi:group of type fieldset : enclose items in a fieldset frame
+  -->
+  <xsl:template match="fi:group[fi:styling/@type='fieldset']">
+    <fieldset>
+      <xsl:apply-templates select="." mode="styling"/>
+      <legend title="{fi:hint}"><xsl:copy-of select="fi:label/node()"/></legend>
+      <xsl:apply-templates mode="group-layout" select="."/>
+    </fieldset>
+  </xsl:template>
+
+  <!--
+    Group items layout : default is no layout
+  -->
+  <xsl:template match="fi:group" mode="group-layout">
+    <xsl:apply-templates select="fi:items/*"/>
+  </xsl:template>
+
+  <!--
+    Column group items layout
+  -->
+  <xsl:template match="fi:group[fi:styling/@layout='column']" mode="group-layout">
+    <table border="0" summary="{fi:hint}">
+      <tbody>
+        <xsl:apply-templates select="fi:items/*" mode="group-column-content"/>
+      </tbody>
+    </table>
+  </xsl:template>
+
+  <!--
+    Default column layout : label above and input below
+  -->
+  <xsl:template match="fi:*" mode="group-column-content">
+    <tr>
+      <td><xsl:apply-templates select="." mode="label"/></td>
+    </tr>
+    <tr>
+      <td><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="fi:action" mode="group-column-content">
+    <tr>
+      <td><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <!--
+    Columns group items layout
+  -->
+  <xsl:template match="fi:group[fi:styling/@layout='columns']" mode="group-layout">
+    <table border="0" summary="{fi:hint}">
+      <tbody>
+        <xsl:apply-templates select="fi:items/*" mode="group-columns-content"/>
+      </tbody>
+    </table>
+  </xsl:template>
+
+  <!--
+    Default columns layout : label left and input right
+  -->
+  <xsl:template match="fi:*" mode="group-columns-content">
+    <tr>
+      <td><xsl:apply-templates select="." mode="label"/></td>
+      <td><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <!--
+    Row group items layout
+  -->
+  <xsl:template match="fi:group[fi:styling/@layout='row']" mode="group-layout">
+    <table border="0" summary="{fi:hint}">
+      <tbody>
+        <tr>
+          <xsl:apply-templates select="fi:items/*" mode="group-row-content"/>
+        </tr>
+      </tbody>
+    </table>
+  </xsl:template>
+
+  <!--
+    Default row layout : label left and input right
+  -->
+  <xsl:template match="fi:*" mode="group-row-content">
+    <td><xsl:apply-templates select="." mode="label"/></td>
+    <td><xsl:apply-templates select="."/></td>
+  </xsl:template>
+
+  <xsl:template match="fi:action" mode="group-row-content">
+    <td><xsl:apply-templates select="."/></td>
+  </xsl:template>
+  <!--
+    Rows group items layout
+  -->
+  <xsl:template match="fi:group[fi:styling/@layout='rows']" mode="group-layout">
+    <table border="0" summary="{fi:hint}">
+      <tbody>
+        <tr>
+          <xsl:apply-templates select="fi:items/*" mode="group-rows-labels"/>
+        </tr>
+        <tr>
+          <xsl:apply-templates select="fi:items/*" mode="group-rows-content"/>
+        </tr>
+      </tbody>
+    </table>
+  </xsl:template>
+
+  <!--
+    Default rows layout : label above and input below
+  -->
+  <xsl:template match="fi:*" mode="group-rows-labels">
+    <td><xsl:apply-templates select="." mode="label"/></td>
+  </xsl:template>
+
+  <xsl:template match="fi:action" mode="group-rows-labels">
+    <td>&#160;</td>
+  </xsl:template>
+
+  <xsl:template match="fi:*" mode="group-rows-content">
+    <td><xsl:apply-templates select="."/></td>
+  </xsl:template>
+
+  <!-- boolean field : checkbox and label on a single line -->
+  <xsl:template match="fi:booleanfield" mode="group-columns-content">
+    <tr>
+      <td colspan="2">
+        <xsl:apply-templates select="."/>
+        <xsl:apply-templates select="." mode="label"/>
+      </td>
+    </tr>
+  </xsl:template>
+
+  <!-- action : on a single line -->
+  <xsl:template match="fi:action" mode="group-columns-content">
+    <tr>
+      <td colspan="2"><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <!-- any other element : on a single line -->
+  <xsl:template match="*" mode="group-columns-content">
+    <tr>
+      <td colspan="2"><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <!-- double-list multivaluefield : lists under the label -->
+  <xsl:template match="fi:multivaluefield[fi:styling/@list-type='double-listbox']"
+                mode="group-columns-content">
+    <tr>
+      <td colspan="2"><xsl:apply-templates select="." mode="label"/></td>
+    </tr>
+    <tr>
+      <td colspan="2"><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <!-- nested group -->
+  <xsl:template match="fi:group" mode="group-columns-content">
+    <tr>
+      <td colspan="2"><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/forms-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!--+ Include styling stylesheets, one for the widgets, the other one for the
+      | page. As 'forms-advanced-field-styling.xsl' is a specialization of
+      | 'forms-field-styling.xsl' the latter one is imported there. If you don't
+      | want advanced styling of widgets, change it here!
+      | See xsl:include as composition and xsl:import as extension/inheritance.
+      +-->
+  <xsl:include href="forms-page-styling.xsl"/>
+  <xsl:include href="forms-advanced-field-styling.xsl"/>
+
+  <xsl:template match="head">
+    <head>
+      <xsl:apply-templates/>
+      <xsl:apply-templates select="." mode="forms-page"/>
+      <xsl:apply-templates select="." mode="forms-field"/>
+    </head>
+  </xsl:template>
+
+  <xsl:template match="body">
+    <body>
+      <!--+ !!! If template with mode 'forms-page' adds text or elements
+          |        template with mode 'forms-field' can no longer add attributes!!!
+          +-->
+      <xsl:apply-templates select="." mode="forms-page"/>
+      <xsl:apply-templates select="." mode="forms-field"/>
+      <xsl:apply-templates/>
+    </body>
+  </xsl:template>
+
+</xsl:stylesheet>

Modified: cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl&r1=148908&p2=cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl	(original)
+++ cocoon/trunk/src/blocks/portal/samples/skins/basic/styles/portal-page.xsl	Fri Jan 28 09:54:58 2005
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
-  Copyright 1999-2004 The Apache Software Foundation
+  Copyright 1999-2005 The Apache Software Foundation
 
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
@@ -14,14 +14,22 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<!-- SVN $Id:$ -->
+<!-- SVN $Id$ -->
 <xsl:stylesheet version="1.0" 
                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
 <xsl:param name="user"/>
+
+<xsl:param name="base"/>
+
 <xsl:template match="/">
 <html>
 	<head>
+	   <xsl:if test="$base">
+			<base>
+				<xsl:attribute name="href"><xsl:value-of select="$base"/></xsl:attribute>
+			</base>
+        </xsl:if>
 		<link type="text/css" rel="stylesheet" href="css/page.css"/>
 	</head>
 	<body>
@@ -47,6 +55,9 @@
 				    <xsl:if test="$user!='anonymous'">
 						<a href="logout" style="color:#4C6C8F;font-size:75%;">
 							Logout
+						</a><br/>
+						<a href="tools/" style="color:#4C6C8F;font-size:75%;">
+							Tools
 						</a>
 				    </xsl:if>
 				</td>

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/css/forms-calendar.css
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/css/forms-calendar.css?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/css/forms-calendar.css	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,92 @@
+/*
+* Copyright 1999-2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* 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.
+*/
+#forms_calendarDiv {
+    position: absolute;
+    visibility: hidden;
+    background-color: white;
+    layer-background-color: white;
+}
+
+.forms_cpYearNavigation, .forms_cpMonthNavigation {
+    background-color:#C0C0C0;
+    text-align:center;
+    vertical-align:center;
+    text-decoration:none;
+    color:#000000;
+    font-weight:bold;
+}
+  
+.forms_cpDayColumnHeader, .forms_cpYearNavigation, .forms_cpMonthNavigation, .forms_cpCurrentMonthDate, .forms_cpCurrentMonthDateDisabled, .forms_cpOtherMonthDate, .forms_cpOtherMonthDateDisabled, .forms_cpCurrentDate, .forms_cpCurrentDateDisabled, .forms_cpTodayText, .forms_cpTodayTextDisabled, .forms_cpText {
+    font-family:arial;
+    font-size:8pt;
+}
+  
+TD.forms_cpDayColumnHeader {
+    text-align:right;
+    border:solid thin #C0C0C0;
+    border-width:0 0 19 0;
+}
+  
+.forms_cpCurrentMonthDate, .forms_cpOtherMonthDate, .forms_cpCurrentDate  {
+    text-align:right;
+    text-decoration:none;
+}
+  
+.forms_cpCurrentMonthDateDisabled, .forms_cpOtherMonthDateDisabled, .forms_cpCurrentDateDisabled {
+    color:#D0D0D0;
+    text-align:right;
+    text-decoration:line-through;
+}
+  
+.forms_cpCurrentMonthDate, .forms_cpCurrentDate {
+    color:#000000;
+}
+  
+.forms_cpOtherMonthDate {
+    color:#808080;
+}
+  
+TD.forms_cpCurrentDate {
+    color:white; background-color: #C0C0C0;
+    border-width:1;
+    border:solid thin #800000;
+}
+  
+TD.forms_cpCurrentDateDisabled {
+    border-width:1;
+    border:solid thin #FFAAAA;
+}
+  
+TD.forms_cpTodayText, TD.forms_cpTodayTextDisabled {
+    border:solid thin #C0C0C0;
+    border-width:1 0 0 0;
+}
+  
+A.forms_cpTodayText, SPAN.forms_cpTodayTextDisabled {
+    height:20px;
+}
+  
+A.forms_cpTodayText {
+    color:black;
+}
+  
+.forms_cpTodayTextDisabled {
+    color:#D0D0D0;
+}
+  
+.forms_cpBorder {
+    border:solid thin #808080;
+}

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/css/forms.css
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/css/forms.css?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/css/forms.css	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,75 @@
+/*
+* Copyright 1999-2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* 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.
+*/
+.forms-tab {
+    background-color: white;
+    border: 1px solid black;
+    border-bottom-width: 0px;
+    padding: 2px 1em 2px 1em;
+    margin-right: 5px;
+    position: relative;
+    text-decoration: none;
+    top: -1px;
+    z-index: 1;
+    cursor: pointer;
+}
+
+.forms-tab.forms-activeTab {
+    font-weight: bold;
+    padding-top: 5px;
+    cursor: default;
+    z-index: 3;
+}
+
+.forms-tabContent {
+    background-color: white;
+    border: 1px solid black;
+    padding: 1em;
+    position: relative;
+    z-index: 2;
+}
+
+.forms-validation-message, a.forms-validation-message:link {
+    color: red;
+    font-weight: bold;
+}
+
+.forms-validation-errors {
+}
+
+.forms-validation-error {
+}
+
+.forms-field-required {
+	color:blue;
+    font-weight: bold;
+}
+
+.forms-help {
+    border-style: dotted;
+    border-width: 1px;
+    padding: 5px;
+    background-color:#FFFFC0; /* light yellow */
+    width: 200px; /* otherwise IE does a weird layout */
+    z-index:1000; /* must be higher than forms-tabContent */
+}
+
+.forms-doubleList select {
+    width: 150px;
+}
+
+.forms-doubleList input {
+    width: 40px;
+}

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/images/cal.gif
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/images/cal.gif?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/js/forms-lib.js
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/js/forms-lib.js?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/js/forms-lib.js	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,186 @@
+/*
+* Copyright 1999-2004 The Apache Software Foundation
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* 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.
+*/
+/**
+ * Runtime JavaScript library for Cocoon forms.
+ *
+ * @author <a href="http://www.apache.org/~sylvain/">Sylvain Wallez</a>
+ * @version CVS $Id$
+ */
+
+// Handlers that are to be called in the document's "onload" event
+var forms_onloadHandlers = new Array();
+
+function forms_onload() {
+    for (var i = 0; i < forms_onloadHandlers.length; i++) {
+        forms_onloadHandlers[i].forms_onload();
+    }
+    // Clear it (we no more need them)
+    forms_onloadHandlers = null;
+}
+
+// Handlers that are to be called in form's "onsubmit" event
+//FIXME: this single var implies only one form per page, and needs to be
+//       visited if we decide to support several forms per page.
+var forms_onsubmitHandlers = new Array();
+
+function forms_onsubmit() {
+    if (forms_onsubmitHandlers == null) {
+        alert("onsubmit called twice!");
+    }
+
+    for (var i = 0; i < forms_onsubmitHandlers.length; i++) {
+        forms_onsubmitHandlers[i].forms_onsubmit();
+    }
+    // clear it
+    forms_onsubmitHandlers = null;
+}
+
+/**
+ * Submit the form containing an element, also storing in the hidden
+ * 'forms_submit_id' field the name of the element which triggered the submit.
+ */
+function forms_submitForm(element, name) {
+    if (name == undefined) {
+        name = element.name;
+    }
+    
+    var form = forms_getForm(element);
+    if (form == null) {
+        alert("Cannot find form for " + element);
+    } else {
+        form["forms_submit_id"].value = name;
+        // FIXME: programmatically submitting the form doesn't trigger onsubmit ? (both in IE and Moz)
+        forms_onsubmit();
+        form.submit();
+    }
+}
+
+/**
+ * Crawl the parents of an element up to finding a form.
+ */
+function forms_getForm(element) {
+    while(element != null && element.tagName != "FORM") {
+        element = element.parentNode;
+    }
+    return element;
+}
+
+/**
+ * Move a named element as an immediate child of the <body> element.
+ * This is required for help popups inside <wi:group> tabs. The reason is that CSS positioning
+ * properties ("left" and "top") on a block with a "position: absolute" are actually relative to
+ * the nearest ancestor that has a position of "absolute", "relative" or "fixed".
+ * See http://www.w3.org/TR/CSS21/visudet.html#containing-block-details $4
+ */
+
+function forms_moveInBody(element) {
+    element.parentNode.removeChild(element);
+    document.body.appendChild(element);
+}
+
+/**
+ * Create a popup window for a named element.
+ *
+ * @param id the ID of the element to make a popup with.
+ */
+function forms_createPopupWindow(id) {
+    var result = new PopupWindow(id);
+    result.autoHide();
+    // add to onload handlers
+    result.forms_id = id;
+    result.forms_onload = function() {
+        forms_moveInBody(document.getElementById(this.forms_id));
+    }
+    forms_onloadHandlers.push(result);
+    return result;
+}
+
+
+function forms_createOptionTransfer(id, submitOnChange) {
+    var result = new OptionTransfer(id + ".unselected", id);
+    result.setAutoSort(true);
+    // add to onload handlers
+    result.forms_id = id;
+    result.forms_onload = function() {
+        var form = forms_getForm(document.getElementById(this.forms_id));
+        this.init(form);
+        sortSelect(this.left);
+        sortSelect(this.right);
+    }
+    result.submitOnChange = submitOnChange;
+    result.forms_transferLeft = function() {
+        this.transferLeft();
+        if (this.submitOnChange) {
+            forms_submitForm(document.getElementById(this.forms_id));
+        }
+    }
+    result.forms_transferRight = function() {
+        this.transferRight();
+        if (this.submitOnChange) {
+            forms_submitForm(document.getElementById(this.forms_id));
+        }
+    }
+    result.forms_transferAllLeft = function() {
+        this.transferAllLeft();
+        if (this.submitOnChange) {
+            forms_submitForm(document.getElementById(this.forms_id));
+        }
+    };
+    result.forms_transferAllRight = function() {
+        this.transferAllRight();
+        if (this.submitOnChange) {
+            forms_submitForm(document.getElementById(this.forms_id));
+        }
+    };
+    forms_onloadHandlers.push(result);
+    
+    // add to onsubmit handlers
+    result.forms_onsubmit = function() {
+        // Select all options in the "selected" list to that
+        // its values are sent.
+        selectAllOptions(this.right);
+    }
+    forms_onsubmitHandlers.push(result);
+    return result;
+}
+
+
+/**
+ * Show a tab in a <wi:group>
+ *
+ * @param tabgroup (string) name of the <wi:group>
+ * @param idx (integer) index of the selected tab
+ * @param length (integer) total number of tabs
+ * @param state (string, optional) name of the input storing the tabgroup state
+ */
+function forms_showTab(tabgroup, idx, length, state) {
+    for (var i = 0; i < length; i++) {
+        // Change tab status (selected/unselected)
+        var tab = document.getElementById(tabgroup + "_tab_" + i);
+        if (tab != null) {
+            tab.className = (i == idx) ? 'forms-tab forms-activeTab': 'forms-tab';
+        }
+        // Change tab content visibilty
+        var tabitems = document.getElementById(tabgroup + "_items_" + i);
+        if (tabitems != null) {
+            tabitems.style.display = (i == idx) ? '' : 'none';
+        }
+    }
+    // Change state value
+    if (state.length > 0) {
+        document.forms[0][state].value = idx;
+    }
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/js/mattkruse-lib.js
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/js/mattkruse-lib.js?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/js/mattkruse-lib.js	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,124 @@
+// ===================================================================
+// Author: Matt Kruse <matt@mattkruse.com>
+// WWW: http://www.mattkruse.com/
+//
+// NOTICE: You may use this code for any purpose, commercial or
+// private, without any further permission from the author. You may
+// remove this notice from your final code if you wish, however it is
+// appreciated by the author if at least my web site address is kept.
+//
+// You may *NOT* re-distribute this code in any way except through its
+// use. That means, you can include it in your product, or your web
+// site, or any other form where the code is actually being used. You
+// may not put the plain javascript up on your site for download or
+// include it in your javascript libraries for download. 
+// If you wish to share this code with others, please just point them
+// to the URL instead.
+// Please DO NOT link directly to my .js files from your site. Copy
+// the files to your server and use them there. Thank you.
+// ===================================================================
+
+/* SOURCE FILE: selectbox.js */
+function selectUnselectMatchingOptions(obj,regex,which,only){if(window.RegExp){if(which == "select"){var selected1=true;var selected2=false;}else if(which == "unselect"){var selected1=false;var selected2=true;}else{return;}var re = new RegExp(regex);for(var i=0;i<obj.options.length;i++){if(re.test(obj.options[i].text)){obj.options[i].selected = selected1;}else{if(only == true){obj.options[i].selected = selected2;}}}}}
+function selectMatchingOptions(obj,regex){selectUnselectMatchingOptions(obj,regex,"select",false);}
+function selectOnlyMatchingOptions(obj,regex){selectUnselectMatchingOptions(obj,regex,"select",true);}
+function unSelectMatchingOptions(obj,regex){selectUnselectMatchingOptions(obj,regex,"unselect",false);}
+function sortSelect(obj){var o = new Array();if(obj.options==null){return;}for(var i=0;i<obj.options.length;i++){o[o.length] = new Option( obj.options[i].text, obj.options[i].value, obj.options[i].defaultSelected, obj.options[i].selected) ;}if(o.length==0){return;}o = o.sort(
+function(a,b){if((a.text+"") <(b.text+"")){return -1;}if((a.text+"") >(b.text+"")){return 1;}return 0;});for(var i=0;i<o.length;i++){obj.options[i] = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected);}}
+function selectAllOptions(obj){for(var i=0;i<obj.options.length;i++){obj.options[i].selected = true;}}
+function moveSelectedOptions(from,to){if(arguments.length>3){var regex = arguments[3];if(regex != ""){unSelectMatchingOptions(from,regex);}}for(var i=0;i<from.options.length;i++){var o = from.options[i];if(o.selected){to.options[to.options.length] = new Option( o.text, o.value, false, false);}}for(var i=(from.options.length-1);i>=0;i--){var o = from.options[i];if(o.selected){from.options[i] = null;}}if((arguments.length<3) ||(arguments[2]==true)){sortSelect(from);sortSelect(to);}from.selectedIndex = -1;to.selectedIndex = -1;}
+function copySelectedOptions(from,to){var options = new Object();for(var i=0;i<to.options.length;i++){options[to.options[i].text] = true;}for(var i=0;i<from.options.length;i++){var o = from.options[i];if(o.selected){if(options[o.text] == null || options[o.text] == "undefined"){to.options[to.options.length] = new Option( o.text, o.value, false, false);}}}if((arguments.length<3) ||(arguments[2]==true)){sortSelect(to);}from.selectedIndex = -1;to.selectedIndex = -1;}
+function moveAllOptions(from,to){selectAllOptions(from);if(arguments.length==2){moveSelectedOptions(from,to);}else if(arguments.length==3){moveSelectedOptions(from,to,arguments[2]);}else if(arguments.length==4){moveSelectedOptions(from,to,arguments[2],arguments[3]);}}
+function copyAllOptions(from,to){selectAllOptions(from);if(arguments.length==2){copySelectedOptions(from,to);}else if(arguments.length==3){copySelectedOptions(from,to,arguments[2]);}}
+function swapOptions(obj,i,j){var o = obj.options;var i_selected = o[i].selected;var j_selected = o[j].selected;var temp = new Option(o[i].text, o[i].value, o[i].defaultSelected, o[i].selected);var temp2= new Option(o[j].text, o[j].value, o[j].defaultSelected, o[j].selected);o[i] = temp2;o[j] = temp;o[i].selected = j_selected;o[j].selected = i_selected;}
+function moveOptionUp(obj){var selectedCount=0;for(i=0;i<obj.options.length;i++){if(obj.options[i].selected){selectedCount++;}}if(selectedCount!=1){return;}var i = obj.selectedIndex;if(i == 0){return;}swapOptions(obj,i,i-1);obj.options[i-1].selected = true;}
+function moveOptionDown(obj){var selectedCount=0;for(i=0;i<obj.options.length;i++){if(obj.options[i].selected){selectedCount++;}}if(selectedCount != 1){return;}var i = obj.selectedIndex;if(i ==(obj.options.length-1)){return;}swapOptions(obj,i,i+1);obj.options[i+1].selected = true;}
+function removeSelectedOptions(from){for(var i=(from.options.length-1);i>=0;i--){var o=from.options[i];if(o.selected){from.options[i] = null;}}from.selectedIndex = -1;}
+
+
+/* SOURCE FILE: OptionTransfer.js */
+
+function OT_transferLeft(){moveSelectedOptions(this.right,this.left,this.autoSort);this.update();}
+function OT_transferRight(){moveSelectedOptions(this.left,this.right,this.autoSort);this.update();}
+function OT_transferAllLeft(){moveAllOptions(this.right,this.left,this.autoSort);this.update();}
+function OT_transferAllRight(){moveAllOptions(this.left,this.right,this.autoSort);this.update();}
+function OT_saveRemovedLeftOptions(f){this.removedLeftField = f;}
+function OT_saveRemovedRightOptions(f){this.removedRightField = f;}
+function OT_saveAddedLeftOptions(f){this.addedLeftField = f;}
+function OT_saveAddedRightOptions(f){this.addedRightField = f;}
+function OT_saveNewLeftOptions(f){this.newLeftField = f;}
+function OT_saveNewRightOptions(f){this.newRightField = f;}
+function OT_update(){var removedLeft = new Object();var removedRight = new Object();var addedLeft = new Object();var addedRight = new Object();var newLeft = new Object();var newRight = new Object();for(var i=0;i<this.left.options.length;i++){var o=this.left.options[i];newLeft[o.value]=1;if(typeof(this.originalLeftValues[o.value])=="undefined"){addedLeft[o.value]=1;removedRight[o.value]=1;}}for(var i=0;i<this.right.options.length;i++){var o=this.right.options[i];newRight[o.value]=1;if(typeof(this.originalRightValues[o.value])=="undefined"){addedRight[o.value]=1;removedLeft[o.value]=1;}}if(this.removedLeftField!=null){this.removedLeftField.value = OT_join(removedLeft,this.delimiter);}if(this.removedRightField!=null){this.removedRightField.value = OT_join(removedRight,this.delimiter);}if(this.addedLeftField!=null){this.addedLeftField.value = OT_join(addedLeft,this.delimiter);}if(this.addedRightField!=null){this.addedRightField.value = OT_join(addedRight,this.delimiter);}if(this.newLeftField!=null){this.newLeftField.value = OT_join(newLeft,this.delimiter);}if(this.newRightField!=null){this.newRightField.value = OT_join(newRight,this.delimiter);}}
+function OT_join(o,delimiter){var val;var str="";for(val in o){if(str.length>0){str=str+delimiter;}str=str+val;}return str;}
+function OT_setDelimiter(val){this.delimiter=val;}
+function OT_setAutoSort(val){this.autoSort=val;}
+function OT_init(theform){this.form = theform;if(!theform[this.left]){alert("OptionTransfer init(): Left select list does not exist in form!");return false;}if(!theform[this.right]){alert("OptionTransfer init(): Right select list does not exist in form!");return false;}this.left=theform[this.left];this.right=theform[this.right];for(var i=0;i<this.left.options.length;i++){this.originalLeftValues[this.left.options[i].value]=1;}for(var i=0;i<this.right.options.length;i++){this.originalRightValues[this.right.options[i].value]=1;}if(this.removedLeftField!=null){this.removedLeftField=theform[this.removedLeftField];}if(this.removedRightField!=null){this.removedRightField=theform[this.removedRightField];}if(this.addedLeftField!=null){this.addedLeftField=theform[this.addedLeftField];}if(this.addedRightField!=null){this.addedRightField=theform[this.addedRightField];}if(this.newLeftField!=null){this.newLeftField=theform[this.newLeftField];}if(this.newRightField!=null){this.newRightField=theform[this.newRightField];}this.update();}
+function OptionTransfer(l,r){this.form = null;this.left=l;this.right=r;this.autoSort=true;this.delimiter=",";this.originalLeftValues = new Object();this.originalRightValues = new Object();this.removedLeftField = null;this.removedRightField = null;this.addedLeftField = null;this.addedRightField = null;this.newLeftField = null;this.newRightField = null;this.transferLeft=OT_transferLeft;this.transferRight=OT_transferRight;this.transferAllLeft=OT_transferAllLeft;this.transferAllRight=OT_transferAllRight;this.saveRemovedLeftOptions=OT_saveRemovedLeftOptions;this.saveRemovedRightOptions=OT_saveRemovedRightOptions;this.saveAddedLeftOptions=OT_saveAddedLeftOptions;this.saveAddedRightOptions=OT_saveAddedRightOptions;this.saveNewLeftOptions=OT_saveNewLeftOptions;this.saveNewRightOptions=OT_saveNewRightOptions;this.setDelimiter=OT_setDelimiter;this.setAutoSort=OT_setAutoSort;this.init=OT_init;this.update=OT_update;}
+
+/* SOURCE FILE: date.js */
+var MONTH_NAMES=new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');var DAY_NAMES=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sun','Mon','Tue','Wed','Thu','Fri','Sat');
+function LZ(x){return(x<0||x>9?"":"0")+x}
+function isDate(val,format){var date=getDateFromFormat(val,format);if(date==0){return false;}return true;}
+function compareDates(date1,dateformat1,date2,dateformat2){var d1=getDateFromFormat(date1,dateformat1);var d2=getDateFromFormat(date2,dateformat2);if(d1==0 || d2==0){return -1;}else if(d1 > d2){return 1;}return 0;}
+function formatDate(date,format){format=format+"";var result="";var i_format=0;var c="";var token="";var y=date.getYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value=new Object();if(y.length < 4){y=""+(y-0+1900);}value["y"]=""+y;value["yyyy"]=y;value["yy"]=y.substring(2,4);value["M"]=M;value["MM"]=LZ(M);value["MMM"]=MONTH_NAMES[M-1];value["NNN"]=MONTH_NAMES[M+11];value["d"]=d;value["dd"]=LZ(d);value["E"]=DAY_NAMES[E+7];value["EE"]=DAY_NAMES[E];value["H"]=H;value["HH"]=LZ(H);if(H==0){value["h"]=12;}else if(H>12){value["h"]=H-12;}else{value["h"]=H;}value["hh"]=LZ(value["h"]);if(H>11){value["K"]=H-12;}else{value["K"]=H;}value["k"]=H+1;value["KK"]=LZ(value["K"]);value["kk"]=LZ(value["k"]);if(H > 11){value["a"]="PM";}else{value["a"]="AM";}value["m"]=m;value["mm"]=LZ(m);value["s"]=s;value["ss"]=LZ(s);while(i_format < format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c) &&(i_format < format.length)){token += format.charAt(i_format++);}if(value[token] != null){result=result + value[token];}else{result=result + token;}}return result;}
+function _isInteger(val){var digits="1234567890";for(var i=0;i < val.length;i++){if(digits.indexOf(val.charAt(i))==-1){return false;}}return true;}
+function _getInt(str,i,minlength,maxlength){for(var x=maxlength;x>=minlength;x--){var token=str.substring(i,i+x);if(token.length < minlength){return null;}if(_isInteger(token)){return token;}}return null;}
+function getDateFromFormat(val,format){val=val+"";format=format+"";var i_val=0;var i_format=0;var c="";var token="";var token2="";var x,y;var now=new Date();var year=now.getYear();var month=now.getMonth()+1;var date=1;var hh=now.getHours();var mm=now.getMinutes();var ss=now.getSeconds();var ampm="";while(i_format < format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c) &&(i_format < format.length)){token += format.charAt(i_format++);}if(token=="yyyy" || token=="yy" || token=="y"){if(token=="yyyy"){x=4;y=4;}if(token=="yy"){x=2;y=2;}if(token=="y"){x=2;y=4;}year=_getInt(val,i_val,x,y);if(year==null){return 0;}i_val += year.length;if(year.length==2){if(year > 70){year=1900+(year-0);}else{year=2000+(year-0);}}}else if(token=="MMM"||token=="NNN"){month=0;for(var i=0;i<MONTH_NAMES.length;i++){var month_name=MONTH_NAMES[i];if(val.substring(i_val,i_val+month_name.length).toLowerCase()==month_name.toLowerCase()){if(token=="MMM"||(token=="NNN"&&i>11)){month=i+1;if(month>12){month -= 12;}i_val += month_name.length;break;}}}if((month < 1)||(month>12)){return 0;}}else if(token=="EE"||token=="E"){for(var i=0;i<DAY_NAMES.length;i++){var day_name=DAY_NAMES[i];if(val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()){i_val += day_name.length;break;}}}else if(token=="MM"||token=="M"){month=_getInt(val,i_val,token.length,2);if(month==null||(month<1)||(month>12)){return 0;}i_val+=month.length;}else if(token=="dd"||token=="d"){date=_getInt(val,i_val,token.length,2);if(date==null||(date<1)||(date>31)){return 0;}i_val+=date.length;}else if(token=="hh"||token=="h"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<1)||(hh>12)){return 0;}i_val+=hh.length;}else if(token=="HH"||token=="H"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<0)||(hh>23)){return 0;}i_val+=hh.length;}else if(token=="KK"||token=="K"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<0)||(hh>11)){return 0;}i_val+=hh.length;}else if(token=="kk"||token=="k"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<1)||(hh>24)){return 0;}i_val+=hh.length;hh--;}else if(token=="mm"||token=="m"){mm=_getInt(val,i_val,token.length,2);if(mm==null||(mm<0)||(mm>59)){return 0;}i_val+=mm.length;}else if(token=="ss"||token=="s"){ss=_getInt(val,i_val,token.length,2);if(ss==null||(ss<0)||(ss>59)){return 0;}i_val+=ss.length;}else if(token=="a"){if(val.substring(i_val,i_val+2).toLowerCase()=="am"){ampm="AM";}else if(val.substring(i_val,i_val+2).toLowerCase()=="pm"){ampm="PM";}else{return 0;}i_val+=2;}else{if(val.substring(i_val,i_val+token.length)!=token){return 0;}else{i_val+=token.length;}}}if(i_val != val.length){return 0;}if(month==2){if( ((year%4==0)&&(year%100 != 0) ) ||(year%400==0) ){if(date > 29){return 0;}}else{if(date > 28){return 0;}}}if((month==4)||(month==6)||(month==9)||(month==11)){if(date > 30){return 0;}}if(hh<12 && ampm=="PM"){hh=hh-0+12;}else if(hh>11 && ampm=="AM"){hh-=12;}var newdate=new Date(year,month-1,date,hh,mm,ss);return newdate.getTime();}
+function parseDate(val){var preferEuro=(arguments.length==2)?arguments[1]:false;generalFormats=new Array('y-M-d','MMM d, y','MMM d,y','y-MMM-d','d-MMM-y','MMM d');monthFirst=new Array('M/d/y','M-d-y','M.d.y','MMM-d','M/d','M-d');dateFirst =new Array('d/M/y','d-M-y','d.M.y','d-MMM','d/M','d-M');var checkList=new Array('generalFormats',preferEuro?'dateFirst':'monthFirst',preferEuro?'monthFirst':'dateFirst');var d=null;for(var i=0;i<checkList.length;i++){var l=window[checkList[i]];for(var j=0;j<l.length;j++){d=getDateFromFormat(val,l[j]);if(d!=0){return new Date(d);}}}return null;}
+
+/* SOURCE FILE: AnchorPosition.js */
+function getAnchorPosition(anchorname){var useWindow=false;var coordinates=new Object();var x=0,y=0;var use_gebi=false, use_css=false, use_layers=false;if(document.getElementById){use_gebi=true;}else if(document.all){use_css=true;}else if(document.layers){use_layers=true;}if(use_gebi && document.all){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else if(use_gebi){var o=document.getElementById(anchorname);x=AnchorPosition_getPageOffsetLeft(o);y=AnchorPosition_getPageOffsetTop(o);}else if(use_css){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else if(use_layers){var found=0;for(var i=0;i<document.anchors.length;i++){if(document.anchors[i].name==anchorname){found=1;break;}}if(found==0){coordinates.x=0;coordinates.y=0;return coordinates;}x=document.anchors[i].x;y=document.anchors[i].y;}else{coordinates.x=0;coordinates.y=0;return coordinates;}coordinates.x=x;coordinates.y=y;return coordinates;}
+function getAnchorWindowPosition(anchorname){var coordinates=getAnchorPosition(anchorname);var x=0;var y=0;if(document.getElementById){if(isNaN(window.screenX)){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop;}else{x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}}else if(document.all){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop;}else if(document.layers){x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}coordinates.x=x;coordinates.y=y;return coordinates;}
+function AnchorPosition_getPageOffsetLeft(el){var ol=el.offsetLeft;while((el=el.offsetParent) != null){ol += el.offsetLeft;}return ol;}
+function AnchorPosition_getWindowOffsetLeft(el){return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;}
+function AnchorPosition_getPageOffsetTop(el){var ot=el.offsetTop;while((el=el.offsetParent) != null){ot += el.offsetTop;}return ot;}
+function AnchorPosition_getWindowOffsetTop(el){return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;}
+
+/* SOURCE FILE: PopupWindow.js */
+function PopupWindow_getXYPosition(anchorname){var coordinates;if(this.type == "WINDOW"){coordinates = getAnchorWindowPosition(anchorname);}else{coordinates = getAnchorPosition(anchorname);}this.x = coordinates.x;this.y = coordinates.y;}
+function PopupWindow_setSize(width,height){this.width = width;this.height = height;}
+function PopupWindow_populate(contents){this.contents = contents;this.populated = false;}
+function PopupWindow_setUrl(url){this.url = url;}
+function PopupWindow_setWindowProperties(props){this.windowProperties = props;}
+function PopupWindow_refresh(){if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).innerHTML = this.contents;}else if(this.use_css){document.all[this.divName].innerHTML = this.contents;}else if(this.use_layers){var d = document.layers[this.divName];d.document.open();d.document.writeln(this.contents);d.document.close();}}else{if(this.popupWindow != null && !this.popupWindow.closed){if(this.url!=""){this.popupWindow.location.href=this.url;}else{this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);this.popupWindow.document.close();}this.popupWindow.focus();}}}
+function PopupWindow_showPopup(anchorname){this.getXYPosition(anchorname);this.x += this.offsetX;this.y += this.offsetY;if(!this.populated &&(this.contents != "")){this.populated = true;this.refresh();}if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).style.left = this.x;document.getElementById(this.divName).style.top = this.y;document.getElementById(this.divName).style.visibility = "visible";}else if(this.use_css){document.all[this.divName].style.left = this.x;document.all[this.divName].style.top = this.y;document.all[this.divName].style.visibility = "visible";}else if(this.use_layers){document.layers[this.divName].left = this.x;document.layers[this.divName].top = this.y;document.layers[this.divName].visibility = "visible";}}else{if(this.popupWindow == null || this.popupWindow.closed){if(this.x<0){this.x=0;}if(this.y<0){this.y=0;}if(screen && screen.availHeight){if((this.y + this.height) > screen.availHeight){this.y = screen.availHeight - this.height;}}if(screen && screen.availWidth){if((this.x + this.width) > screen.availWidth){this.x = screen.availWidth - this.width;}}var avoidAboutBlank = window.opera ||( document.layers && !navigator.mimeTypes['*']) || navigator.vendor == 'KDE' ||( document.childNodes && !document.all && !navigator.taintEnabled);this.popupWindow = window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");}this.refresh();}}
+function PopupWindow_hidePopup(){if(this.divName != null){if(this.use_gebi){document.getElementById(this.divName).style.visibility = "hidden";}else if(this.use_css){document.all[this.divName].style.visibility = "hidden";}else if(this.use_layers){document.layers[this.divName].visibility = "hidden";}}else{if(this.popupWindow && !this.popupWindow.closed){this.popupWindow.close();this.popupWindow = null;}}}
+function PopupWindow_isClicked(e){if(this.divName != null){if(this.use_layers){var clickX = e.pageX;var clickY = e.pageY;var t = document.layers[this.divName];if((clickX > t.left) &&(clickX < t.left+t.clip.width) &&(clickY > t.top) &&(clickY < t.top+t.clip.height)){return true;}else{return false;}}else if(document.all){var t = window.event.srcElement;while(t.parentElement != null){if(t.id==this.divName){return true;}t = t.parentElement;}return false;}else if(this.use_gebi){var t = e.originalTarget;while(t.parentNode != null){if(t.id==this.divName){return true;}t = t.parentNode;}return false;}return false;}return false;}
+function PopupWindow_hideIfNotClicked(e){if(this.autoHideEnabled && !this.isClicked(e)){this.hidePopup();}}
+function PopupWindow_autoHide(){this.autoHideEnabled = true;}
+function PopupWindow_hidePopupWindows(e){for(var i=0;i<popupWindowObjects.length;i++){if(popupWindowObjects[i] != null){var p = popupWindowObjects[i];p.hideIfNotClicked(e);}}}
+function PopupWindow_attachListener(){if(document.layers){document.captureEvents(Event.MOUSEUP);}window.popupWindowOldEventListener = document.onmouseup;if(window.popupWindowOldEventListener != null){document.onmouseup = new Function("window.popupWindowOldEventListener();PopupWindow_hidePopupWindows();");}else{document.onmouseup = PopupWindow_hidePopupWindows;}}
+function PopupWindow(){if(!window.popupWindowIndex){window.popupWindowIndex = 0;}if(!window.popupWindowObjects){window.popupWindowObjects = new Array();}if(!window.listenerAttached){window.listenerAttached = true;PopupWindow_attachListener();}this.index = popupWindowIndex++;popupWindowObjects[this.index] = this;this.divName = null;this.popupWindow = null;this.width=0;this.height=0;this.populated = false;this.visible = false;this.autoHideEnabled = false;this.contents = "";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";if(arguments.length>0){this.type="DIV";this.divName = arguments[0];}else{this.type="WINDOW";}this.use_gebi = false;this.use_css = false;this.use_layers = false;if(document.getElementById){this.use_gebi = true;}else if(document.all){this.use_css = true;}else if(document.layers){this.use_layers = true;}else{this.type = "WINDOW";}this.offsetX = 0;this.offsetY = 0;this.getXYPosition = PopupWindow_getXYPosition;this.populate = PopupWindow_populate;this.setUrl = PopupWindow_setUrl;this.setWindowProperties = PopupWindow_setWindowProperties;this.refresh = PopupWindow_refresh;this.showPopup = PopupWindow_showPopup;this.hidePopup = PopupWindow_hidePopup;this.setSize = PopupWindow_setSize;this.isClicked = PopupWindow_isClicked;this.autoHide = PopupWindow_autoHide;this.hideIfNotClicked = PopupWindow_hideIfNotClicked;}
+
+
+/* SOURCE FILE: CalendarPopup.js */
+
+function CalendarPopup(){var c;if(arguments.length>0){c = new PopupWindow(arguments[0]);}else{c = new PopupWindow();c.setSize(150,175);}c.offsetX = -152;c.offsetY = 25;c.autoHide();c.monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");c.monthAbbreviations = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");c.dayHeaders = new Array("S","M","T","W","T","F","S");c.returnFunction = "CP_tmpReturnFunction";c.returnMonthFunction = "CP_tmpReturnMonthFunction";c.returnQuarterFunction = "CP_tmpReturnQuarterFunction";c.returnYearFunction = "CP_tmpReturnYearFunction";c.weekStartDay = 0;c.isShowYearNavigation = false;c.displayType = "date";c.disabledWeekDays = new Object();c.disabledDatesExpression = "";c.yearSelectStartOffset = 2;c.currentDate = null;c.todayText="Today";c.cssPrefix="";c.isShowYearNavigationInput=false;window.CP_targetInput = null;window.CP_dateFormat = "MM/dd/yyyy";c.setReturnFunction = CP_setReturnFunction;c.setReturnMonthFunction = CP_setReturnMonthFunction;c.setReturnQuarterFunction = CP_setReturnQuarterFunction;c.setReturnYearFunction = CP_setReturnYearFunction;c.setMonthNames = CP_setMonthNames;c.setMonthAbbreviations = CP_setMonthAbbreviations;c.setDayHeaders = CP_setDayHeaders;c.setWeekStartDay = CP_setWeekStartDay;c.setDisplayType = CP_setDisplayType;c.setDisabledWeekDays = CP_setDisabledWeekDays;c.addDisabledDates = CP_addDisabledDates;c.setYearSelectStartOffset = CP_setYearSelectStartOffset;c.setTodayText = CP_setTodayText;c.showYearNavigation = CP_showYearNavigation;c.showCalendar = CP_showCalendar;c.hideCalendar = CP_hideCalendar;c.getStyles = getCalendarStyles;c.refreshCalendar = CP_refreshCalendar;c.getCalendar = CP_getCalendar;c.select = CP_select;c.setCssPrefix = CP_setCssPrefix;c.showYearNavigationInput = CP_showYearNavigationInput
+return c;}
+function CP_tmpReturnFunction(y,m,d){if(window.CP_targetInput!=null){var dt = new Date(y,m-1,d,0,0,0);window.CP_targetInput.value = formatDate(dt,window.CP_dateFormat);}else{alert('Use setReturnFunction() to define which function will get the clicked results!');}}
+function CP_tmpReturnMonthFunction(y,m){alert('Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , month='+m);}
+function CP_tmpReturnQuarterFunction(y,q){alert('Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , quarter='+q);}
+function CP_tmpReturnYearFunction(y){alert('Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year='+y);}
+function CP_setReturnFunction(name){this.returnFunction = name;}
+function CP_setReturnMonthFunction(name){this.returnMonthFunction = name;}
+function CP_setReturnQuarterFunction(name){this.returnQuarterFunction = name;}
+function CP_setReturnYearFunction(name){this.returnYearFunction = name;}
+function CP_setMonthNames(){for(var i=0;i<arguments.length;i++){this.monthNames[i] = arguments[i];}}
+function CP_setMonthAbbreviations(){for(var i=0;i<arguments.length;i++){this.monthAbbreviations[i] = arguments[i];}}
+function CP_setDayHeaders(){for(var i=0;i<arguments.length;i++){this.dayHeaders[i] = arguments[i];}}
+function CP_setWeekStartDay(day){this.weekStartDay = day;}
+function CP_showYearNavigation(){this.isShowYearNavigation =(arguments.length>0)?arguments[0]:true;}
+function CP_setDisplayType(type){if(type!="date"&&type!="week-end"&&type!="month"&&type!="quarter"&&type!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false;}this.displayType=type;}
+function CP_setYearSelectStartOffset(num){this.yearSelectStartOffset=num;}
+function CP_setDisabledWeekDays(){this.disabledWeekDays = new Object();for(var i=0;i<arguments.length;i++){this.disabledWeekDays[arguments[i]] = true;}}
+function CP_addDisabledDates(start, end){if(arguments.length==1){end=start;}if(start==null && end==null){return;}if(this.disabledDatesExpression!=""){this.disabledDatesExpression+= "||";}if(start!=null){start = parseDate(start);start=""+start.getFullYear()+LZ(start.getMonth()+1)+LZ(start.getDate());}if(end!=null){end=parseDate(end);end=""+end.getFullYear()+LZ(end.getMonth()+1)+LZ(end.getDate());}if(start==null){this.disabledDatesExpression+="(ds<="+end+")";}else if(end  ==null){this.disabledDatesExpression+="(ds>="+start+")";}else{this.disabledDatesExpression+="(ds>="+start+"&&ds<="+end+")";}}
+function CP_setTodayText(text){this.todayText = text;}
+function CP_setCssPrefix(val){this.cssPrefix = val;}
+function CP_showYearNavigationInput(){this.isShowYearNavigationInput =(arguments.length>0)?arguments[0]:true;}
+function CP_hideCalendar(){if(arguments.length > 0){window.popupWindowObjects[arguments[0]].hidePopup();}else{this.hidePopup();}}
+function CP_refreshCalendar(index){var calObject = window.popupWindowObjects[index];if(arguments.length>1){calObject.populate(calObject.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));}else{calObject.populate(calObject.getCalendar());}calObject.refresh();}
+function CP_showCalendar(anchorname){if(arguments.length>1){if(arguments[1]==null||arguments[1]==""){this.currentDate=new Date();}else{this.currentDate=new Date(parseDate(arguments[1]));}}this.populate(this.getCalendar());this.showPopup(anchorname);}
+function CP_select(inputobj, linkname, format){var selectedDate=(arguments.length>3)?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return;}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return;}if(inputobj.type!="text" && inputobj.type!="hidden" && inputobj.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CP_targetInput=null;return;}window.CP_targetInput = inputobj;this.currentDate=null;var time=0;if(selectedDate!=null){time = getDateFromFormat(selectedDate,format)}else if(inputobj.value!=""){time = getDateFromFormat(inputobj.value,format);}if(selectedDate!=null || inputobj.value!=""){if(time==0){this.currentDate=null;}else{this.currentDate=new Date(time);}}window.CP_dateFormat = format;this.showCalendar(linkname);}
+function getCalendarStyles(){var result = "";var p = "";if(this!=null && typeof(this.cssPrefix)!="undefined" && this.cssPrefix!=null && this.cssPrefix!=""){p=this.cssPrefix;}result += "<STYLE>\n";result += "."+p+"cpYearNavigation,."+p+"cpMonthNavigation{background-color:#C0C0C0;text-align:center;vertical-align:center;text-decoration:none;color:#000000;font-weight:bold;}\n";result += "."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+p+"cpMonthNavigation,."+p+"cpCurrentMonthDate,."+p+"cpCurrentMonthDateDisabled,."+p+"cpOtherMonthDate,."+p+"cpOtherMonthDateDisabled,."+p+"cpCurrentDate,."+p+"cpCurrentDateDisabled,."+p+"cpTodayText,."+p+"cpTodayTextDisabled,."+p+"cpText{font-family:arial;font-size:8pt;}\n";result += "TD."+p+"cpDayColumnHeader{text-align:right;border:solid thin #C0C0C0;border-width:0 0 1 0;}\n";result += "."+p+"cpCurrentMonthDate, ."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate{text-align:right;text-decoration:none;}\n";result += "."+p+"cpCurrentMonthDateDisabled, ."+p+"cpOtherMonthDateDisabled, ."+p+"cpCurrentDateDisabled{color:#D0D0D0;text-align:right;text-decoration:line-through;}\n";result += "."+p+"cpCurrentMonthDate, .cpCurrentDate{color:#000000;}\n";result += "."+p+"cpOtherMonthDate{color:#808080;}\n";result += "TD."+p+"cpCurrentDate{color:white;background-color: #C0C0C0;border-width:1;border:solid thin #800000;}\n";result += "TD."+p+"cpCurrentDateDisabled{border-width:1;border:solid thin #FFAAAA;}\n";result += "TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisabled{border:solid thin #C0C0C0;border-width:1 0 0 0;}\n";result += "A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisabled{height:20px;}\n";result += "A."+p+"cpTodayText{color:black;}\n";result += "."+p+"cpTodayTextDisabled{color:#D0D0D0;}\n";result += "."+p+"cpBorder{border:solid thin #808080;}\n";result += "</STYLE>\n";return result;}
+function CP_getCalendar(){var now = new Date();if(this.type == "WINDOW"){var windowref = "window.opener.";}else{var windowref = "";}var result = "";if(this.type == "WINDOW"){result += "<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result += '<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n';}else{result += '<TABLE CLASS="'+this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result += '<TR><TD ALIGN=CENTER>\n';result += '<CENTER>\n';}if(this.displayType=="date" || this.displayType=="week-end"){if(this.currentDate==null){this.currentDate = now;}if(arguments.length > 0){var month = arguments[0];}else{var month = this.currentDate.getMonth()+1;}if(arguments.length > 1 && arguments[1]>0 && arguments[1]-0==arguments[1]){var year = arguments[1];}else{var year = this.currentDate.getFullYear();}var daysinmonth= new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);if( ((year%4 == 0)&&(year%100 != 0) ) ||(year%400 == 0) ){daysinmonth[2] = 29;}var current_month = new Date(year,month-1,1);var display_year = year;var display_month = month;var display_date = 1;var weekday= current_month.getDay();var offset = 0;offset =(weekday >= this.weekStartDay) ? weekday-this.weekStartDay : 7-this.weekStartDay+weekday ;if(offset > 0){display_month--;if(display_month < 1){display_month = 12;display_year--;}display_date = daysinmonth[display_month]-offset+1;}var next_month = month+1;var next_month_year = year;if(next_month > 12){next_month=1;next_month_year++;}var last_month = month-1;var last_month_year = year;if(last_month < 1){last_month=12;last_month_year--;}var date_class;if(this.type!="WINDOW"){result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";}result += '<TR>\n';var refresh = 'javascript:'+windowref+'CP_refreshCalendar';if(this.isShowYearNavigation){result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+'('+this.index+','+last_month+','+last_month_year+');">&lt;</A></TD>';result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="58"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+'</SPAN></TD>';result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+'('+this.index+','+next_month+','+next_month_year+');">&gt;</A></TD>';result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refresh+'('+this.index+','+month+','+(year-1)+');">&lt;</A></TD>';if(this.isShowYearNavigationInput){result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+'('+this.index+','+month+',this.value-0);"></TD>';}else{result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><SPAN CLASS="'+this.cssPrefix+'cpYearNavigation">'+year+'</SPAN></TD>';}result += '<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refresh+'('+this.index+','+month+','+(year+1)+');">&gt;</A></TD>';}else{result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+'('+this.index+','+last_month+','+last_month_year+');">&lt;&lt;</A></TD>\n';result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="100"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+' '+year+'</SPAN></TD>\n';result += '<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+'('+this.index+','+next_month+','+next_month_year+');">&gt;&gt;</A></TD>\n';}result += '</TR></TABLE>\n';result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n';result += '<TR>\n';for(var j=0;j<7;j++){result += '<TD CLASS="'+this.cssPrefix+'cpDayColumnHeader" WIDTH="14%"><SPAN CLASS="'+this.cssPrefix+'cpDayColumnHeader">'+this.dayHeaders[(this.weekStartDay+j)%7]+'</TD>\n';}result += '</TR>\n';for(var row=1;row<=6;row++){result += '<TR>\n';for(var col=1;col<=7;col++){var disabled=false;if(this.disabledDatesExpression!=""){var ds=""+display_year+LZ(display_month)+LZ(display_date);eval("disabled=("+this.disabledDatesExpression+")");}var dateClass = "";if((display_month == this.currentDate.getMonth()+1) &&(display_date==this.currentDate.getDate()) &&(display_year==this.currentDate.getFullYear())){dateClass = "cpCurrentDate";}else if(display_month == month){dateClass = "cpCurrentMonthDate";}else{dateClass = "cpOtherMonthDate";}if(disabled || this.disabledWeekDays[col-1]){result += '	<TD CLASS="'+this.cssPrefix+dateClass+'"><SPAN CLASS="'+this.cssPrefix+dateClass+'Disabled">'+display_date+'</SPAN></TD>\n';}else{var selected_date = display_date;var selected_month = display_month;var selected_year = display_year;if(this.displayType=="week-end"){var d = new Date(selected_year,selected_month-1,selected_date,0,0,0,0);d.setDate(d.getDate() +(7-col));selected_year = d.getYear();if(selected_year < 1000){selected_year += 1900;}selected_month = d.getMonth()+1;selected_date = d.getDate();}result += '	<TD CLASS="'+this.cssPrefix+dateClass+'"><A HREF="javascript:'+windowref+this.returnFunction+'('+selected_year+','+selected_month+','+selected_date+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+this.cssPrefix+dateClass+'">'+display_date+'</A></TD>\n';}display_date++;if(display_date > daysinmonth[display_month]){display_date=1;display_month++;}if(display_month > 12){display_month=1;display_year++;}}result += '</TR>';}var current_weekday = now.getDay() - this.weekStartDay;if(current_weekday < 0){current_weekday += 7;}result += '<TR>\n';result += '	<TD COLSPAN=7 ALIGN=CENTER CLASS="'+this.cssPrefix+'cpTodayText">\n';if(this.disabledDatesExpression!=""){var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate());eval("disabled=("+this.disabledDatesExpression+")");}if(disabled || this.disabledWeekDays[current_weekday+1]){result += '		<SPAN CLASS="'+this.cssPrefix+'cpTodayTextDisabled">'+this.todayText+'</SPAN>\n';}else{result += '		<A CLASS="'+this.cssPrefix+'cpTodayText" HREF="javascript:'+windowref+this.returnFunction+'(\''+now.getFullYear()+'\',\''+(now.getMonth()+1)+'\',\''+now.getDate()+'\');'+windowref+'CP_hideCalendar(\''+this.index+'\');">'+this.todayText+'</A>\n';}result += '		<BR>\n';result += '	</TD></TR></TABLE></CENTER></TD></TR></TABLE>\n';}if(this.displayType=="month" || this.displayType=="quarter" || this.displayType=="year"){if(arguments.length > 0){var year = arguments[0];}else{if(this.displayType=="year"){var year = now.getFullYear()-this.yearSelectStartOffset;}else{var year = now.getFullYear();}}if(this.displayType!="year" && this.isShowYearNavigation){result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result += '<TR>\n';result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year-1)+');">&lt;&lt;</A></TD>\n';result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="100">'+year+'</TD>\n';result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year+1)+');">&gt;&gt;</A></TD>\n';result += '</TR></TABLE>\n';}}if(this.displayType=="month"){result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<4;i++){result += '<TR>';for(var j=0;j<3;j++){var monthindex =((i*3)+j);result += '<TD WIDTH=33% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnMonthFunction+'('+year+','+(monthindex+1)+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+'</A></TD>';}result += '</TR>';}result += '</TABLE></CENTER></TD></TR></TABLE>\n';}if(this.displayType=="quarter"){result += '<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<2;i++){result += '<TR>';for(var j=0;j<2;j++){var quarter =((i*2)+j+1);result += '<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnQuarterFunction+'('+year+','+quarter+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+'</A><BR><BR></TD>';}result += '</TR>';}result += '</TABLE></CENTER></TD></TR></TABLE>\n';}if(this.displayType=="year"){var yearColumnSize = 4;result += "<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result += '<TR>\n';result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year-(yearColumnSize*2))+');">&lt;&lt;</A></TD>\n';result += '	<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year+(yearColumnSize*2))+');">&gt;&gt;</A></TD>\n';result += '</TR></TABLE>\n';result += '<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<yearColumnSize;i++){for(var j=0;j<2;j++){var currentyear = year+(j*yearColumnSize)+i;result += '<TD WIDTH=50% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnYearFunction+'('+currentyear+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+currentyear+'</A></TD>';}result += '</TR>';}result += '</TABLE></CENTER></TD></TR></TABLE>\n';}if(this.type == "WINDOW"){result += "</BODY></HTML>\n";}return result;}
+

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-advanced-field-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-advanced-field-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-advanced-field-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,164 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                exclude-result-prefixes="fi">
+  <!--+
+      | This stylesheet is designed to be included by 'forms-samples-styling.xsl'.
+      | It extends the 'forms-field-styling.xsl' with additional stylings.
+      | The very specific advanced stylings as the calendar or htmlarea (both
+      | also need additional JS files) are separated out of this file.
+      +-->
+
+  <xsl:import href="forms-field-styling.xsl"/>
+  <xsl:include href="forms-calendar-styling.xsl"/>
+  <xsl:include href="forms-htmlarea-styling.xsl"/>
+  <!-- Location of the resources directory, where JS libs and icons are stored -->
+  <xsl:param name="resources-uri">resources</xsl:param>
+
+  <xsl:template match="head" mode="forms-field">
+    <xsl:apply-imports/>
+    <script src="{$resources-uri}/mattkruse-lib/AnchorPosition.js" type="text/javascript"/>
+    <script src="{$resources-uri}/mattkruse-lib/PopupWindow.js" type="text/javascript"/>
+    <script src="{$resources-uri}/mattkruse-lib/OptionTransfer.js" type="text/javascript"/>
+    <script src="{$resources-uri}/mattkruse-lib/selectbox.js" type="text/javascript"/>
+    <xsl:apply-templates select="." mode="forms-calendar"/>
+    <xsl:apply-templates select="." mode="forms-htmlarea"/>
+  </xsl:template>
+
+  <xsl:template match="body" mode="forms-field">
+    <xsl:apply-imports/>
+    <xsl:apply-templates select="." mode="forms-calendar"/>
+    <xsl:apply-templates select="." mode="forms-htmlarea"/>
+  </xsl:template>
+
+  <!--+ This template should not be necessary as this stylesheet "inherits"
+      | all templates from 'forms-field-styling.xsl', but without it, it does
+      | not work for me (using Xalan 2.5.1). It's like adding all methods of
+      | a superclass in a subclass and calling everywhere only the super
+      | implementation.
+      +-->
+  <xsl:template match="*">
+    <xsl:apply-imports/>
+  </xsl:template>
+
+  <!--+
+      | Add fi:help to the common stuff.
+      +-->
+  <xsl:template match="fi:*" mode="common">
+    <xsl:apply-imports/>
+    <xsl:apply-templates select="fi:help"/>
+  </xsl:template>
+
+  <!--+
+      | 
+      +-->
+  <xsl:template match="fi:help">
+    <xsl:variable name="id" select="generate-id()"/>
+    <div class="forms-help" id="help{$id}" style="visibility:hidden; position:absolute;">
+      <xsl:apply-templates select="node()"/>
+    </div>
+    <script type="text/javascript">
+      var helpWin<xsl:value-of select="$id"/> = forms_createPopupWindow('help<xsl:value-of select="$id"/>');
+    </script>
+    <a id="{$id}" name="{$id}" href="#" onclick="helpWin{$id}.showPopup('{$id}');return false;"><img border="0" src="{$resources-uri}/help.gif"/></a>
+  </xsl:template>
+
+  <!--+
+      | fi:multivaluefield with list-type='double-listbox' styling
+      +-->
+  <xsl:template match="fi:multivaluefield[fi:styling/@list-type='double-listbox']">
+    <xsl:variable name="id" select="@id"/>
+    <xsl:variable name="values" select="fi:values/fi:value/text()"/>
+
+    <span class="forms-doubleList" title="{fi:hint}">
+      <table>
+        <xsl:if test="fi:styling/fi:available-label|fi:styling/fi:selected-label">
+          <tr>
+            <th>
+              <xsl:copy-of select="fi:styling/fi:available-label/node()"/>
+            </th>
+            <th> </th>
+            <th>
+              <xsl:copy-of select="fi:styling/fi:selected-label/node()"/>
+            </th>
+          </tr>
+        </xsl:if>
+        <tr>
+          <td>
+            <!-- select for the unselected values -->
+            <select id="{@id}.unselected" name="{@id}.unselected" multiple="multiple"
+                    ondblclick="opt{generate-id()}.forms_transferRight()">
+              <xsl:apply-templates select="." mode="styling"/>
+              <xsl:for-each select="fi:selection-list/fi:item">
+                <xsl:variable name="value" select="@value"/>
+                <xsl:if test="not($values[. = $value])">
+                  <option value="{$value}">
+                    <xsl:copy-of select="fi:label/node()"/>
+                  </option>
+                </xsl:if>
+              </xsl:for-each>
+            </select>
+          </td>
+          <td>
+            <!-- command buttons -->
+            <!-- strangely, IE adds an extra blank line if there only a button on a line. So we surround it with nbsp -->
+            <xsl:text>&#160;</xsl:text>
+            <input type="button" value="&gt;" onclick="opt{generate-id()}.forms_transferRight()"/>
+            <xsl:text>&#160;</xsl:text>
+            <br/>
+            <xsl:text>&#160;</xsl:text>
+            <input type="button" value="&gt;&gt;" onclick="opt{generate-id()}.forms_transferAllRight()"/>
+            <xsl:text>&#160;</xsl:text>
+            <br/>
+            <xsl:text>&#160;</xsl:text>
+            <input type="button" value="&lt;" onclick="opt{generate-id()}.forms_transferLeft()"/>
+            <xsl:text>&#160;</xsl:text>
+            <br/>
+            <xsl:text>&#160;</xsl:text>
+            <input type="button" value="&lt;&lt;" onclick="opt{generate-id()}.forms_transferAllLeft()"/>
+            <xsl:text>&#160;</xsl:text>
+            <br/>
+            <xsl:apply-templates select="." mode="common"/>
+          </td>
+          <td>
+            <!-- select for the selected values -->
+            <select id="{@id}" name="{@id}" multiple="multiple"
+                    ondblclick="opt{generate-id()}.forms_transferLeft()" >
+              <xsl:apply-templates select="." mode="styling"/>
+              <xsl:for-each select="fi:selection-list/fi:item">
+                <xsl:variable name="value" select="@value"/>
+                <xsl:if test="$values[. = $value]">
+                  <option value="{$value}">
+                    <xsl:copy-of select="fi:label/node()"/>
+                  </option>
+                </xsl:if>
+              </xsl:for-each>
+            </select>
+          </td>
+        </tr>
+      </table>
+      <script type="text/javascript">
+        var opt<xsl:value-of select="generate-id()"/> = forms_createOptionTransfer('<xsl:value-of select="@id"/>', <xsl:value-of select="fi:styling/@submit-on-change = 'true'"/>);
+      </script>
+    </span>
+  </xsl:template>
+
+  <xsl:template match="fi:multivaluefield/fi:styling[@list-type='double-listbox']/@submit-on-change" mode="styling"/>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-calendar-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-calendar-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-calendar-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                exclude-result-prefixes="fi">
+  <!--+
+      | This stylesheet is designed to be included by 'forms-advanced-styling.xsl'.
+      +-->
+
+  <!-- Location of the resources directory, where JS libs and icons are stored -->
+  <xsl:param name="resources-uri">resources</xsl:param>
+
+  <xsl:template match="head" mode="forms-calendar">
+    <script src="{$resources-uri}/mattkruse-lib/CalendarPopup.js" type="text/javascript"/>
+    <script src="{$resources-uri}/mattkruse-lib/date.js" type="text/javascript"/>
+    <script type="text/javascript">
+      // Setup calendar
+      var forms_calendar = CalendarPopup('forms_calendarDiv');
+      forms_calendar.setWeekStartDay(1);
+      forms_calendar.showYearNavigation();
+      forms_calendar.showYearNavigationInput();
+      forms_calendar.setCssPrefix("forms_");
+    </script>
+    <link rel="stylesheet" type="text/css" href="{$resources-uri}/forms-calendar.css"/>
+  </xsl:template>
+
+  <xsl:template match="body" mode="forms-calendar">
+    <div id="forms_calendarDiv"/>
+  </xsl:template>
+
+  <!--+
+      | fi:field with either
+      | - explicit styling @type = 'date' or
+      | - implicit if no styling @type is specified,
+      |   but datatype @type = 'date', selection lists must be excluded here
+      +-->
+  <xsl:template match="fi:field[fi:styling/@type='date'] |
+                       fi:field[not(fi:styling/@type)][fi:datatype[@type='date']][not(fi:selection-list)]">
+    <xsl:variable name="id" select="generate-id()"/>
+    
+    <xsl:variable name="format">
+      <xsl:choose>
+        <xsl:when test="fi:datatype[@type='date']/fi:convertor/@pattern">
+          <xsl:value-of select="fi:datatype[@type='date']/fi:convertor/@pattern"/>
+        </xsl:when>
+        <xsl:otherwise>yyyy-MM-dd</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    
+    <!-- regular input -->
+    <input id="{@id}" name="{@id}" value="{fi:value}" title="{normalize-space(fi:hint)}" type="text">
+      <xsl:apply-templates select="." mode="styling"/>
+    </input>
+    
+    <!-- calendar popup -->
+    <a href="#" name="{$id}" id="{$id}"
+       onClick="forms_calendar.select(forms_getForm(this)['{@id}'],'{$id}','{$format}'); return false;">
+      <img src="{$resources-uri}/cal.gif" border="0" alt="Calendar"/>
+    </a>
+
+    <!-- common stuff -->
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-field-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-field-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-field-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,522 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                exclude-result-prefixes="fi">
+  <!--+
+      | This stylesheet is designed to be included by 'forms-samples-styling.xsl'.
+      | Version CVS $Id$
+      +-->
+
+  <!-- Location of the resources directory, where JS libs and icons are stored -->
+  <xsl:param name="resources-uri">resources</xsl:param>
+
+  <xsl:template match="head" mode="forms-field">
+    <script src="{$resources-uri}/forms-lib.js" type="text/javascript"/>
+    <link rel="stylesheet" type="text/css" href="{$resources-uri}/forms.css"/>
+  </xsl:template>
+
+  <xsl:template match="body" mode="forms-field">
+    <xsl:copy-of select="@*"/>
+    <xsl:attribute name="onload">forms_onload(); <xsl:value-of select="@onload"/></xsl:attribute>
+  </xsl:template>
+
+  <!--+
+      | Generic fi:field : produce an <input>
+      +-->
+  <xsl:template match="fi:field">
+    <input name="{@id}" id="{@id}" value="{fi:value}" title="{fi:hint}" type="text">
+      <xsl:apply-templates select="." mode="styling"/>
+    </input>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | Common stuff like fi:validation-message, @required.
+      +-->
+  <xsl:template match="fi:*" mode="common">
+    <!-- validation message -->
+    <xsl:apply-templates select="fi:validation-message"/>
+    <!-- required mark -->
+    <xsl:if test="@required='true'">
+      <span class="forms-field-required"> * </span>
+    </xsl:if>
+  </xsl:template>
+
+  <!--+
+      | Handling the common styling. You may only add attributes to the output
+      | in this template as later processing might add attributes too, for
+      | example @checked or @selected
+      +-->
+  <xsl:template match="fi:*" mode="styling">
+    <xsl:apply-templates select="fi:styling/@*" mode="styling"/>
+
+    <!--+ 
+        | @listbox-size needs to be handled separately as even if it is not
+        | specified some output (@size) must be generated.
+        +-->
+    <xsl:if test="self::fi:field[fi:selection-list][fi:styling/@list-type = 'listbox'] or
+                  self::fi:multivaluefield[not(fi:styling/@list-type = 'checkbox')]">
+      <xsl:variable name="size">
+        <xsl:value-of select="fi:styling/@listbox-size"/>
+        <xsl:if test="not(fi:styling/@listbox-size)">5</xsl:if>
+      </xsl:variable>
+      <xsl:attribute name="size">
+        <xsl:value-of select="$size"/>
+      </xsl:attribute>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="fi:styling/@*" mode="styling">
+    <xsl:copy-of select="."/>
+  </xsl:template>
+
+  <xsl:template match="fi:styling/@submit-on-change" mode="styling">
+    <xsl:if test=". = 'true'">
+      <xsl:attribute name="onchange">forms_submitForm(this)</xsl:attribute>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="fi:styling/@list-type | fi:styling/@list-orientation |
+                       fi:styling/@listbox-size | fi:styling/@format | fi:styling/@layout"
+                mode="styling">
+    <!--+
+        | Ignore marker attributes so they don't go into the resuling HTML.
+        +-->
+  </xsl:template>
+
+  <xsl:template match="fi:styling/@type" mode="styling">
+    <!--+ 
+        | Do we have a duplicate semantic usage of @type?
+        | @type is only a marker for the stylesheet in general, but some of the
+        | types must/should be in the HTML output too.
+        +-->
+    <xsl:variable name="validHTMLTypes"
+                  select="'text hidden textarea checkbox radio password image reset submit'"/>
+    <xsl:if test="normalize-space(.) and
+                  contains(concat(' ', $validHTMLTypes, ' '), concat(' ', ., ' '))">
+      <xsl:copy-of select="."/>
+    </xsl:if>
+  </xsl:template>
+
+  <!--+
+      |
+      +-->
+  <xsl:template match="fi:validation-message">
+    <a href="#" class="forms-validation-message" onclick="alert('{normalize-space(.)}');return false;">&#160;!&#160;</a>
+  </xsl:template>
+
+  <!--+
+      | Hidden fi:field : produce input with type='hidden'
+      +-->
+  <xsl:template match="fi:field[fi:styling/@type='hidden']" priority="2">
+    <input type="hidden" name="{@id}" id="{@id}" value="{fi:value}">
+      <xsl:apply-templates select="." mode="styling"/>
+    </input>
+  </xsl:template>
+
+  <!--+
+      | fi:field with a selection list and @list-type 'radio' : produce
+      | radio-buttons oriented according to @list-orientation
+      | ("horizontal" or "vertical" - default)
+      +-->
+  <xsl:template match="fi:field[fi:selection-list][fi:styling/@list-type='radio']" priority="2">
+    <xsl:variable name="id" select="@id"/>
+    <xsl:variable name="value" select="fi:value"/>
+    <xsl:variable name="vertical" select="string(fi:styling/@list-orientation) != 'horizontal'"/>
+    <xsl:choose>
+      <xsl:when test="$vertical">
+        <table cellpadding="0" cellspacing="0" border="0" title="{fi:hint}">
+          <xsl:for-each select="fi:selection-list/fi:item">
+            <tr>
+              <td>
+                <input type="radio" id="{generate-id()}" name="{$id}" value="{@value}">
+                  <xsl:if test="@value = $value">
+                    <xsl:attribute name="checked">checked</xsl:attribute>
+                  </xsl:if>
+                  <xsl:apply-templates select="." mode="styling"/>
+                </input>
+              </td>
+              <td>
+                <label for="{generate-id()}"><xsl:copy-of select="fi:label/node()"/></label>
+              </td>
+              <xsl:if test="position() = 1">
+                <td rowspan="{count(../fi:item)}">
+                  <xsl:apply-templates select="../.." mode="common"/>
+                </td>
+              </xsl:if>
+            </tr>
+          </xsl:for-each>
+        </table>
+      </xsl:when>
+      <xsl:otherwise>
+        <span title="{fi:hint}">
+          <xsl:for-each select="fi:selection-list/fi:item">
+            <input type="radio" id="{generate-id()}" name="{$id}" value="{@value}">
+              <xsl:if test="@value = $value">
+                <xsl:attribute name="checked">checked</xsl:attribute>
+              </xsl:if>
+              <xsl:apply-templates select="." mode="styling"/>
+            </input>
+            <label for="{generate-id()}"><xsl:copy-of select="fi:label/node()"/></label>
+          </xsl:for-each>
+        </span>
+        <xsl:apply-templates select="." mode="common"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!--+
+      | fi:field with a selection list (not 'radio' style)
+      | Rendering depends on the attributes of fi:styling :
+      | - if @list-type is "listbox" : produce a list box with @listbox-size visible
+      |   items (default 5)
+      | - otherwise, produce a dropdown menu
+      +-->
+  <xsl:template match="fi:field[fi:selection-list]" priority="1">
+    <xsl:variable name="value" select="fi:value"/>
+
+    <!-- dropdown or listbox -->
+    <select title="{fi:hint}" id="{@id}" name="{@id}">
+      <xsl:apply-templates select="." mode="styling"/>
+      <xsl:for-each select="fi:selection-list/fi:item">
+        <option value="{@value}">
+          <xsl:if test="@value = $value">
+            <xsl:attribute name="selected">selected</xsl:attribute>
+          </xsl:if>
+          <xsl:copy-of select="fi:label/node()"/>
+        </option>
+      </xsl:for-each>
+    </select>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:field with a selection list and @type 'output'
+      +-->
+  <xsl:template match="fi:field[fi:selection-list][fi:styling/@type='output']" priority="3">
+    <xsl:variable name="value" select="fi:value"/>
+    <xsl:variable name="selected" select="fi:selection-list/fi:item[@value = $value]"/>
+    <xsl:choose>
+      <xsl:when test="$selected/fi:label">
+        <xsl:apply-templates select="$selected/fi:label"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$value"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!--+
+      | fi:field with @type 'textarea'
+      +-->
+  <xsl:template match="fi:field[fi:styling/@type='textarea']">
+    <textarea id="{@id}" name="{@id}" title="{fi:hint}">
+      <xsl:apply-templates select="." mode="styling"/>
+      <!-- remove carriage-returns (occurs on certain versions of IE and doubles linebreaks at each submit) -->
+      <xsl:copy-of select="translate(fi:value/node(), '&#13;', '')"/>
+    </textarea>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:field with @type 'output' and fi:output are both rendered as text
+      +-->
+  <xsl:template match="fi:output | fi:field[fi:styling/@type='output']" priority="2">
+    <xsl:copy-of select="fi:value/node()"/>
+  </xsl:template>
+
+  <!--+
+      | Labels for form elements.
+      +-->
+  <xsl:template match="fi:*" mode="label">
+    <label for="{@id}" title="{fi:hint}">
+      <xsl:copy-of select="fi:label/node()"/>
+    </label>
+  </xsl:template>
+
+  <!--+
+      | Labels for pure outputs must not contain <label/> as there is no element to point to.
+      +-->
+  <xsl:template match="fi:output | fi:field[fi:styling/@type='output']" mode="label">
+    <xsl:copy-of select="fi:label/node()"/>
+  </xsl:template>
+
+  <!--+
+      | fi:booleanfield : produce a checkbox
+      +-->
+  <xsl:template match="fi:booleanfield">
+    <input id="{@id}" type="checkbox" value="true" name="{@id}" title="{fi:hint}">
+      <xsl:apply-templates select="." mode="styling"/>
+      <xsl:if test="fi:value = 'true'">
+        <xsl:attribute name="checked">checked</xsl:attribute>
+      </xsl:if>
+    </input>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:booleanfield with @type 'output' : rendered as text
+      +-->
+  <xsl:template match="fi:booleanfield[fi:styling/@type='output']">
+    <xsl:choose>
+      <xsl:when test="fi:value = 'true'">
+        yes
+      </xsl:when>
+      <xsl:otherwise>
+        no
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <!--+
+      | fi:action
+      +-->
+  <xsl:template match="fi:action">
+    <input id="{@id}" type="submit" name="{@id}" title="{fi:hint}">
+      <xsl:attribute name="value"><xsl:value-of select="fi:label/node()"/></xsl:attribute>
+      <xsl:apply-templates select="." mode="styling"/>
+    </input>
+  </xsl:template>
+
+  <!--+
+      | fi:continuation-id : produce a hidden "continuation-id" input
+      +-->
+  <xsl:template match="fi:continuation-id">
+    <xsl:variable name="name">
+      <xsl:value-of select="@name"/>
+      <xsl:if test="not(@name)">continuation-id</xsl:if>
+    </xsl:variable>
+    <input name="{$name}" type="hidden" value="{.}"/>
+  </xsl:template>
+
+  <!--+
+      | fi:multivaluefield : produce a list of checkboxes
+      +-->
+  <xsl:template match="fi:multivaluefield[fi:styling/@list-type='checkbox']">
+    <xsl:variable name="id" select="@id"/>
+    <xsl:variable name="values" select="fi:values/fi:value/text()"/>
+
+    <span title="{fi:hint}">
+      <xsl:for-each select="fi:selection-list/fi:item">
+        <xsl:variable name="value" select="@value"/>
+        <input id="{generate-id()}" type="checkbox" value="{@value}" name="{$id}">
+          <xsl:if test="$values[. = $value]">
+            <xsl:attribute name="checked">checked</xsl:attribute>
+          </xsl:if>
+        </input>
+        <label for="{generate-id()}"><xsl:copy-of select="fi:label/node()"/></label>
+        <br/>
+      </xsl:for-each>
+    </span>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:multivaluefield : produce a multiple-selection list
+      +-->
+  <xsl:template match="fi:multivaluefield">
+    <xsl:variable name="id" select="@id"/>
+    <xsl:variable name="values" select="fi:values/fi:value/text()"/>
+
+    <span title="{fi:hint}">
+      <select id="{@id}" name="{$id}" multiple="multiple">
+        <xsl:apply-templates select="." mode="styling"/>
+        <xsl:for-each select="fi:selection-list/fi:item">
+          <xsl:variable name="value" select="@value"/>
+          <option value="{$value}">
+            <xsl:if test="$values[. = $value]">
+              <xsl:attribute name="selected">selected</xsl:attribute>
+            </xsl:if>
+            <xsl:copy-of select="fi:label/node()"/>
+          </option>
+        </xsl:for-each>
+      </select>
+    </span>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:upload
+      +-->
+  <xsl:template match="fi:upload">
+    <xsl:choose>
+      <xsl:when test="fi:value">
+        <!-- Has a value (filename): display it with a change button -->
+        <span title="{fi:hint}">
+          [<xsl:value-of select="fi:value"/>] <input type="submit" id="{@id}" name="{@id}" value="..."/>
+        </span>
+      </xsl:when>
+      <xsl:otherwise>
+        <input type="file" id="{@id}" name="{@id}" title="{fi:hint}" accept="{@mime-types}"/>
+      </xsl:otherwise>
+    </xsl:choose>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <!--+
+      | fi:repeater
+      +-->
+  <xsl:template match="fi:repeater">
+    <input type="hidden" name="{@id}.size" value="{@size}"/>
+    <table border="1">
+      <tr>
+        <xsl:for-each select="fi:headings/fi:heading">
+          <th><xsl:value-of select="."/></th>
+        </xsl:for-each>
+      </tr>
+      <xsl:apply-templates select="fi:repeater-row"/>
+    </table>
+  </xsl:template>
+
+  <!--+
+      | fi:repeater-row
+      +-->
+  <xsl:template match="fi:repeater-row">
+    <tr>
+      <xsl:for-each select="*">
+        <td>
+          <xsl:apply-templates select="."/>
+        </td>
+      </xsl:for-each>
+    </tr>
+  </xsl:template>
+
+  <!--+
+      | fi:repeater-size
+      +-->
+  <xsl:template match="fi:repeater-size">
+    <input type="hidden" name="{@id}.size" value="{@size}"/>
+  </xsl:template>
+
+  <!--+
+      | fi:form-template|fi:form-generated 
+      +-->
+  <xsl:template match="fi:form-template|fi:form-generated">
+    <form>
+      <xsl:copy-of select="@*"/>
+      <xsl:attribute name="onsubmit">forms_onsubmit(); <xsl:value-of select="@onsubmit"/></xsl:attribute>
+      <!-- hidden field to store the submit id -->
+      <div><input type="hidden" name="forms_submit_id"/></div>
+      <xsl:apply-templates/>
+      
+      <!-- TODO: consider putting this in the xml stream from the generator? -->
+      <xsl:if test="self::fi:form-generated">
+        <input type="submit"/>
+      </xsl:if>
+    </form>
+  </xsl:template>
+
+  <!--+
+      | fi:form
+      +-->
+  <xsl:template match="fi:form">
+    <table border="1">
+      <xsl:for-each select="fi:widgets/*">
+        <tr>
+          <xsl:choose>
+            <xsl:when test="self::fi:repeater">
+              <td colspan="2">
+                <xsl:apply-templates select="."/>
+              </td>
+            </xsl:when>
+            <xsl:when test="self::fi:booleanfield">
+              <td>&#160;</td>
+              <td>
+                <xsl:apply-templates select="."/>
+                <xsl:text> </xsl:text>
+                <xsl:copy-of select="fi:label"/>
+              </td>
+            </xsl:when>
+            <xsl:otherwise>
+              <td>
+                <xsl:copy-of select="fi:label"/>
+              </td>
+              <td>
+                <xsl:apply-templates select="."/>
+              </td>
+            </xsl:otherwise>
+          </xsl:choose>
+        </tr>
+      </xsl:for-each>
+    </table>
+  </xsl:template>
+
+  <xsl:template match="fi:aggregatefield">
+    <input id="{@id}" name="{@id}" value="{fi:value}" title="{fi:hint}">
+      <xsl:apply-templates select="." mode="styling"/>
+    </input>
+    <xsl:apply-templates select="." mode="common"/>
+  </xsl:template>
+
+  <xsl:template match="fi:messages">
+    <xsl:if test="fi:message">
+      <xsl:copy-of select="fi:label/node()"/>:
+      <ul>
+        <xsl:for-each select="fi:message">
+          <li><xsl:apply-templates/></li>
+        </xsl:for-each>
+      </ul>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="fi:validation-errors">
+    <xsl:variable name="header">
+      <xsl:choose>
+        <xsl:when test="header">
+          <xsl:copy-of select="header"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <p class="forms-validation-errors">The following errors have been detected (marked with !):</p>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="footer">
+      <xsl:choose>
+        <xsl:when test="footer">
+          <xsl:copy-of select="footer"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <p class="forms-validation-errors">Please, correct them and re-submit the form.</p>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:variable name="frm" select="ancestor::fi:form-template"/>
+    <xsl:if test="$frm and $frm//fi:validation-message">
+      <xsl:copy-of select="$header"/>
+      <ul>
+        <xsl:for-each select="$frm//fi:validation-message">
+          <li class="forms-validation-error">
+            <xsl:if test="../fi:label">
+              <xsl:value-of select="../fi:label"/><xsl:text>: </xsl:text>
+            </xsl:if>
+            <xsl:value-of select="."/>
+          </li>
+        </xsl:for-each>
+      </ul>
+      <xsl:copy-of select="$footer"/>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-htmlarea-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-htmlarea-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-htmlarea-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                exclude-result-prefixes="fi">
+  <!--+
+      | This stylesheet is designed to be included by 'forms-advanced-styling.xsl'.
+      +-->
+
+  <!-- Location of the resources directory, where JS libs and icons are stored -->
+  <xsl:param name="resources-uri">resources</xsl:param>
+  <xsl:param name="htmlarea-lang">en</xsl:param>
+
+  <xsl:template match="head" mode="forms-htmlarea">
+    <script type="text/javascript">
+      _editor_url = "<xsl:value-of select="concat($resources-uri, '/htmlarea/')"/>";
+      _editor_lang = "<xsl:value-of select="$htmlarea-lang"/>";
+    </script>
+    <script type="text/javascript" src="{$resources-uri}/htmlarea/htmlarea.js"></script>
+  </xsl:template>
+
+  <xsl:template match="body" mode="forms-htmlarea"/>
+
+  <!--+
+      | fi:field with @type 'htmlarea'
+      +-->
+  <xsl:template match="fi:field[fi:styling[@type='htmlarea']]">
+    <textarea id="{@id}" name="{@id}" title="{fi:hint}">
+      <xsl:apply-templates select="." mode="styling"/>
+      <!-- remove carriage-returns (occurs on certain versions of IE and doubles linebreaks at each submit) -->
+      <xsl:apply-templates select="fi:value/node()" mode="htmlarea-copy"/>
+    </textarea>
+    <xsl:apply-templates select="." mode="common"/>
+    <xsl:choose>
+      <xsl:when test="fi:styling/initFunction">
+        <script language="JavaScript"><xsl:value-of select="fi:styling/initFunction"/>('<xsl:value-of select="@id"/>');</script>
+      </xsl:when>
+      <xsl:otherwise>
+        <script language="JavaScript">HTMLArea.replace('<xsl:value-of select="@id"/>');</script>        
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
+  <xsl:template match="@*|*" mode="htmlarea-copy">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()" mode="htmlarea-copy"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="text()" mode="htmlarea-copy">
+    <xsl:copy-of select="translate(., '&#13;', '')"/>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-page-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-page-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-page-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,331 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
+                exclude-result-prefixes="fi">
+  <!--+
+      | This stylesheet is designed to be included by 'forms-samples-styling.xsl'.
+      +-->
+  <xsl:template match="head" mode="forms-page">
+    <!--+ 'forms-page-styling.xsl' relies on 'forms-field-styling.xsl' for the
+        | inclusion of the correct JS and CSS files. To fix it, we have to
+        | separate the page specific parts into their own files.
+        +-->
+  </xsl:template>
+
+  <xsl:template match="body" mode="forms-page"/>
+
+  <!--
+    fi:group : default is to enclose items in a div
+  -->
+  <xsl:template match="fi:group">
+    <div title="{fi:hint}">
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates mode="group-layout" select="."/>
+    </div>
+  </xsl:template>
+
+  <!--
+    fi:group of type tabs
+  -->
+  <xsl:template match="fi:group[fi:styling/@type='tabs']">
+    <!-- find the currently selected tab.
+         Thoughts still needed here, such as autogenerating a field in the
+         forms transformer to hold this state.
+    -->
+    <xsl:variable name="active">
+      <xsl:variable name="value" select="normalize-space(fi:state/fi:*/fi:value)"/>
+      <xsl:choose>
+        <xsl:when test="$value">
+          <xsl:value-of select="$value"/>
+        </xsl:when>
+        <xsl:otherwise>0</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <!-- copy the "state-widget" attribute for use in for-each -->
+    <xsl:variable name="state-widget" select="fi:state/fi:*/@id"/>
+    <xsl:variable name="id" select="generate-id()"/>
+
+    <div id="{$id}" title="{fi:hint}">
+      <!-- add an hidden input for the state -->
+      <xsl:if test="$state-widget">
+        <input type="hidden" name="{$state-widget}" value="{$active}"/>
+      </xsl:if>
+      <!-- div containing the tabs -->
+      <div class="forms-tabArea">
+        <xsl:for-each select="fi:items/fi:*">
+          <xsl:variable name="pos" select="position() - 1"/>
+          <span id="{$id}_tab_{$pos}" onclick="forms_showTab('{$id}', {$pos}, {last()}, '{$state-widget}')">
+            <xsl:attribute name="class">
+              <xsl:text>forms-tab</xsl:text>
+              <xsl:if test="$active = $pos"> forms-activeTab</xsl:if>
+            </xsl:attribute>
+            <xsl:copy-of select="fi:label/node()"/>
+            <xsl:if test="fi:items/*//fi:validation-message">
+              <span class="forms-validation-message">&#160;!&#160;</span>
+            </xsl:if>
+          </span>
+        </xsl:for-each>
+      </div>
+      <!-- a div for each of the items -->
+      <xsl:for-each select="fi:items/fi:*">
+        <xsl:variable name="pos" select="position() - 1"/>
+        <div class="forms-tabContent" id="{$id}_items_{$pos}">
+          <xsl:if test="$active != $pos">
+            <xsl:attribute name="style">display:none</xsl:attribute>
+          </xsl:if>
+          <xsl:apply-templates select="."/>
+        </div>
+      </xsl:for-each>
+    </div>
+  </xsl:template>
+
+  <!--
+    fi:group of type choice : a popup is used instead of tabs
+  -->
+  <xsl:template match="fi:group[fi:styling/@type='choice']">
+    <!-- find the currently selected tab.
+         Thoughts still needed here, such as autogenerating a field in the formstransformer
+         to hold this state.
+    -->
+    <xsl:variable name="active">
+      <xsl:variable name="value" select="normalize-space(fi:state/fi:*/fi:value)"/>
+      <xsl:choose>
+        <xsl:when test="$value">
+          <xsl:value-of select="$value"/>
+        </xsl:when>
+        <xsl:otherwise>0</xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <!-- copy the "state-widget" attribute for use in for-each -->
+    <xsl:variable name="state-widget" select="fi:state/fi:*/@id"/>
+    <xsl:variable name="id" select="generate-id()"/>
+
+    <fieldset id="{$id}">
+      <legend title="{fi:hint}">
+        <xsl:apply-templates select="fi:label/node()"/>
+        <select name="{$state-widget}" onchange="forms_showTab('{$id}', this.selectedIndex, {count(fi:items/*)}, '{$state-widget}')">
+          <xsl:for-each select="fi:items/fi:*">
+            <xsl:variable name="pos" select="position() - 1"/>
+            <option>
+              <xsl:attribute name="value">
+                <xsl:choose>
+                  <xsl:when test="fi:value">
+                    <xsl:value-of select="fi:value"/>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:value-of select="$pos"/>
+                  </xsl:otherwise>
+                </xsl:choose>
+              </xsl:attribute>
+              <xsl:if test="$active = $pos">
+                <xsl:attribute name="selected">selected</xsl:attribute>
+              </xsl:if>
+              <xsl:copy-of select="fi:label/node()"/>
+            </option>
+          </xsl:for-each>
+        </select>
+        <xsl:if test="fi:items/*//fi:validation-message">
+          <span class="forms-validation-message">&#160;!&#160;</span>
+        </xsl:if>
+      </legend>
+      <!-- a div for each of the items -->
+      <xsl:for-each select="fi:items/fi:*">
+        <xsl:variable name="pos" select="position() - 1"/>
+        <div id="{$id}_items_{$pos}">
+          <xsl:if test="$active != $pos">
+            <xsl:attribute name="style">display:none</xsl:attribute>
+          </xsl:if>
+          <xsl:apply-templates select="."/>
+        </div>
+      </xsl:for-each>
+    </fieldset>
+  </xsl:template>
+
+  <!--
+    fi:group of type fieldset : enclose items in a fieldset frame
+  -->
+  <xsl:template match="fi:group[fi:styling/@type='fieldset']">
+    <fieldset>
+      <xsl:apply-templates select="." mode="styling"/>
+      <legend title="{fi:hint}"><xsl:copy-of select="fi:label/node()"/></legend>
+      <xsl:apply-templates mode="group-layout" select="."/>
+    </fieldset>
+  </xsl:template>
+
+  <!--
+    Group items layout : default is no layout
+  -->
+  <xsl:template match="fi:group" mode="group-layout">
+    <xsl:apply-templates select="fi:items/*"/>
+  </xsl:template>
+
+  <!--
+    Column group items layout
+  -->
+  <xsl:template match="fi:group[fi:styling/@layout='column']" mode="group-layout">
+    <table border="0" summary="{fi:hint}">
+      <tbody>
+        <xsl:apply-templates select="fi:items/*" mode="group-column-content"/>
+      </tbody>
+    </table>
+  </xsl:template>
+
+  <!--
+    Default column layout : label above and input below
+  -->
+  <xsl:template match="fi:*" mode="group-column-content">
+    <tr>
+      <td><xsl:apply-templates select="." mode="label"/></td>
+    </tr>
+    <tr>
+      <td><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="fi:action" mode="group-column-content">
+    <tr>
+      <td><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <!--
+    Columns group items layout
+  -->
+  <xsl:template match="fi:group[fi:styling/@layout='columns']" mode="group-layout">
+    <table border="0" summary="{fi:hint}">
+      <tbody>
+        <xsl:apply-templates select="fi:items/*" mode="group-columns-content"/>
+      </tbody>
+    </table>
+  </xsl:template>
+
+  <!--
+    Default columns layout : label left and input right
+  -->
+  <xsl:template match="fi:*" mode="group-columns-content">
+    <tr>
+      <td><xsl:apply-templates select="." mode="label"/></td>
+      <td><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <!--
+    Row group items layout
+  -->
+  <xsl:template match="fi:group[fi:styling/@layout='row']" mode="group-layout">
+    <table border="0" summary="{fi:hint}">
+      <tbody>
+        <tr>
+          <xsl:apply-templates select="fi:items/*" mode="group-row-content"/>
+        </tr>
+      </tbody>
+    </table>
+  </xsl:template>
+
+  <!--
+    Default row layout : label left and input right
+  -->
+  <xsl:template match="fi:*" mode="group-row-content">
+    <td><xsl:apply-templates select="." mode="label"/></td>
+    <td><xsl:apply-templates select="."/></td>
+  </xsl:template>
+
+  <xsl:template match="fi:action" mode="group-row-content">
+    <td><xsl:apply-templates select="."/></td>
+  </xsl:template>
+  <!--
+    Rows group items layout
+  -->
+  <xsl:template match="fi:group[fi:styling/@layout='rows']" mode="group-layout">
+    <table border="0" summary="{fi:hint}">
+      <tbody>
+        <tr>
+          <xsl:apply-templates select="fi:items/*" mode="group-rows-labels"/>
+        </tr>
+        <tr>
+          <xsl:apply-templates select="fi:items/*" mode="group-rows-content"/>
+        </tr>
+      </tbody>
+    </table>
+  </xsl:template>
+
+  <!--
+    Default rows layout : label above and input below
+  -->
+  <xsl:template match="fi:*" mode="group-rows-labels">
+    <td><xsl:apply-templates select="." mode="label"/></td>
+  </xsl:template>
+
+  <xsl:template match="fi:action" mode="group-rows-labels">
+    <td>&#160;</td>
+  </xsl:template>
+
+  <xsl:template match="fi:*" mode="group-rows-content">
+    <td><xsl:apply-templates select="."/></td>
+  </xsl:template>
+
+  <!-- boolean field : checkbox and label on a single line -->
+  <xsl:template match="fi:booleanfield" mode="group-columns-content">
+    <tr>
+      <td colspan="2">
+        <xsl:apply-templates select="."/>
+        <xsl:apply-templates select="." mode="label"/>
+      </td>
+    </tr>
+  </xsl:template>
+
+  <!-- action : on a single line -->
+  <xsl:template match="fi:action" mode="group-columns-content">
+    <tr>
+      <td colspan="2"><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <!-- any other element : on a single line -->
+  <xsl:template match="*" mode="group-columns-content">
+    <tr>
+      <td colspan="2"><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <!-- double-list multivaluefield : lists under the label -->
+  <xsl:template match="fi:multivaluefield[fi:styling/@list-type='double-listbox']"
+                mode="group-columns-content">
+    <tr>
+      <td colspan="2"><xsl:apply-templates select="." mode="label"/></td>
+    </tr>
+    <tr>
+      <td colspan="2"><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <!-- nested group -->
+  <xsl:template match="fi:group" mode="group-columns-content">
+    <tr>
+      <td colspan="2"><xsl:apply-templates select="."/></td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-1">
+    <xsl:copy>
+      <xsl:apply-templates select="@*|node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-styling.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-styling.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/styles/forms-styling.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+  <!--+ Include styling stylesheets, one for the widgets, the other one for the
+      | page. As 'forms-advanced-field-styling.xsl' is a specialization of
+      | 'forms-field-styling.xsl' the latter one is imported there. If you don't
+      | want advanced styling of widgets, change it here!
+      | See xsl:include as composition and xsl:import as extension/inheritance.
+      +-->
+  <xsl:include href="forms-page-styling.xsl"/>
+  <xsl:include href="forms-advanced-field-styling.xsl"/>
+
+  <xsl:template match="head">
+    <head>
+      <xsl:apply-templates/>
+      <xsl:apply-templates select="." mode="forms-page"/>
+      <xsl:apply-templates select="." mode="forms-field"/>
+    </head>
+  </xsl:template>
+
+  <xsl:template match="body">
+    <body>
+      <!--+ !!! If template with mode 'forms-page' adds text or elements
+          |        template with mode 'forms-field' can no longer add attributes!!!
+          +-->
+      <xsl:apply-templates select="." mode="forms-page"/>
+      <xsl:apply-templates select="." mode="forms-field"/>
+      <xsl:apply-templates/>
+    </body>
+  </xsl:template>
+
+</xsl:stylesheet>

Modified: cocoon/trunk/src/blocks/portal/samples/skins/common/styles/portal-page.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/skins/common/styles/portal-page.xsl?view=diff&rev=148909&p1=cocoon/trunk/src/blocks/portal/samples/skins/common/styles/portal-page.xsl&r1=148908&p2=cocoon/trunk/src/blocks/portal/samples/skins/common/styles/portal-page.xsl&r2=148909
==============================================================================
--- cocoon/trunk/src/blocks/portal/samples/skins/common/styles/portal-page.xsl	(original)
+++ cocoon/trunk/src/blocks/portal/samples/skins/common/styles/portal-page.xsl	Fri Jan 28 09:54:58 2005
@@ -20,9 +20,15 @@
 
 <xsl:param name="user"/>
 
+<xsl:param name="base"/>
 <xsl:template match="/">
   <html>
     <head>
+	  <xsl:if test="$base">
+		<base>
+			<xsl:attribute name="href"><xsl:value-of select="$base"/></xsl:attribute>
+		</base>
+      </xsl:if>
       <link type="text/css" rel="stylesheet" href="css/page.css"/>
     </head>
     <body>
@@ -51,6 +57,7 @@
                 <td height="99%" bgcolor="#294563" width="1%" align="right">
                   <xsl:if test="$user!='anonymous'">
                     <a href="logout" style="color:#CFDCED;font-size:75%;">Logout</a>&#160;
+					<a href="tools/" style="color:#CFDCED;font-size:75%;">Tools</a>&#160;
                   </xsl:if>
                   <img height="5" src="images/space.gif" width="5"/>
                 </td>

Added: cocoon/trunk/src/blocks/portal/samples/tools/auth.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/auth.xml?view=auto&rev=148909
==============================================================================

Added: cocoon/trunk/src/blocks/portal/samples/tools/auth2.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/auth2.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/auth2.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<auth>
+	<plugin id="copletManagement">
+		<functions>
+			<function id="showTab">
+				<roles>
+					<role>admin</role>
+				</roles>
+				<users>
+					<user>cocoon</user>
+				</users>
+			</function>
+			<actions>
+				<action id="moveUp">
+					<roles>
+						<role>admin</role>
+					</roles>
+				</action>
+			</actions>
+		</functions>
+	</plugin>
+</auth>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/conf.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/conf.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/conf.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<conf>
+</conf>

Added: cocoon/trunk/src/blocks/portal/samples/tools/flow.js
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/flow.js?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/flow.js	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+cocoon.load("resource://org/apache/cocoon/portal/tools/ptm.js");
+
+function tools() {
+	var toolManager = getPTM();
+	if(toolManager.getToolsWithFunctions().size() > 0) {
+		cocoon.sendPage("tools.jx", {"tools" : toolManager.getToolsWithFunctions()});
+	} else {
+		cocoon.sendPage("noTools.jx");
+	}
+	relPTM(toolManager);
+}
+
+function functions() {
+	var toolManager = getPTM();
+	var tool = toolManager.getTool(cocoon.parameters.name);
+	cocoon.sendPage(tool.getId() + "/functions.jx", {"functions" : tool.getFunctions(), "tool" : tool});
+	relPTM(toolManager);
+}
+
+function menu() {
+	var toolManager = getPTM();
+	cocoon.sendPage("menu.jx", {"tools" : toolManager.getToolsWithFunctions()});
+	relPTM(toolManager);
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/main/functions.jx
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/main/functions.jx?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/main/functions.jx	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+<div style="spacing:3px; padding:5px;">
+	<b><i18n:text key="portalTools.functions"/>:</b><br/>
+	<jx:forEach select="#{functions}" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+		<a href="tools/plugins/#{../tool/id}/#{./function}"><i18n:text i18n:key="#{./name}"/></a><br/>
+	</jx:forEach>
+</div>
+</jx:template>

Added: cocoon/trunk/src/blocks/portal/samples/tools/main/menu.jx
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/main/menu.jx?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/main/menu.jx	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+	<tab-layout xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+		<jx:forEach select="#{tools}">
+			<named-item parameter="tools/functions/#{./id}" name="#{./toolName}"/>
+		</jx:forEach>
+	</tab-layout>
+</jx:template>

Added: cocoon/trunk/src/blocks/portal/samples/tools/main/noTools.jx
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/main/noTools.jx?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/main/noTools.jx	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+<div style="spacing:3px; padding:5px;">
+	<i18n:text key="portalTools.noToolsAvailable"/>
+</div>
+</jx:template>

Added: cocoon/trunk/src/blocks/portal/samples/tools/main/tools.jx
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/main/tools.jx?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/main/tools.jx	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+	<div style="spacing:3px; padding:5px;">
+	<b><i18n:text key="portalTools.tools"/>:</b><br/>
+	<jx:forEach select="#{tools}" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+		<a href="tools/functions/#{./id}"><i18n:text key="#{./name}"/></a><br/>
+	</jx:forEach>
+	</div>
+</jx:template>

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/flow.js
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/flow.js?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/flow.js	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,192 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+cocoon.load("resource://org/apache/cocoon/portal/tools/ptm.js");
+
+// Functions to modify the PortalLayout
+// var layoutActions = new Packages.org.apache.cocoon.portal.tools.copletManagement.LayoutActions(portalLayout, componentManager.getLayoutFactory(), componentManager.getCopletFactory(), profileManager);
+
+function showTab(showId) {
+	var toolManager = getPTM();
+	var portalObjects = toolManager.getPortalObjects();
+	var portalLayout = portalObjects.getPortalLayout();
+	var portalService = portalObjects.getPortalService();
+	var componentManager = portalObjects.getComponentManager();
+	var profileManager = portalObjects.getProfileManager();
+	var safeLayout = portalLayout;
+
+	/* Use a copy of the Layout in the Tools - DOES NOT WORK ATM
+	var safeLayout = cocoon.session.getAttribute("safeLayout");	
+	if(safeLayout == null) {
+		safeLayout = portalLayout.copy();
+		cocoon.session.setAttribute("safeLayout", safeLayout);
+	}
+	*/
+var layoutActions = new Packages.org.apache.cocoon.portal.tools.copletManagement.LayoutActions(safeLayout, componentManager.getLayoutFactory(), componentManager.getCopletFactory(), profileManager);
+	var id = cocoon.request.id;
+	if(showId != null) {
+		id = showId;
+	}
+	if (id == null) id = "";
+	
+	var action = cocoon.request.action;
+	var actionitem = cocoon.request.actionitem;
+	
+	if(action == "del") {
+		layoutActions.del(actionitem);
+	}
+	if(action == "up") {
+		layoutActions.move(actionitem, true);
+	}
+	if(action == "down") {
+		layoutActions.move(actionitem, false);
+	}
+	if(action == "addCol") {
+		layoutActions.add(actionitem, "column");
+	}
+	if(action == "addRow") {
+		layoutActions.add(actionitem, "row");
+	}
+	if(action == "addTab") {
+		var form = new Form("cocoon:/model/addTab");
+		form.showForm("form/addTab/template");
+		var name = form.getChild("name").getValue();
+		
+		if (actionitem == "maintab") 
+			actionitem = "1";
+		
+		layoutActions.addTab(actionitem, name);
+	}
+
+	if(action =="addCoplet") {
+		handleAddCoplets(actionitem, layoutActions);
+	}	
+	
+	if(action == "save") {
+		profileManager.saveUserProfiles(null);
+	}
+	
+	/* save and restore functions if we work with a copy of the layout later.
+	if(action == "save") {
+		print("safe layout");
+		profileManager.storeProfile(safeLayout, null);
+		cocoon.session.setAttribute("safeLayout", null);
+	}
+	
+	if(action == "restore") {
+		print("restore layout");
+		safeLayout = portalLayout.copy();
+		cocoon.session.setAttribute("safeLayout", safeLayout);
+	}
+	*/ 
+	
+	cocoon.sendPage("page/showTab/" + id, {"layout" : safeLayout });
+	toolManager.releasePortalObjects(portalObjects);
+	relPTM(toolManager);
+}
+
+function showXml() {
+	var toolManager = getPTM();
+	var portalObjects = toolManager.getPortalObjects();
+	var portalLayout = portalObjects.getPortalLayout();
+	var bla = cocoon.request.foo;
+	cocoon.sendPage("layoutProfile/" + bla, {"layout" : portalLayout });
+	toolManager.releasePortalObjects(portalObjects);
+	relPTM(toolManager);
+}
+
+function showCopletList(current, item) {
+	var toolManager = getPTM();
+	var portalObjects = toolManager.getPortalObjects();
+	var profileManager = portalObjects.getProfileManager();
+	var coplets = profileManager.getCopletInstanceDatas();
+	
+	cocoon.sendPage("jx/copletList.jx", {"coplets": coplets, "item" : item, "current" : current});
+	toolManager.releasePortalObjects(portalObjects);
+	relPTM(toolManager);
+}
+
+function handleAddCoplets(parent, layoutActions) {
+	var toolManager = getPTM();
+	var portalObjects = toolManager.getPortalObjects();
+	var portalService = portalObjects.getPortalService();
+	var profileManager = portalObjects.getProfileManager();
+	
+	var form = new Form("cocoon:/model/addCoplet");
+	form.createBinding("form/addCoplet/binding.xml");
+	var coplets = profileManager.getCopletDatas();
+	form.load(profileManager);
+	form.showForm("form/addCoplet/template");
+	layoutActions.getSelectedCoplets(form.getChild("coplets"), coplets, parent);
+
+	toolManager.releasePortalObjects(portalObjects);
+	relPTM(toolManager);
+}
+
+function selectSkin() {
+	var toolManager = getPTM();
+	var portalObjects = toolManager.getPortalObjects();
+	var portalService = portalObjects.getPortalService();
+	var portalLayout = portalObjects.getPortalLayout();
+
+	var id = cocoon.request.id;
+	var skins = portalService.getSkinDescriptions();
+	if(id != null) {
+		for(var it = skins.iterator(); it.hasNext();) {
+			var skinName = it.next().getName();
+			if(skinName.equals(id))
+				portalLayout.getParameters().put("skin", skinName);
+		}
+		id = null;
+	}
+	cocoon.sendPageAndWait("jx/selectSkin.jx", {"skins" : skins});
+
+	toolManager.releasePortalObjects(portalObjects);
+	relPTM(toolManager);
+}
+
+function editCoplet() {
+	var toolManager = getPTM();
+	var portalObjects = toolManager.getPortalObjects();
+	var portalService = portalObjects.getPortalService();
+	var portalLayout = portalObjects.getPortalLayout();
+	var componentManager = portalObjects.getComponentManager();
+	var profileManager = portalObjects.getProfileManager();
+	var layoutActions = new Packages.org.apache.cocoon.portal.tools.copletManagement.LayoutActions(portalLayout, componentManager.getLayoutFactory(), componentManager.getCopletFactory(), profileManager);
+
+	
+	var copletId = cocoon.request.actionitem;
+	var backId = cocoon.request.id;
+	var instanceData = layoutActions.getCopletInstanceData(copletId);
+	var copletData = instanceData.getCopletData();
+	var copletType = instanceData.getCopletData().getCopletBaseData().getCopletAdapterName();
+	var visible = instanceData.getAttributes().get("visible");
+	if(visible == null) {
+		instanceData.getAttributes().put("visible", new Packages.java.lang.Boolean(true));
+	}
+	var which = "all";
+	if(copletType.equals("uri"))
+		which = "uriCoplet";
+	var form = new Form("cocoon:/model/editCoplet/" + which);
+	form.createBinding("form/editCoplet/" + which + "/binding.xml");
+	while(1) {
+		form.load(instanceData);
+		form.showForm("form/editCoplet/" + which +"/template", {"backId" : backId});
+		form.save(instanceData);
+	}
+
+	toolManager.releasePortalObjects(portalObjects);
+	relPTM(toolManager);
+}

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/binding.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/binding.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/binding.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fb:context 
+            xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+            xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+            path="/">
+
+	<fb:repeater id="coplets"
+               parent-path="."
+               row-path="copletDatas">
+
+    <fb:identity>
+      <fb:value id="id" path="@id"/>
+    </fb:identity>
+	
+    <fb:on-bind>
+	      <fb:value id="coplet" path="id"/>
+	      <fb:value id="title" path="title"/>
+	  </fb:on-bind>
+	
+	</fb:repeater>
+
+</fb:context>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/form.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/form.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/form.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fd:form
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
+
+<fd:widgets>
+<fd:repeater id="coplets">
+  <fd:label>Coplets</fd:label>
+  <fd:widgets>
+	
+	<fd:output id="id">
+		<fd:datatype base="string"/>
+	</fd:output>
+	
+    <fd:output id="coplet">
+	<fd:datatype base="string"/>
+	 </fd:output>
+	
+    <fd:output id="title">
+      <fd:label>Name:</fd:label>
+      <fd:datatype base="string"/>
+    </fd:output>
+	
+	<fd:booleanfield id="selected">
+		<fd:label>Select</fd:label>
+	</fd:booleanfield>
+	
+  </fd:widgets>
+</fd:repeater>
+
+</fd:widgets>
+</fd:form>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/template.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/template.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addCoplet/template.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<div style="spacing:3px; padding:5px;" xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+	   xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
+      xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
+		<b><i18n:text key="copletManagement.selectCoplet"/></b><br/>
+		<ft:form-template action="tools/plugins/copletManagement/#{$continuation/id}.continue" method="POST">
+			<ft:repeater-widget id="coplets">
+				<ft:widget id="selected"/>: <ft:widget id="title"/>&#160;<br/>
+			</ft:repeater-widget>
+			<input type="submit"/>
+		</ft:form-template>
+</div>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addTab/form.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addTab/form.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addTab/form.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fd:form
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+<fd:widgets>
+    <fd:field id="name" required="true">
+      <fd:label><i18n:text key="copletManagement.tabName"/></fd:label>
+      <fd:datatype base="string"/>
+    </fd:field>
+
+</fd:widgets>
+</fd:form>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addTab/template.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addTab/template.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/addTab/template.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<div xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+	   xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
+      xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
+		<b><i18n:text key="copletManagement.enterTabName"/></b><br/>
+		<ft:form-template action="tools/plugins/copletManagement/#{$continuation/id}.continue" method="POST">
+				<ft:widget-label id="name"/>: <ft:widget id="name"/>&#160;<br/>
+			<input type="submit"/>
+		</ft:form-template>
+</div>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/binding.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/binding.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/binding.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fb:context 
+            xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+            xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+            path="/">
+
+	      <fb:value id="title" path="copletData/title"/>
+		  <fb:value id="visible" path="attributes/visible"/>
+</fb:context>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/form.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/form.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/form.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fd:form
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+<fd:widgets>
+	
+    <fd:field id="title">
+		<fd:label><i18n:text key="copletManagement.editCoplet.all.copletTitle"/>:</fd:label>
+		<fd:datatype base="string"/>
+	 </fd:field>
+	
+     <fd:booleanfield id="visible">
+		<fd:label><i18n:text key="copletManagement.editCoplet.all.visible"/>:</fd:label>
+		<fd:datatype base="boolean"/>
+	 </fd:booleanfield>
+
+</fd:widgets>
+</fd:form>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/template.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/template.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/all/template.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<div style="spacing:3px; padding:5px;" xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+	   xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
+      xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
+		<b><i18n:text key="copletManagement.editCoplet.all.title"/></b><br/>
+		<ft:form-template action="tools/plugins/copletManagement/#{$continuation/id}.continue" method="POST">
+				<ft:widget-label id="title"/> <ft:widget id="title"/>&#160;<br/>
+				<ft:widget-label id="visible"/> <ft:widget id="visible"/>&#160;<br/>
+			<input type="submit" value="copletManagement.editCoplet.save" i18n:attr="value"/>
+			<a href="tools/plugins/copletManagement/showTab?id=#{./backId}">back</a>
+		</ft:form-template>
+</div>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/binding.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/binding.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/binding.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fb:context 
+            xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+            xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+            path="/">
+
+	      <fb:value id="title" path="copletData/title"/>
+		  <fb:value id="uri" path="copletData/attributes/uri"/>
+		  <fb:value id="visible" path="attributes/visible"/>
+</fb:context>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/form.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/form.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/form.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fd:form
+  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+<fd:widgets>
+	
+    <fd:field id="title">
+		<fd:label><i18n:text key="copletManagement.editCoplet.uri.copletTitle"/>:</fd:label>
+		<fd:datatype base="string"/>
+	 </fd:field>
+	 
+     <fd:field id="uri">
+		<fd:label><i18n:text key="copletManagement.editCoplet.uri.copletUri"/>:</fd:label>
+		<fd:datatype base="string"/>
+	 </fd:field>
+	
+     <fd:booleanfield id="visible">
+		<fd:label><i18n:text key="copletManagement.editCoplet.all.visible"/>:</fd:label>
+		<fd:datatype base="boolean"/>
+	 </fd:booleanfield>
+	 
+</fd:widgets>
+</fd:form>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/template.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/template.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/form/editCoplet/uriCoplet/template.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<div style="spacing:3px; padding:5px;" xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+	   xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
+      xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
+		<b><i18n:text key="copletManagement.editCoplet.uri.title"/></b><br/>
+		<ft:form-template action="tools/plugins/copletManagement/#{$continuation/id}.continue" method="POST">
+				<ft:widget-label id="title"/> <ft:widget id="title"/>&#160;<br/>
+				<ft:widget-label id="uri"/> <ft:widget id="uri"/>&#160;<br/>
+				<ft:widget-label id="visible"/> <ft:widget id="visible"/>&#160;<br/>
+			<input type="submit" value="copletManagement.editCoplet.save" i18n:attr="value"/>
+			<a href="tools/plugins/copletManagement/showTab?id=#{./backId}">back</a>
+		</ft:form-template>
+</div>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+	<catalogue>
+		<message key="copletManagement.editLayout">Edit Layout</message>
+		<message key="copletManagement.title">Coplet-Management</message>
+		<message key="copletManagement.selectTab">Tab-Selection</message>
+		<message key="copletManagement.enterTabName">Enter a name for the tab</message>
+		<message key="copletManagement.tabName">Name</message>
+		
+		<message key="copletManagement.items.tab">Tab</message>
+		<message key="copletManagement.items.tabFolder">Tab-Folder</message>
+		<message key="copletManagement.items.row">Row</message>
+		<message key="copletManagement.items.col">Column</message>
+		<message key="copletManagement.items.coplet">Coplet</message>
+
+		<message key="copletManagement.actions.title">Actions</message>
+		<message key="copletManagement.actions.addCoplet">Add Coplet</message>
+		<message key="copletManagement.actions.addRow">Add Row</message>
+		<message key="copletManagement.actions.addCol">Add Column</message>
+		<message key="copletManagement.actions.addTab">Add Tab</message>
+		<message key="copletManagement.actions.removeItem">Delete Item</message>
+		<message key="copletManagement.actions.moveLeft">Move Left</message>
+		<message key="copletManagement.actions.moveUp">Move Up</message>
+		<message key="copletManagement.actions.moveRight">Move Right</message>
+		<message key="copletManagement.actions.moveDown">Move Down</message>
+		<message key="copletManagement.actions.drillDown">Drilldown</message>
+		<message key="copletManagement.actions.goUp">Go Up</message>
+		
+		<message key="copletManagement.selectSkin">Select Skin</message>
+
+		<message key="copletManagement.selectCoplet">Select one or more Coplets</message>
+		
+		<message key="copletManagement.editCoplet.save">Save</message>
+		<message key="copletManagement.editCoplet.all.title">Edit Coplet</message>
+		<message key="copletManagement.editCoplet.all.copletTitle">Title</message>
+		<message key="copletManagement.editCoplet.all.visible">Visible</message>
+		<message key="copletManagement.editCoplet.uri.title">Edit URI-Coplet</message>
+		<message key="copletManagement.editCoplet.uri.copletTitle">Title</message>
+		<message key="copletManagement.editCoplet.uri.copletUri">URI</message>
+		
+	</catalogue>

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement_de.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement_de.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement_de.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+
+<catalogue>
+	<message key="copletManagement.editLayout">Layout bearbeiten</message>
+	<message key="copletManagement.title">Coplet-Verwaltung</message>
+	<message key="copletManagement.selectTab">Tab-Auswahl</message>
+	<message key="copletManagement.enterTabName">Geben Sie einen Namen fuer den Tab ein</message>
+	<message key="copletManagement.tabName">Name</message>
+	
+	<message key="copletManagement.items.tab">Tab</message>
+	<message key="copletManagement.items.tabFolder">Tab-Ordner</message>
+	<message key="copletManagement.items.row">Zeile</message>
+	<message key="copletManagement.items.col">Spalte</message>
+	<message key="copletManagement.items.coplet">Coplet</message>
+
+	<message key="copletManagement.actions.title">Aktionen</message>
+	<message key="copletManagement.actions.addCoplet">Coplet hinzufuegen</message>
+	<message key="copletManagement.actions.addRow">Zeile hinzufuegen</message>
+	<message key="copletManagement.actions.addCol">Spalte hinzufuegen</message>
+	<message key="copletManagement.actions.addTab">Tab hinzufuegen</message>
+	<message key="copletManagement.actions.removeItem">Item loeschen</message>
+	<message key="copletManagement.actions.moveLeft">nach links verschieben</message>
+	<message key="copletManagement.actions.moveUp">nach oben verschieben</message>
+	<message key="copletManagement.actions.moveRight">nach rechts verschieben</message>
+	<message key="copletManagement.actions.moveDown">nach unten verschieben</message>
+	<message key="copletManagement.actions.drillDown">Drilldown</message>
+	<message key="copletManagement.actions.goUp">nach oben</message>
+	
+	<message key="copletManagement.selectSkin">Skinauswahl</message>
+	
+	<message key="copletManagement.selectCoplet">Waehlen Sie ein oder mehrere Coplets aus</message>
+	
+	<message key="copletManagement.editCoplet.save">speichern</message>
+	<message key="copletManagement.editCoplet.all.title">Coplet bearbeiten</message>
+	<message key="copletManagement.editCoplet.all.copletTitle">Titel</message>
+	<message key="copletManagement.editCoplet.all.visible">Sichtbar</message>
+	<message key="copletManagement.editCoplet.uri.title">URI-Coplet bearbeiten</message>
+	<message key="copletManagement.editCoplet.uri.copletTitle">Titel</message>
+	<message key="copletManagement.editCoplet.uri.copletUri">URI</message>
+	
+</catalogue>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement_en.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement_en.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/i18n/copletManagement_en.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+	<catalogue>
+		<message key="copletManagement.editLayout">Edit Layout</message>
+		<message key="copletManagement.title">Coplet-Management</message>
+		<message key="copletManagement.selectTab">Tab-Selection</message>		
+		<message key="copletManagement.enterTabName">Enter a name for the tab</message>
+		<message key="copletManagement.tabName">Name</message>
+		
+		<message key="copletManagement.items.tab">Tab</message>
+		<message key="copletManagement.items.tabFolder">Tab-Folder</message>
+		<message key="copletManagement.items.row">Row</message>
+		<message key="copletManagement.items.col">Column</message>
+		<message key="copletManagement.items.coplet">Coplet</message>
+		
+		<message key="copletManagement.actions.title">Actions</message>
+		<message key="copletManagement.actions.addCoplet">Add Coplet</message>
+		<message key="copletManagement.actions.addRow">Add Row</message>
+		<message key="copletManagement.actions.addCol">Add Column</message>
+		<message key="copletManagement.actions.addTab">Add Tab</message>
+		<message key="copletManagement.actions.removeItem">Delete Item</message>
+		<message key="copletManagement.actions.moveLeft">Move Left</message>
+		<message key="copletManagement.actions.moveUp">Move Up</message>
+		<message key="copletManagement.actions.moveRight">Move Right</message>
+		<message key="copletManagement.actions.moveDown">Move Down</message>
+		<message key="copletManagement.actions.drillDown">Drilldown</message>
+		<message key="copletManagement.actions.goUp">Go Up</message>
+
+		<message key="copletManagement.selectSkin">Select Skin</message>		
+		
+		<message key="copletManagement.selectCoplet">Select one or more Coplets</message>
+		
+		<message key="copletManagement.editCoplet.save">Save</message>
+		<message key="copletManagement.editCoplet.all.title">Edit Coplet</message>
+		<message key="copletManagement.editCoplet.all.copletTitle">Title</message>
+		<message key="copletManagement.editCoplet.all.visible">Visible</message>
+		<message key="copletManagement.editCoplet.uri.title">Edit URI-Coplet</message>
+		<message key="copletManagement.editCoplet.uri.copletTitle">Title</message>
+		<message key="copletManagement.editCoplet.uri.copletUri">URI</message>
+		
+	</catalogue>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/jx/selectSkin.jx
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/jx/selectSkin.jx?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/jx/selectSkin.jx	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<jx:template xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+<div style="spacing:3px; padding:5px;" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+	<b><i18n:text key="copletManagement.selectSkin"/></b>
+	<table>
+		<jx:forEach select="#{skins}">
+		<tr style="spacing:3px; padding:5px;">
+			<td>
+				<a href="tools/plugins/copletManagement/selectSkin?id=#{./name}"><img src="tools/plugins/copletManagement/selectSkinThumb/#{./name}" border="0"/></a>
+			</td>
+			<td>
+				<a href="tools/plugins/copletManagement/selectSkin?id=#{./name}">#{./name}</a>
+			</td>
+		</tr>
+		</jx:forEach>
+	</table>
+</div>
+</jx:template>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/sitemap.xmap
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/sitemap.xmap?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/sitemap.xmap	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,150 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  <map:components>
+      <map:generators default="file">
+      <map:generator name="xmlprofile"
+                     src="org.apache.cocoon.portal.tools.copletManagement.generation.XMLProfileGenerator" />
+	      </map:generators>
+    <map:transformers default="xalan">
+    </map:transformers>
+  </map:components>
+<!-- flow script -->
+  <map:flow language="javascript">
+    <map:script src="flow.js" />
+  </map:flow>
+  <map:pipelines>
+<!-- Now the accessible pipelines -->
+    <map:pipeline>
+      
+      <map:match pattern="main">
+        <map:generate src="tool.xml" />
+        <map:serialize type="xml" />
+      </map:match>
+     
+     <map:match pattern="save-user-profile">
+        <map:generate src="context://samples/blocks/portal/resources/save-user-profile.xml"/>
+        <map:transform type="session"/>
+        <map:transform type="write-source"/>
+        <map:serialize type="xml"/>
+      </map:match>
+
+     
+     		<map:match pattern="i18n/**">
+			<map:generate src="{1}" type="i18nc"/>
+			<map:serialize type="xml"/>
+		</map:match> 
+     
+	<!-- generate the layoutprofile -->
+	<map:match pattern="layoutProfile/*">
+		<map:generate type="xmlprofile"/>
+		<map:transform src="styles/createIndex.xsl">
+			<map:parameter name="rootId" value="{1}" />
+		</map:transform>
+		<map:serialize type="xml" />
+	</map:match>
+	<map:match pattern="layoutProfile">
+		<map:generate type="xmlprofile"/>
+		<map:transform src="styles/createIndex.xsl">
+		</map:transform>
+		<map:serialize type="xml" />
+	</map:match>
+      
+      <map:match pattern="page/showTab/*">
+        <map:generate src="cocoon:/layoutProfile/{1}"/>
+        <map:transform src="../../skins/{portal-skin:skin}/styles/showTab.xsl">
+          <map:parameter name="current" value="{1}" />
+          <map:parameter name="parent" value="{request-param:parent}"/>
+          <map:parameter name="currentSkin" value="{global:skin}"/>
+        </map:transform>
+        <map:transform type="tool-layout">
+          <map:parameter name="selected" value="copletManagement" />
+        </map:transform>
+        <map:transform type="i18n" />
+        <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
+        <map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
+        <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
+          <map:parameter name="base" value="{global:base}" />
+        </map:transform>
+        <map:serialize type="html" />
+      </map:match>
+      
+      <map:match pattern="page/showxml/*">
+        <map:generate src="cocoon:/layoutProfile/{1}"/>
+        <map:serialize type="xml" />
+      </map:match>
+      
+      <map:match pattern="jx/*.jx">
+        <map:generate src="jx/{1}.jx" type="jx" />
+        <map:transform type="tool-layout">
+          <map:parameter name="selected" value="copletManagement" />
+        </map:transform>
+        <map:transform type="i18n" />
+        <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
+        <map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
+        <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
+          <map:parameter name="base" value="{global:base}" />
+        </map:transform>
+        <map:serialize type="html" />
+      </map:match>
+      
+      <map:match pattern="form/**">
+        <map:generate src="form/{1}.xml"/>
+        <map:transform type="forms"/>
+        <map:transform type="jx"/>
+        <map:transform type="tool-layout">
+          <map:parameter name="selected" value="copletManagement" />
+        </map:transform>
+        <map:transform src="{portal-skin:skin.basepath}/styles/forms-styling.xsl" />
+        <map:transform type="i18n" />
+        <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
+        <map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
+        <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
+          <map:parameter name="base" value="{global:base}" />
+        </map:transform>
+        <map:serialize type="html" />
+      </map:match>
+      
+      <map:match pattern="model/**">
+      	<map:generate src="form/{1}/form.xml"/>
+      	<map:serialize type="xml"/>
+      </map:match>
+      
+      <map:match pattern="selectSkinThumb/*">
+      	<map:read src="{portal-skin:skin.thumbnailuri.{1}}"/>
+      </map:match>
+      
+      <map:match pattern="*.continue">
+        <map:call continuation="{1}" />
+      </map:match>
+      
+      <map:match pattern="save-user-profile">
+        <map:generate src="context:/mobi/ressources/save-user-profile.xml"/>
+        <map:transform type="session"/>
+        <map:transform type="write-source"/>
+        <map:serialize type="xml"/>
+      </map:match>
+      
+      <map:match pattern="*">
+        <map:call function="{1}" />
+      </map:match>
+      
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>
+<!-- end of file -->
+

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/styles/createIndex.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/styles/createIndex.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/styles/createIndex.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,152 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<xsl:param name="rootId"/>
+	
+<xsl:template match="/">
+	<xsl:apply-templates select="*" mode="firstnode"/>
+</xsl:template>
+
+<xsl:template match="*" mode="firstnode">
+	
+	<!-- calculate new id by the level of the node -->
+	<!--xsl:variable name="newId"><xsl:value-of select="$prefix"/><xsl:value-of select="position()"/></xsl:variable-->
+	
+	<!-- check: is the current node the new root node? -->
+	<xsl:choose>
+		<xsl:when test="string-length($rootId) &lt;= 1 or not($rootId)">
+			<xsl:copy>
+				
+				<xsl:apply-templates select="@*"/>
+				<xsl:if test="not(@id)">
+
+					<xsl:attribute name="id">1</xsl:attribute>
+				</xsl:if>
+				<!-- go on -->
+				<xsl:apply-templates select=".">
+					<xsl:with-param name="prefix">1.</xsl:with-param>
+					<xsl:with-param name="parent">1</xsl:with-param>
+ 					<xsl:with-param name="parentSet">true</xsl:with-param>
+				</xsl:apply-templates>
+				
+			</xsl:copy>
+		</xsl:when>
+		<xsl:otherwise>
+			<xsl:apply-templates select=".">
+				<xsl:with-param name="prefix">1.</xsl:with-param>
+				<xsl:with-param name="parent">1</xsl:with-param>
+				<xsl:with-param name="parentSet"></xsl:with-param>
+			</xsl:apply-templates>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+<xsl:template match="node()">
+	<xsl:param name="prefix"/>
+	<xsl:param name="parent"/>
+	<xsl:param name="parentSet"/>
+	
+	<xsl:for-each select="*">
+		
+		<!-- calculate new id by the level of the node -->
+		<xsl:variable name="counter">
+			<xsl:call-template name="getIndex">
+				<xsl:with-param name="currentpos"><xsl:value-of select="position()"/></xsl:with-param>
+			</xsl:call-template>
+		</xsl:variable>
+		<xsl:variable name="newId"><xsl:value-of select="$prefix"/><xsl:value-of select="string-length(normalize-space($counter))"/></xsl:variable>
+		
+		<!-- check: is the current node the new root node? -->
+		<xsl:choose>
+			<xsl:when test="(starts-with($newId, $rootId) and (string-length(substring-after($newId,$rootId)) = 0 or starts-with(substring-after($newId,$rootId),'.'))) or not($rootId)">
+				<xsl:copy>
+					
+					<!-- set id, if it does not exist an is the right node -->
+					<xsl:if test="not(@id) and name() = 'composite-layout' or name() = 'named-item' or name() = 'coplet-layout' or name() = 'coplet-instance-data' or name() = 'item' or name() = '' or name() = ''">
+						<xsl:attribute name="id"><xsl:value-of select="$newId"/></xsl:attribute>
+					</xsl:if>
+					
+					<!-- if the current node is not the root node, set calculated parent id -->
+					<xsl:if test="$parentSet != 'true'">
+						<xsl:attribute name="parent"><xsl:value-of select="$parent"/></xsl:attribute>
+					</xsl:if>
+					
+					<!-- calculate parent: it is always the last composite-layout or named-item node -->
+					<xsl:variable name="newParent">
+						<xsl:choose>
+							<xsl:when test="name(.) = 'composite-layout' or name(.) = 'named-item'">
+								<xsl:value-of select="$newId"/>
+						</xsl:when>
+							<xsl:otherwise>
+								<xsl:value-of select="$parent"/>
+							</xsl:otherwise>
+						</xsl:choose>
+					</xsl:variable>
+					
+					<!-- get all other attributes -->
+					<xsl:apply-templates select="@*"/>
+					
+					<!-- go on -->
+					<xsl:apply-templates select=".">
+						<xsl:with-param name="prefix"><xsl:value-of select="$prefix"/><xsl:value-of select="string-length(normalize-space($counter))"/>.</xsl:with-param>
+						<xsl:with-param name="parent"><xsl:value-of select="$newParent"/></xsl:with-param>
+						<xsl:with-param name="parentSet">true</xsl:with-param>
+					</xsl:apply-templates>
+					
+					<xsl:if test="name() = 'coplet-instance-data'"><xsl:value-of select="."/></xsl:if>
+					
+				</xsl:copy>
+			</xsl:when>
+			<xsl:otherwise>
+		
+				<!-- calculate parent: it is always the last composite-layout or named-item node -->
+				<xsl:variable name="newParent">
+					<xsl:choose>
+						<xsl:when test="name(.) = 'composite-layout' or name(.) = 'named-item'">
+							<xsl:value-of select="$prefix"/><xsl:value-of select="position()"/>
+						</xsl:when>
+						<xsl:otherwise>
+							<xsl:value-of select="$parent"/>
+						</xsl:otherwise>
+				</xsl:choose>
+				</xsl:variable>
+				
+				<xsl:apply-templates select=".">
+					<xsl:with-param name="prefix"><xsl:value-of select="$prefix"/><xsl:value-of select="string-length(normalize-space($counter))"/>.</xsl:with-param>
+					<xsl:with-param name="parent"><xsl:value-of select="$newParent"/></xsl:with-param>
+				</xsl:apply-templates>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:for-each>
+</xsl:template>
+
+<xsl:template name="getIndex">
+	<xsl:param name="currentpos"/>
+	
+	<xsl:for-each select="parent::node()/*[position() &lt;= $currentpos]">
+		<xsl:if test="name() = 'composite-layout' or name() = 'named-item' or name() = 'coplet-layout' or name() = 'coplet-instance-data' or name() = 'item' or name() = '' or name() = ''">.</xsl:if>
+	</xsl:for-each>
+</xsl:template>
+
+<xsl:template match="@*">
+	<xsl:copy>
+		<xsl:apply-templates select="@*|node()" />
+	</xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/tool.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/tool.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/copletManagement/tool.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<tool name="copletManagement.title" id="copletManagement">
+	<functions>
+		<function name="copletManagement.editLayout" id="copletMangementEditLayout" pipeline="showTab"/>
+		<function name="copletManagement.selectSkin" id="copletManagementSelectSkin" pipeline="selectSkin"/>
+	</functions>
+	<i18n>
+		<catalogue id="copletManagement" name="copletManagement"/>
+	</i18n>
+</tool>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<!-- This catalogue file contains translations for built-in CForms messages. -->
+<catalogue>
+  <message key="general.field-required">This field is required.</message>
+
+  <message key="datatype.conversion-failed">Not a valid {0}.</message>
+  <message key="datatype.long">integer number</message>
+  <message key="datatype.decimal">decimal number</message>
+  <message key="datatype.double">decimal number</message>
+  <message key="datatype.float">decimal number</message>
+  <message key="datatype.integer">integer number</message>
+  <message key="datatype.date">date</message>
+
+  <message key="validation.string.exact-length">Should be exactly {0} characters.</message>
+  <message key="validation.string.range-length">Should contain from {0} to {1} characters.</message>
+  <message key="validation.string.min-length">Should be at least {0} characters.</message>
+  <message key="validation.string.max-length">Should be at most {0} characters.</message>
+  <message key="validation.string.regexp">Does not match the following regular expression: {0}</message>
+
+  <message key="validation.string.invalidemail">This field does not contain a valid email address</message>
+
+  <message key="validation.array.exact-valuecount">Exactly {0} item(s) should be selected.</message>
+  <message key="validation.array.range-valuecount">At least {0} item(s) and at most {1} items should be selected.</message>
+  <message key="validation.array.min-valuecount">At least {0} item(s) should be selected.</message>
+  <message key="validation.array.max-valuecount">At most {0} items should be selected.</message>
+
+  <message key="multivaluefield.conversionfailed">One of the selected values is of an incorrect type.</message>
+
+  <message key="validation.numeric.range">Number should be in the range from {0} to {1}.</message>
+  <message key="validation.numeric.min">Number should be greater than or equal to {0}.</message>
+  <message key="validation.numeric.max">Number should be less than or equal to {0}.</message>
+
+  <message key="validation.mod10">Mod 10 check failed.</message>
+
+
+  <message key="aggregatedfield.split-failed">Content of this field does not match the following regular expression: {0}</message>
+  <message key="upload.invalid-type">Invalid content type.</message>
+</catalogue>

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages_de.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages_de.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages_de.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<!-- This catalogue file contains translations for built-in Woody messages. -->
+<catalogue xml:lang="de">
+  <message key="general.field-required">Dieses Feld muss aufgefüllt werden.</message>
+
+  <message key="datatype.conversion-failed">Ungültige(s) {0}.</message>
+  <message key="datatype.long">natürliche Zahl</message>
+  <message key="datatype.date">Datum</message>
+
+  <message key="validation.string.exact-length">Bitte geben Sie genau {0} Zeichen ein.</message>
+  <message key="validation.string.range-length">Bitte geben Sie zwischen {0} und {1} Zeichen ein.</message>
+  <message key="validation.string.min-length">Bitte geben Sie mindestens {0} Zeichen ein.</message>
+  <message key="validation.string.max-length">Bitte geben Sie höchstens {0} Zeichen ein.</message>
+  <message key="validation.string.regexp">Die Eingabe entspricht nicht dem regulären Ausdruck: {0}</message>
+
+  <message key="validation.string.invalidemail">Dieses Feld enthält keine gültige Email Adresse</message>
+
+  <message key="validation.array.exact-valuecount">Es müssen genau {0} Objekt(e) selektiert sein.</message>
+  <message key="validation.array.range-valuecount">Es müssen mindestens {0} Objekt(e)  und höchstens {1} Objekt(e) selektiert werden.</message>
+  <message key="validation.array.min-valuecount">Es müssen mindestens {0} Objekt(e) selektiert sein.</message>
+  <message key="validation.array.max-valuecount">Es dürfen höchstens {0} Objekt(e) selektiert werden.</message>
+
+  <message key="multivaluefield.conversionfailed">Eines der selektierten Objekte ist vom falschen Typ.</message>
+
+  <message key="validation.numeric.range">Die Zahl sollte aus dem Bereich {0} und {1} sein.</message>
+  <message key="validation.numeric.min">Die Zahl sollte grösser oder gleich {0} sein.</message>
+  <message key="validation.numeric.max">Die Zahl sollte kleiner oder gleich {0} sein.</message>
+
+  <message key="validation.mod10">Modulo 10 Test gescheitert.</message>
+
+
+  <message key="aggregatedfield.split-failed">Der Inhalt des Feldes entspricht nicht dem regul. Ausdruck: {0}</message>
+  <message key="upload.invalid-type">Falscher Inhaltstyp.</message>
+</catalogue>

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages_en.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages_en.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/FormsMessages_en.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<!-- This catalogue file contains translations for built-in CForms messages. -->
+<catalogue>
+  <message key="general.field-required">This field is required.</message>
+
+  <message key="datatype.conversion-failed">Not a valid {0}.</message>
+  <message key="datatype.long">integer number</message>
+  <message key="datatype.decimal">decimal number</message>
+  <message key="datatype.double">decimal number</message>
+  <message key="datatype.float">decimal number</message>
+  <message key="datatype.integer">integer number</message>
+  <message key="datatype.date">date</message>
+
+  <message key="validation.string.exact-length">Should be exactly {0} characters.</message>
+  <message key="validation.string.range-length">Should contain from {0} to {1} characters.</message>
+  <message key="validation.string.min-length">Should be at least {0} characters.</message>
+  <message key="validation.string.max-length">Should be at most {0} characters.</message>
+  <message key="validation.string.regexp">Does not match the following regular expression: {0}</message>
+
+  <message key="validation.string.invalidemail">This field does not contain a valid email address</message>
+
+  <message key="validation.array.exact-valuecount">Exactly {0} item(s) should be selected.</message>
+  <message key="validation.array.range-valuecount">At least {0} item(s) and at most {1} items should be selected.</message>
+  <message key="validation.array.min-valuecount">At least {0} item(s) should be selected.</message>
+  <message key="validation.array.max-valuecount">At most {0} items should be selected.</message>
+
+  <message key="multivaluefield.conversionfailed">One of the selected values is of an incorrect type.</message>
+
+  <message key="validation.numeric.range">Number should be in the range from {0} to {1}.</message>
+  <message key="validation.numeric.min">Number should be greater than or equal to {0}.</message>
+  <message key="validation.numeric.max">Number should be less than or equal to {0}.</message>
+
+  <message key="validation.mod10">Mod 10 check failed.</message>
+
+
+  <message key="aggregatedfield.split-failed">Content of this field does not match the following regular expression: {0}</message>
+  <message key="upload.invalid-type">Invalid content type.</message>
+</catalogue>

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+	<catalogue>
+		<message key="portalTools">Portal Tools</message>
+		<message key="portalTools.functions">Functions</message>
+		<message key="portalTools.tools">Tools</message>
+		<message key="portalTools.noToolsAvailable">No Tools availabel</message>
+	</catalogue>

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default_de.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default_de.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default_de.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+	<catalogue>
+		<message key="portalTools">Portal Tools</message>
+		<message key="portalTools.functions">Funktionen</message>		
+		<message key="portalTools.tools">Tools</message>
+		<message key="portalTools.noToolsAvailable">Keine Tools verfügbar</message>		
+	</catalogue>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default_en.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default_en.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/i18n/default_en.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+	<catalogue>
+		<message key="portalTools">Portal Tools</message>
+		<message key="portalTools.functions">Functions</message>
+		<message key="portalTools.tools">Tools</message>		
+		<message key="portalTools.noToolsAvailable">No Tools availabel</message>
+	</catalogue>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/tool.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/tool.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/default/tool.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+	<tool name="Default" id="default">
+	<i18n>
+		<catalogue id="default" name="default"/>
+		<catalogue id="FormsMessages" name="FormsMessages"/>
+	</i18n>
+</tool>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/flow.js
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/flow.js?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/flow.js	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,147 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * 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.
+ */
+cocoon.load("resource://org/apache/cocoon/portal/tools/ptm.js");
+
+/* component authenticationManager contains the data from the file 'sunrise-user.xml' */
+
+function getContext ()
+{
+	var contextMan = 
+	cocoon.getComponent(Packages.org.apache.cocoon.webapps.session.ContextManager.ROLE);
+	var context = contextMan.getContext("authentication");
+
+	var authenticationManager = cocoon.getComponent("org.apache.cocoon.webapps.authentication.AuthenticationManager");
+	/* get current user data */
+	var context = authenticationManager.getState().getHandler().getContext();
+
+	var grabber = new Packages.org.apache.cocoon.portal.tools.userManagement.ContextGrabber();
+	var obj = grabber.grab(context);
+	
+	var pic = obj.getContextItem ("picture");
+	if (pic != null)
+		obj.setPicture (pic);
+	
+	cocoon.releaseComponent(contextMan);
+	cocoon.releaseComponent(authenticationManager);
+	return obj;
+}
+
+/* public function: print the data of an user
+ */
+function showUser() {
+	
+	var obj = getContext ();
+	
+	/* show form */
+	var form = new Form("cocoon:/page/model/userData?mode=readonly");
+	form.createBinding("cocoon:/page/binding/userData?mode=readonly");
+    form.load(obj);
+    form.showForm("page/form/userData?mode=readonly");
+}
+
+/* public function: print and edit the data of an user
+ */
+function editUser() {
+
+	var obj = getContext ();
+	
+	/* show form */
+	var form = new Form("cocoon:/page/model/userData?mode=edit");
+	form.createBinding("cocoon:/page/binding/userData?mode=edit");
+    form.load(obj);
+    form.showForm("page/form/userData?mode=edit");
+}
+
+/* public function: you can create a new user
+ */
+function addUser() {
+	
+	var authenticationManager = cocoon.getComponent("org.apache.cocoon.webapps.authentication.AuthenticationManager");
+	
+	/* get current user data */
+	var obj = new Packages.org.apache.cocoon.portal.tools.userManagement.UserBean();
+	var context = authenticationManager.getState().getHandler().getContext();
+	createDefaultKeys (context.getXML("/authentication/"),0,obj);
+	
+	var mf = obj.getContext();
+	for(var it = mf.iterator();it.hasNext();) {
+		var e = it.next()
+		print(e.getValue());
+	}
+	
+	/* show form */
+	var form = new Form("cocoon:/page/model/userData?mode=add");
+	form.createBinding("cocoon:/page/binding/userData?mode=add");
+    form.load(obj);
+    form.showForm("page/form/userData?mode=add");
+
+    cocoon.releaseComponent(authenticationManager);
+}
+
+/* internal function: creating an empty context of user data from the authenticationManager
+ */
+function createDefaultKeys (node,lev, obj) {
+	
+	node = node.firstChild;
+	while (node != null)
+	{
+		if (node.nodeName == '#text')
+		{
+			createDefaultKeys(node,lev+1,obj);
+		}
+		else if (node.firstChild == null) 
+		{
+			obj.addContext (node.nodeName,"");
+		}
+		else if (node.firstChild.nodeValue == null)
+		{
+			createDefaultKeys(node,lev+1,obj);
+		}
+		else
+		{
+			obj.addContext (node.nodeName,"");
+		}
+		node = node.nextSibling;
+	}
+}
+
+/* internal function: creates the context of the user data from the authenticationManager
+ */
+function printRek (node,lev, obj)
+{
+	node = node.firstChild;
+	while (node != null)
+	{
+		if (node.nodeName == '#text')
+		{
+			printRek(node,lev+1,obj);
+		}
+		else if (node.firstChild == null) 
+		{
+			obj.addContext (node.nodeName,"");
+		}
+		else if (node.firstChild.nodeValue == null)
+		{
+			printRek(node,lev+1,obj);
+		}
+		else
+		{
+			obj.addContext (node.nodeName,node.firstChild.nodeValue);
+		}
+		node = node.nextSibling;
+	}
+
+}
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_binding.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_binding.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_binding.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fb:context xmlns:fb="http://apache.org/cocoon/forms/1.0#binding" 
+			xmlns:fd="http://apache.org/cocoon/forms/1.0#definition" 
+			path="/">
+	
+	<fb:value id="picture" path="picture"/>
+	
+	<fb:repeater id="context" parent-path="." row-path="context">
+		
+		<fb:identity>
+			<fb:value id="id" path="@id"/>
+		</fb:identity>
+		
+		<fb:on-bind>
+			<fb:value id="key" path="key"/>
+			<fb:value id="value" path="value"/>
+		</fb:on-bind>
+		
+	</fb:repeater>
+	
+</fb:context>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_add.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_add.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_add.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
+	
+	<fd:widgets>
+		
+		<fd:upload id="pic_file">
+			<fd:label></fd:label>
+		</fd:upload>
+		
+		<fd:output id="picture">
+			<fd:datatype base="string"/>
+		</fd:output>
+		
+		<fd:repeater id="context">
+			  <fd:label>Context</fd:label>
+			  
+			  <fd:widgets>
+				
+				<fd:output id="id">
+					<fd:datatype base="string"/>
+				</fd:output>
+				
+				<fd:output id="key">
+					<fd:label>Key</fd:label>
+					<fd:datatype base="string"/>
+				</fd:output>
+				
+				<fd:field id="value">
+					<fd:label>Value</fd:label>
+					<fd:datatype base="string"/>
+				</fd:field>
+				
+			</fd:widgets>
+		</fd:repeater>
+		
+	</fd:widgets>
+</fd:form>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_edit.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_edit.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_edit.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
+
+	<fd:widgets>
+	
+		<!-- dummy for add user -->
+		<fd:output id="pic_file">
+			<fd:datatype base="string"/>
+		</fd:output>
+	
+		<fd:output id="picture">
+			<fd:datatype base="string"/>
+		</fd:output>
+	
+		<fd:repeater id="context">
+			  <fd:label>Context</fd:label>
+			  
+			  <fd:widgets>
+				
+				<fd:output id="id">
+					<fd:datatype base="string"/>
+				</fd:output>
+				
+				<fd:output id="key">
+					<fd:label>Key</fd:label>
+					<fd:datatype base="string"/>
+				</fd:output>
+				
+				<fd:field id="value">
+					<fd:label>Value</fd:label>
+					<fd:datatype base="string"/>
+				</fd:field>
+				
+			</fd:widgets>
+		</fd:repeater>
+		
+	</fd:widgets>
+</fd:form>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_readonly.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_readonly.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_form_readonly.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition">
+
+	<fd:widgets>
+		
+		<!-- dummy for add user -->
+		<fd:output id="pic_file">
+			<fd:datatype base="string"/>
+		</fd:output>
+		
+		<fd:output id="picture">
+			<fd:datatype base="string"/>
+		</fd:output>
+	
+		<fd:repeater id="context">
+			  <fd:label>Context</fd:label>
+			  
+			  <fd:widgets>
+				
+				<fd:output id="id">
+					<fd:datatype base="string"/>
+				</fd:output>
+				
+				<fd:output id="key">
+					<fd:label>Key</fd:label>
+					<fd:datatype base="string"/>
+				</fd:output>
+				
+				<fd:output id="value">
+					<fd:label>Value</fd:label>
+					<fd:datatype base="string"/>
+				</fd:output>
+				
+			</fd:widgets>
+		</fd:repeater>
+		
+	</fd:widgets>
+</fd:form>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_style.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_style.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_style.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<abstractFormStyle>
+	<items name="userManagement.userData_basicInformation">
+		<item>firstname</item>
+		<item>lastname</item>
+		<item>title</item>
+		<item>name</item>
+		<item>role</item>
+		<item>language</item>
+	</items>
+	<items name="userManagement.userData_contact">
+		<item>email</item>
+		<item>phoneHome</item>
+		<item>mobileHome</item>
+		<item>phoneWork</item>
+		<item>addressStreet</item>
+		<item>addressTown</item>
+	</items>
+</abstractFormStyle>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_template.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_template.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/form/userData_template.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<div style="padding-left:10px;" 
+	xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+	xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
+	xmlns:fi="http://apache.org/cocoon/forms/1.0#instance">
+	
+	<ft:form-template action="tools/plugins/userManagement/#{$continuation/id}.continue" method="POST">
+		
+		<p><b><i18n:text i18n:key="userManagement.userData_headline"/>:</b></p>
+		
+		<table width="100%">
+			<tr>
+			
+				<td valign="top"  width="200">
+					<table width="100%">
+						<tr>
+							<td>
+								<formularImage>
+									<src><ft:widget id="picture"/></src>
+								</formularImage>
+								<ft:widget id="pic_file"/>
+							</td>
+						</tr>
+					</table>
+				</td>
+				
+				<td>
+					&#160;
+				</td>
+				
+				<td valign="top" >
+					
+					<table width="100%">
+						<col width="200px"/>
+						<col/>
+						
+						<abstractFormular>
+							<ft:repeater-widget id="context">
+								<tr>
+									<td style="border-bottom-style:dotted;border-bottom-color:#cccccc;border-bottom-width:1px;"><ft:widget id="key"/></td>
+									<td style="border-bottom-style:dotted;border-bottom-color:#cccccc;border-bottom-width:1px;">
+										<ft:widget id="value">
+											<fi:styling style="width:100%"/>
+										</ft:widget>
+									</td>
+								</tr>
+							</ft:repeater-widget>
+						</abstractFormular>
+						
+					</table>
+					<br/>
+				</td>
+			</tr>
+			<tr>
+				<td colspan="2"></td>
+				<td>
+					<input type="submit" value="userManagement.userData_save" i18n:attr="value" onClick="alert ('Sorry, not implemented in the portal yet.'); return false;"/>
+				</td>
+			</tr>
+		</table>
+	</ft:form-template>
+</div>

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<catalogue>
+	<message key="userManagement.title">User management</message>
+	
+	<message key="userManagement.showUser">Show user</message>
+	<message key="userManagement.editUser">Edit user</message>
+	<message key="userManagement.addUser">Add user</message>
+	
+	<message key="userManagement.userData_headline">User data</message>
+	<message key="userManagement.userData_basicInformation">Basic informations</message>
+	<message key="userManagement.userData_contact">Contact</message>
+	
+	<message key="userManagement.userData_lastname">lastname</message>
+	<message key="userManagement.userData_firstname">firstname</message>
+	<message key="userManagement.userData_name">userID</message>
+	<message key="userManagement.userData_title">titel</message>
+	<message key="userManagement.userData_role">current role</message>
+	<message key="userManagement.userData_language">selected language</message>
+	<message key="userManagement.userData_email">email</message>
+	<message key="userManagement.userData_phoneHome">phone (home)</message>
+	<message key="userManagement.userData_mobileHome">mobile (home)</message>
+	<message key="userManagement.userData_phoneWork">phone (work)</message>
+	<message key="userManagement.userData_addressStreet">street</message>
+	<message key="userManagement.userData_addressTown">town</message>
+	
+	<message key="userManagement.userData_save">save</message>
+	<message key="userManagement.userData_nopicture">No picture available</message>
+
+</catalogue>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement_de.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement_de.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement_de.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<catalogue>
+	
+	<message key="userManagement.title">Benutzer-Verwaltung</message>
+	
+	<message key="userManagement.showUser">Benutzerdaten anzeigen</message>
+	<message key="userManagement.editUser">Benutzerdaten editieren</message>
+	<message key="userManagement.addUser">Benutzer hinzuf&#252;gen</message>
+	
+	<message key="userManagement.userData_headline">Benutzerdaten</message>
+	<message key="userManagement.userData_basicInformation">Basis-Informationen</message>
+	<message key="userManagement.userData_contact">Kontaktdaten</message>
+	
+	<message key="userManagement.userData_lastname">Nachname</message>
+	<message key="userManagement.userData_firstname">Vorname</message>
+	<message key="userManagement.userData_name">UserID</message>
+	<message key="userManagement.userData_title">Titel</message>
+	<message key="userManagement.userData_role">derzeitige Rolle</message>
+	<message key="userManagement.userData_language">bevorzugte Spracheinstellung</message>
+	<message key="userManagement.userData_email">eMail</message>
+	<message key="userManagement.userData_phoneHome">Telefon (privat)</message>
+	<message key="userManagement.userData_mobileHome">Handy (privat)</message>
+	<message key="userManagement.userData_phoneWork">Telefon (Arbeit)</message>
+	<message key="userManagement.userData_addressStreet">Stra&#223;e</message>
+	<message key="userManagement.userData_addressTown">PLZ, Stadt</message>
+	
+	<message key="userManagement.userData_save">speichern</message>	
+	<message key="userManagement.userData_nopicture">Kein Foto vorhanden</message>	
+</catalogue>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement_en.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement_en.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/i18n/userManagement_en.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<catalogue>
+	<message key="userManagement.title">User management</message>
+	
+	<message key="userManagement.showUser">Show user</message>
+	<message key="userManagement.editUser">Edit user</message>
+	<message key="userManagement.addUser">Add user</message>
+	
+	<message key="userManagement.userData_headline">User data</message>
+	<message key="userManagement.userData_basicInformation">Basic informations</message>
+	<message key="userManagement.userData_contact">Contact</message>
+	
+	<message key="userManagement.userData_lastname">lastname</message>
+	<message key="userManagement.userData_firstname">firstname</message>
+	<message key="userManagement.userData_name">userID</message>
+	<message key="userManagement.userData_title">titel</message>
+	<message key="userManagement.userData_role">current role</message>
+	<message key="userManagement.userData_language">selected language</message>
+	<message key="userManagement.userData_email">email</message>
+	<message key="userManagement.userData_phoneHome">phone (home)</message>
+	<message key="userManagement.userData_mobileHome">mobile (home)</message>
+	<message key="userManagement.userData_phoneWork">phone (work)</message>
+	<message key="userManagement.userData_addressStreet">street</message>
+	<message key="userManagement.userData_addressTown">town</message>
+	
+	<message key="userManagement.userData_save">save</message>
+	<message key="userManagement.userData_nopicture">No picture available</message>
+
+</catalogue>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/sitemap.xmap
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/sitemap.xmap?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/sitemap.xmap	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,95 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+	
+	<!-- components -->
+	<map:components>
+		<map:transformers default="xalan">
+		</map:transformers>
+	</map:components>
+	
+	<!-- flow script -->
+	<map:flow language="javascript">
+		<map:script src="flow.js"/>
+	</map:flow>
+	
+	<map:pipelines>
+
+		<!-- accessible pipeline -->
+		<map:pipeline>
+			
+			<!-- necessary standard matcher -->
+			<map:match pattern="main">
+				<map:generate src="tool.xml"/>
+				<map:serialize type="xml"/>
+			</map:match>
+     		
+     	<map:match pattern="i18n/**">
+			<map:generate src="{1}" type="i18nc"/>
+			<map:serialize type="xml"/>
+		</map:match>
+     		
+			<map:match pattern="*">
+				<map:call function="{1}">
+					<map:parameter name="user" value="{ID}"/>
+				</map:call>
+			</map:match>
+			
+		
+			<!-- matcher for this plugin -->
+			
+			<map:match pattern="page/form/*">
+				<map:generate src="form/{1}_template.xml"/>
+				<map:transform type="forms" />
+				<map:transform type="tool-layout">
+					<map:parameter name="selected" value="userManagement" />
+				</map:transform>
+				<map:transform src="{portal-skin:skin.basepath}/styles/forms-styling.xsl" />
+				<map:transform src="stylesheets/convertAbstractForm.xsl">
+					<map:parameter name="mode" value="{request-param:mode}"/>
+				</map:transform>
+				<map:transform type="i18n" />
+				<map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
+				<map:transform src="../../skins/{portal-skin:skin}/styles/function.xsl" />
+				<map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
+					<map:parameter name="base" value="{global:base}" />
+				</map:transform>
+				<map:serialize type="html" />
+			</map:match>
+			
+			<map:match pattern="page/model/*">
+				<map:generate src="form/{1}_form_{request-param:mode}.xml"/>
+				<map:serialize type="xml"/>
+			</map:match>
+			
+			<map:match pattern="page/binding/*">
+				<map:generate src="form/{1}_binding.xml"/>
+				<map:serialize type="xml"/>
+			</map:match>
+			
+			<map:match pattern="page/abstractForm">
+				<map:generate src="form/userData_style.xml"/>
+				<map:serialize type="xml"/>
+			</map:match>
+			
+		</map:pipeline>
+		
+	</map:pipelines>
+	
+</map:sitemap>
+
+<!-- end of file -->

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/stylesheets/convertAbstractForm.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/stylesheets/convertAbstractForm.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/stylesheets/convertAbstractForm.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,102 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0" 
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+<xsl:param name="mode"/>
+
+<xsl:template match="/">
+	<xsl:apply-templates/>
+</xsl:template>
+
+<xsl:template match="formularImage">
+	<xsl:choose>
+		<xsl:when test="string-length(src/.) &gt; 0">
+			<img>
+				<xsl:attribute name="src">userImages/<xsl:value-of select="src/."/></xsl:attribute>
+			</img>
+		</xsl:when>
+		<xsl:otherwise>
+			<p style="font-size:9px;" align="center"><i18n:text i18n:key="userManagement.userData_nopicture"/></p>
+		</xsl:otherwise>
+	</xsl:choose>
+</xsl:template>
+
+<xsl:template match="input">
+	<xsl:if test="not (@type = 'submit' and $mode = 'readonly')">
+		<xsl:copy>
+			<xsl:apply-templates select="@*|node()" />
+		</xsl:copy>
+	</xsl:if>
+</xsl:template>
+
+<xsl:template match="abstractFormular">
+	
+	<xsl:variable name="abstractForm" select="document('cocoon:/page/abstractForm')"/>
+	<xsl:variable name="currentNode" select="current()"/>
+	
+	<xsl:for-each select="$abstractForm/abstractFormStyle/items">
+		<tr>
+			<td colspan="2" style="background-color:#cccccc; font-size:13px; color:#ffffff">
+				<b>
+					<i18n:text>
+						<xsl:attribute name="i18n:key"><xsl:value-of select="@name"/></xsl:attribute>
+					</i18n:text>
+				</b>
+			</td>
+		</tr>
+		<xsl:for-each select="item">
+			<xsl:apply-templates mode="getData">
+				<xsl:with-param name="item"><xsl:value-of select="."/></xsl:with-param>
+				<xsl:with-param name="currentNode" select="$currentNode"/>
+			</xsl:apply-templates>
+		</xsl:for-each>
+		<tr><td colspan="2">&#160;</td></tr>
+	</xsl:for-each>
+</xsl:template>
+
+<xsl:template match="@*|node()" mode="getData">
+	<xsl:param name="item"/>
+	<xsl:param name="currentNode"/>
+	
+
+
+	<xsl:for-each select="$currentNode/tr">
+		<xsl:if test="td[1] = $item">
+			<tr>
+				<td style="border-bottom-style:dotted;border-bottom-color:#cccccc;border-bottom-width:1px;">
+					<i18n:text>
+						<xsl:attribute name="i18n:key">userManagement.userData_<xsl:value-of select="$item"/></xsl:attribute>
+					</i18n:text>:
+				</td>
+				
+				<xsl:copy-of select="td[2]"/>
+			</tr>
+		</xsl:if>
+	</xsl:for-each>
+
+</xsl:template>
+
+<xsl:template match="@*|node()" priority="-1">
+	<xsl:copy>
+		<xsl:apply-templates select="@*|node()" />
+	</xsl:copy>
+</xsl:template>
+
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/tool.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/tool.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/tool.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<tool name="userManagement.title" id="userManagement">
+	<functions>
+		<function name="userManagement.showUser" id="userMangementShow" pipeline="showUser"/>
+		<function name="userManagement.editUser" id="userMangementEdit" pipeline="editUser"/>
+		<function name="userManagement.addUser" id="userMangementAdd" pipeline="addUser"/>
+	</functions>
+	<i18n>
+		<catalogue id="userManagement" name="userManagement"/>
+	</i18n>
+</tool>
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/userImages/1.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/plugins/userManagement/userImages/1.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/portal-bottom.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/portal-bottom.xml?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/portal-bottom.xml	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<document> 
+  <header> 
+	 <title>Further Information</title>
+	 <version>0.1</version> 
+	 <type>Overview document</type> 
+  </header> 
+  <body> 
+	 <s1 title="Further Information"> 
+		<p>For further information have a look at the Cocoon documentation
+              and at the other portal demos available using the tab above.</p>
+   </s1> 
+
+  </body>
+</document>

Added: cocoon/trunk/src/blocks/portal/samples/tools/sitemap.xmap
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/sitemap.xmap?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/sitemap.xmap	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,126 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+  <map:components>
+    <map:transformers default="xslt">
+      <map:transformer name="tool-layout"
+                       src="org.apache.cocoon.portal.tools.transformation.PortalToolsLayoutTransformer" />
+	  <map:transformer name="i18n" 
+	                   src="org.apache.cocoon.portal.tools.transformation.PortalToolsI18nTransformer">
+        <catalogues default="portalTools" new="no">
+          <catalogue id="portalTools" name="portalTools" location="cocoon:/i18n"/>
+        </catalogues>
+        <cache-at-startup>true</cache-at-startup>
+      </map:transformer>
+    </map:transformers>
+    <map:generators default="file">
+	  <map:generator name="i18nc" src="org.apache.cocoon.portal.tools.generation.I18nCatalogueGenerator"/>
+    </map:generators>
+    <map:actions>
+    	<map:action name="check-access-action" src="org.apache.cocoon.portal.tools.acting.CheckAccessAction"/>
+    </map:actions>
+  </map:components>
+
+<!-- flow script -->
+  <map:flow language="javascript">
+    <map:script src="flow.js" />
+  </map:flow>
+
+  <map:pipelines>
+
+<!-- select skin to use -->
+    <map:component-configurations>
+      <map:global-variables>
+		<base>http://localhost:8888/samples/blocks/portal/</base>
+      </map:global-variables>
+
+    </map:component-configurations>
+
+<!-- Now the accessible pipelines -->
+    <map:pipeline>
+		
+		<map:match pattern="">
+			<map:redirect-to uri="tools"/>
+		</map:match>
+
+		<map:match pattern="i18n/**">
+			<map:generate src="{1}" type="i18nc"/>
+			<map:serialize type="xml"/>
+		</map:match>
+		
+      <map:match pattern="*.continue">
+        <map:call continuation="{1}" />
+      </map:match>
+
+      <map:match pattern="*.jx">
+        <map:generate type="jx" src="main/{1}.jx">
+          <map:parameter name="lenient-xpath" value="false" />
+        </map:generate>
+        <map:transform type="tool-layout"></map:transform>
+        <map:transform type="i18n"/>
+        <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
+        <map:transform src="skins/{portal-skin:skin}/styles/function.xsl" />
+        <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
+			<map:parameter name="base" value="{global:base}"/>
+        </map:transform>
+        <map:serialize type="html"></map:serialize>
+      </map:match>
+
+      <map:match pattern="*/*.jx">
+        <map:generate type="jx" src="main/{2}.jx">
+          <map:parameter name="lenient-xpath" value="false" />
+        </map:generate>
+        <map:transform type="tool-layout">
+          <map:parameter name="selected" value="{1}" />
+        </map:transform>
+        <map:transform type="i18n"></map:transform>
+        <map:transform src="{portal-skin:skin.basepath}/styles/tab.xsl" />
+        <map:transform src="skins/{portal-skin:skin}/styles/function.xsl" />
+        <map:transform src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
+			<map:parameter name="base" value="{global:base}"/>
+        </map:transform>
+        <map:serialize type="html"></map:serialize>
+      </map:match>
+
+      <map:match pattern="*">
+        <map:call function="{1}"></map:call>
+      </map:match>
+
+      <map:match pattern="functions/*">
+        <map:call function="functions">
+          <map:parameter name="name" value="{1}" />
+        </map:call>
+      </map:match>
+
+<!-- mount sub-sitemaps -->
+      <map:match pattern="plugins/*/**">
+     	 <map:act type="auth-protect">
+            <map:parameter name="handler" value="portal-handler"/> 
+            <map:parameter name="application" value="portal"/> 
+	      	<map:act type="check-access-action">
+	    		<map:parameter name="name" value="{ID}"/>
+	    		<map:parameter name="role" value="{role}"/>
+	    		<map:parameter name="url" value="{../1}/{../2}"/>
+      		        <map:mount uri-prefix="plugins/{../../1}" check-reload="yes" src="plugins/{../../1}/sitemap.xmap"/>
+			</map:act>
+		</map:act>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>
+<!-- end of file -->
\ No newline at end of file

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addCol.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addCol.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addCoplet.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addCoplet.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addRow.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addRow.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addTab.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/addTab.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/del.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/del.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/down.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/down.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/drillDown.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/drillDown.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/edit.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/edit.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/goUp.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/goUp.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/left.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/left.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/right.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/right.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/tabs.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/tabs.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/tools.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/tools.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/up.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/images/up.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/styles/function.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/styles/function.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/styles/function.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+
+<!-- Process a tab  -->
+<xsl:template match="tool-functions">
+				<table style="height: 1.8em" border="0" cellpadding="0" cellspacing="0" width="100%" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+					<tr>
+						<td valign="middle" bgcolor="#cccccc" >
+							<div class="tab">
+								<xsl:for-each select="function">
+								 | <a href="{@parameter}" style=" font-size : 85%; border: 0; color: #000000;">
+									<xsl:value-of select="@name"/>
+								</a>
+								</xsl:for-each>
+							</div>
+						</td>
+					</tr>
+				</table>
+
+</xsl:template>
+
+<!-- Copy all and apply templates -->
+
+<xsl:template match="@*|node()">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()" />
+  </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/styles/showTab.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/styles/showTab.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/skins/basic/styles/showTab.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,568 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+								xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+	<!-- id of the current item -->
+	<xsl:param name="current"/>
+	<xsl:param name="currentSkin"/>
+	
+	<xsl:variable name="skin">
+		<xsl:value-of select="$currentSkin"/>
+		<!--xsl:call-template name="getSkin">
+			<xsl:with-param name="skin4search"><xsl:value-of select="substring($currentSkin,0,string-length($currentSkin))"/></xsl:with-param>
+		</xsl:call-template-->
+	</xsl:variable>
+	
+	<xsl:template name="getSkin">
+		<xsl:param name="skin4search"/>
+		
+		<xsl:choose>
+			<xsl:when test="contains($skin4search,'/')">
+				<xsl:call-template name="getSkin">
+					<xsl:with-param name="skin4search"><xsl:value-of select="substring-after($skin4search,'/')"/></xsl:with-param>
+				</xsl:call-template>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:value-of select="$skin4search"/>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+	
+	
+	<!-- root -->
+	<xsl:template match="/">
+		<div>
+			<xsl:apply-templates/>
+			<br/>
+		<table>
+			<tr>
+				<td><i><i18n:text key="copletManagement.actions.title"/>:</i></td>
+				<td></td>				
+				<td></td>
+				<td></td>
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/left.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveLeft"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/right.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveRight"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/up.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveUp"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/down.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveDown"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/del.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.removeItem"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addTab.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addTab"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCol.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addCol"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addRow.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addRow"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCoplet.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addCoplet"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/drillDown.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.drillDown"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.goUp"/></td>				
+				<td></td>
+				<td></td>
+			</tr>
+		</table>		</div>
+	</xsl:template>
+	
+	<xsl:template match="named-item">
+		<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#292c63">
+		  <tr>
+		    <td bgcolor="#292c63">
+				<div align="left">
+					<xsl:if test="@parent">
+						<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+							<img border="0">
+								<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+							</img>
+						</a>
+					</xsl:if>
+					<font color="#ffffff"><i18n:text key="copletManagement.items.tab"/>: <xsl:value-of select="@name"/></font>
+				</div>
+			</td>
+		    <td bgcolor="#292c63">
+				<div align="right">
+					<xsl:if test="count(child::*) = 0">
+						<xsl:call-template name="drawToolActions">
+							<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+							<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+							<xsl:with-param name="forceAddButtons">true</xsl:with-param>
+							<xsl:with-param name="forceAddTabButton">true</xsl:with-param>
+						</xsl:call-template>
+					</xsl:if>
+				</div>
+			</td>
+		  </tr>
+		  <tr>
+		    <td colspan="2">
+				<xsl:apply-templates/>
+			</td>
+		  </tr>
+		</table>
+	</xsl:template>
+	
+	<xsl:template match="composite-layout">
+		
+		<!-- column -->
+		<xsl:if test="@name = 'column'">
+			<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#386c84">
+			  <tr>
+				<td bgcolor="#386c84">
+					<div align="left">
+						<xsl:if test="@parent">
+							<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+								<img border="0">
+									<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+								</img>
+							</a>
+						</xsl:if>
+						<font color="#ffffff"><i18n:text key="copletManagement.items.col"/></font>
+					</div>
+				</td>
+				<td bgcolor="#386c84">
+					<div align="right">
+						<xsl:call-template name="drawToolActions">
+							<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+							<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+							<xsl:with-param name="forceDeleteButton">true</xsl:with-param>
+							<xsl:with-param name="forceAddButtons">true</xsl:with-param>
+							<xsl:with-param name="forceAddTabButton">true</xsl:with-param>
+							<xsl:with-param name="forceDrillDownButton">true</xsl:with-param>
+						</xsl:call-template>
+					</div>
+				</td>
+			  </tr>
+			  <tr>
+				<td colspan="2">
+					<table>
+						<tr>
+							<xsl:for-each select="item">
+								<td>
+									<xsl:apply-templates/> 
+								</td>
+							</xsl:for-each>
+						</tr>
+					</table>
+				</td>
+			  </tr>
+			</table>	
+		</xsl:if>
+		
+		<!-- row -->
+		<xsl:if test="@name = 'row'">
+			<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#295163">
+			  <tr>
+				<td bgcolor="#295163">
+					<div align="left">
+						<xsl:if test="@parent">
+							<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+								<img border="0">
+									<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+								</img>
+							</a>
+						</xsl:if>
+						<font color="#ffffff"><i18n:text key="copletManagement.items.row"/></font>
+					</div>
+				</td>
+				<td bgcolor="#295163">
+					<div align="right">
+						<xsl:call-template name="drawToolActions">
+							<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+							<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+							<xsl:with-param name="forceDeleteButton">true</xsl:with-param>
+							<xsl:with-param name="forceAddButtons">true</xsl:with-param>
+							<xsl:with-param name="forceAddTabButton">true</xsl:with-param>
+							<xsl:with-param name="forceDrillDownButton">true</xsl:with-param>
+						</xsl:call-template>
+					</div>
+				</td>
+			  </tr>
+			  <tr>
+				<td colspan="2">
+					<xsl:for-each select="item">
+						<xsl:apply-templates/> 
+					</xsl:for-each>
+				</td>
+			  </tr>
+			</table>
+		</xsl:if>
+		
+		<!-- tab -->
+		<xsl:if test="contains(@name,'tab')">
+			<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#3a3fa6">
+			  <tr>
+				<td bgcolor="#3a3fa6">
+					<div align="left">
+						<xsl:if test="@parent">
+							<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+								<img border="0">
+									<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+								</img>
+							</a>
+						</xsl:if>
+						<font color="#ffffff"><i18n:text key="copletManagement.items.tabFolder"/></font>
+					</div>
+				</td>
+				<td bgcolor="#3a3fa6">
+					<div align="right">
+						<xsl:call-template name="drawToolActions">
+							<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+							<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+							<xsl:with-param name="forceDeleteButton">false</xsl:with-param>
+							<xsl:with-param name="forceAddTabButton">true</xsl:with-param>
+						</xsl:call-template>
+					</div>
+				</td>
+			  </tr>
+			  <tr>
+				<td colspan="2">
+					<table>
+						<tr>
+							<xsl:for-each select="named-item">
+								<td>
+									<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#292c63">
+									  <tr>
+										<td bgcolor="#292c63">
+											<div align="left">
+												<xsl:if test="@parent">
+													<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+														<img border="0">
+															<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+														</img>
+													</a>
+												</xsl:if>	
+												<font color="#ffffff"><i18n:text key="copletManagement.items.tab"/>: <xsl:value-of select="@name"/></font>
+											</div>
+										</td>
+										<td bgcolor="#292c63">
+											<div align="right">
+												<xsl:call-template name="drawToolActions">
+													<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+													<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+													<xsl:with-param name="forceMoveButtons">true</xsl:with-param>
+													<xsl:with-param name="forceDeleteButton">true</xsl:with-param>
+													<xsl:with-param name="forceDrillDownButton">true</xsl:with-param>
+												</xsl:call-template>
+											</div>
+										</td>
+									  </tr>
+									  <tr>
+										<td colspan="2">
+											<xsl:value-of select="@name"/>
+										</td>
+									  </tr>
+									</table>				
+								</td>
+							</xsl:for-each>
+						</tr>
+					</table>
+				</td>
+			  </tr>
+			</table>
+		</xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="coplet-layout|frame-layout">
+		<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#4e95b6">
+		  <tr>
+			<td bgcolor="#4e95b6">
+				<div align="left">
+					<xsl:if test="@parent">
+						<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+							<img border="0">
+								<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+							</img>
+						</a>
+					</xsl:if>	
+					<font color="#ffffff"><i18n:text key="copletManagement.items.coplet"/></font>
+				</div>
+			</td>
+			<td bgcolor="#4e95b6">
+				<div align="right">
+					<xsl:call-template name="drawToolActions">
+						<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+						<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+						<xsl:with-param name="forceDeleteButton">true</xsl:with-param>
+						<xsl:with-param name="forceDrillDownButton">true</xsl:with-param>
+						<xsl:with-param name="forceEditCopletButton">true</xsl:with-param>
+					</xsl:call-template>
+				</div>
+			</td>
+		  </tr>
+		  <tr>
+			<td colspan="2">
+				<xsl:choose>
+					<xsl:when test="coplet-instance-data/.">
+						Coplet: <xsl:value-of select="coplet-instance-data/."/>
+ 					</xsl:when>
+ 					<xsl:otherwise>
+ 						Coplet				
+					</xsl:otherwise>
+				</xsl:choose>
+			</td>
+		  </tr>
+		</table>	
+	</xsl:template>
+	
+
+	<xsl:template match="help" mode="foo">
+		<a href="tools/plugins/copletManagement/showTab?action=save">Save</a> - <a href="tools/plugins/copletManagement/showTab?action=restore">Restore</a>
+		<table>
+			<tr>
+				<td><i18n:text key="copletManagement.actions.title"/></td>
+				<td></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/left.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveLeft"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/right.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveRight"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/up.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveUp"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/down.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveDown"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/del.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.removeItem"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addTab.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addTab"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCol.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addCol"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addRow.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addRow"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCoplet.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addCoplet"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/drillDown.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.drillDown"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.goUp"/></td>				
+			</tr>
+		</table>
+	</xsl:template>
+
+	<xsl:template match="@*|node()">
+		<xsl:copy>
+			<xsl:apply-templates select="@*|node()" />
+		</xsl:copy>
+	</xsl:template>
+	
+	<xsl:template name="drawToolActions">
+		<xsl:param name="id"/>
+		<xsl:param name="actionitem"/>
+		<xsl:param name="forceMoveButtons"/>
+		<xsl:param name="forceDeleteButton"/>
+		<xsl:param name="forceAddTabButton"/>
+		<xsl:param name="forceAddButtons"/>
+		<xsl:param name="forceDrillDownButton"/>
+		<xsl:param name="forceEditCopletButton"/>
+		
+		<xsl:if test="$forceEditCopletButton = 'true'">
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/editCoplet?actionitem=<xsl:value-of select="$actionitem"/>&amp;id=<xsl:value-of select="$id"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/edit.jpg</xsl:attribute>
+				</img>
+			</a>
+		</xsl:if>
+		
+		<xsl:if test="$forceDeleteButton = 'true'">
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=del&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/del.jpg</xsl:attribute>
+				</img>
+			</a>
+		</xsl:if>
+		
+		<xsl:if test="count(../../node()) > 1 or $forceMoveButtons = 'true'">
+		<xsl:choose>
+			<xsl:when test="(../../@name) = 'row'">
+				<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=up&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/up.jpg</xsl:attribute>
+					</img>
+				</a>
+				<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=down&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/down.jpg</xsl:attribute>
+					</img>
+				</a>
+			</xsl:when>
+			<xsl:otherwise>
+				<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=up&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/left.jpg</xsl:attribute>
+					</img>
+				</a>
+				<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=down&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/right.jpg</xsl:attribute>
+					</img>
+				</a>
+			</xsl:otherwise>
+		</xsl:choose>
+		</xsl:if>
+		
+		<xsl:if test="$forceAddTabButton = 'true'">
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=addTab&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addTab.jpg</xsl:attribute>
+				</img>
+			</a>
+		</xsl:if>
+		
+		<xsl:if test="$forceAddButtons = 'true'">
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=addRow&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addRow.jpg</xsl:attribute>
+				</img>
+			</a>
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=addCol&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCol.jpg</xsl:attribute>
+				</img>
+			</a>
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=addCoplet&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCoplet.jpg</xsl:attribute>
+				</img>
+			</a>
+		</xsl:if>
+		
+		<xsl:if test="$forceDrillDownButton = 'true'">
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/drillDown.jpg</xsl:attribute>
+				</img>
+			</a>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/Thumbs.db
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/Thumbs.db?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addCol.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addCol.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addCoplet.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addCoplet.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addRow.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addRow.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addTab.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/addTab.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/del.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/del.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/down.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/down.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/drillDown.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/drillDown.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/edit.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/edit.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/goUp.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/goUp.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/left.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/left.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/right.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/right.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/tabs.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/tabs.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/tools.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/tools.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/up.jpg
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/images/up.jpg?view=auto&rev=148909
==============================================================================
Binary file. No diff available.

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/styles/function.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/styles/function.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/skins/common/styles/function.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+
+<!-- Process a tab  -->
+<xsl:template match="tool-functions">
+				<table style="height: 1.8em" border="0" cellpadding="0" cellspacing="0" width="100%" xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+					<tr>
+						<td valign="middle" bgcolor="#B2C4E0" >
+							<div class="tab">
+								<xsl:for-each select="function">
+								 | <a href="{@parameter}" style=" font-size : 85%; border: 0; color: #000066;">
+									<xsl:value-of select="@name"/>
+								</a>
+								</xsl:for-each>
+							</div>
+						</td>
+					</tr>
+				</table>
+
+</xsl:template>
+
+<!-- Copy all and apply templates -->
+
+<xsl:template match="@*|node()">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()" />
+  </xsl:copy>
+</xsl:template>
+
+</xsl:stylesheet>

Added: cocoon/trunk/src/blocks/portal/samples/tools/skins/common/styles/showTab.xsl
Url: http://svn.apache.org/viewcvs/cocoon/trunk/src/blocks/portal/samples/tools/skins/common/styles/showTab.xsl?view=auto&rev=148909
==============================================================================
--- (empty file)
+++ cocoon/trunk/src/blocks/portal/samples/tools/skins/common/styles/showTab.xsl	Fri Jan 28 09:54:58 2005
@@ -0,0 +1,574 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  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.
+-->
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+								xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+
+	<!-- id of the current item -->
+	<xsl:param name="current"/>
+	<xsl:param name="currentSkin"/>
+	
+	<xsl:variable name="skin">
+		<xsl:value-of select="$currentSkin"/>
+		<!--xsl:call-template name="getSkin">
+			<xsl:with-param name="skin4search"><xsl:value-of select="substring($currentSkin,0,string-length($currentSkin))"/></xsl:with-param>
+		</xsl:call-template-->
+	</xsl:variable>
+	
+	<xsl:template name="getSkin">
+		<xsl:param name="skin4search"/>
+		
+		<xsl:choose>
+			<xsl:when test="contains($skin4search,'/')">
+				<xsl:call-template name="getSkin">
+					<xsl:with-param name="skin4search"><xsl:value-of select="substring-after($skin4search,'/')"/></xsl:with-param>
+				</xsl:call-template>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:value-of select="$skin4search"/>
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+	
+	
+	<!-- root -->
+	<xsl:template match="/">
+		<div>
+			
+			<xsl:apply-templates/>
+			<br/>
+		<table>
+			<tr>
+				<td><i><i18n:text key="copletManagement.actions.title"/>:</i></td>
+				<td></td>				
+				<td></td>
+				<td></td>
+			</tr>
+			<tr>
+			<td>
+				<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$current"/>&amp;action=save</xsl:attribute>Save</a>
+			</td>
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/left.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveLeft"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/right.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveRight"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/up.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveUp"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/down.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveDown"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/del.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.removeItem"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addTab.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addTab"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCol.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addCol"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addRow.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addRow"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCoplet.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addCoplet"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/drillDown.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.drillDown"/></td>				
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.goUp"/></td>				
+				<td></td>
+				<td></td>
+			</tr>
+		</table>		</div>
+	</xsl:template>
+	
+	<xsl:template match="named-item">
+		<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#292c63">
+		  <tr>
+		    <td bgcolor="#292c63">
+				<div align="left">
+					<xsl:if test="@parent">
+						<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+							<img border="0">
+								<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+							</img>
+						</a>
+					</xsl:if>
+					<font color="#ffffff"><i18n:text key="copletManagement.items.tab"/>: <xsl:value-of select="@name"/></font>
+				</div>
+			</td>
+		    <td bgcolor="#292c63">
+				<div align="right">
+					<xsl:if test="count(child::*) = 0">
+						<xsl:call-template name="drawToolActions">
+							<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+							<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+							<xsl:with-param name="forceAddButtons">true</xsl:with-param>
+							<xsl:with-param name="forceAddTabButton">true</xsl:with-param>
+						</xsl:call-template>
+					</xsl:if>
+				</div>
+			</td>
+		  </tr>
+		  <tr>
+		    <td colspan="2">
+				<xsl:apply-templates/>
+			</td>
+		  </tr>
+		</table>
+	</xsl:template>
+	
+	<xsl:template match="composite-layout">
+		
+		<!-- column -->
+		<xsl:if test="@name = 'column'">
+			<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#386c84">
+			  <tr>
+				<td bgcolor="#386c84">
+					<div align="left">
+						<xsl:if test="@parent">
+							<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+								<img border="0">
+									<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+								</img>
+							</a>
+						</xsl:if>
+						<font color="#ffffff"><i18n:text key="copletManagement.items.col"/></font>
+					</div>
+				</td>
+				<td bgcolor="#386c84">
+					<div align="right">
+						<xsl:call-template name="drawToolActions">
+							<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+							<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+							<xsl:with-param name="forceDeleteButton">true</xsl:with-param>
+							<xsl:with-param name="forceAddButtons">true</xsl:with-param>
+							<xsl:with-param name="forceAddTabButton">true</xsl:with-param>
+							<xsl:with-param name="forceDrillDownButton">true</xsl:with-param>
+						</xsl:call-template>
+					</div>
+				</td>
+			  </tr>
+			  <tr>
+				<td colspan="2">
+					<table>
+						<tr>
+							<xsl:for-each select="item">
+								<td>
+									<xsl:apply-templates/> 
+								</td>
+							</xsl:for-each>
+						</tr>
+					</table>
+				</td>
+			  </tr>
+			</table>	
+		</xsl:if>
+		
+		<!-- row -->
+		<xsl:if test="@name = 'row'">
+			<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#295163">
+			  <tr>
+				<td bgcolor="#295163">
+					<div align="left">
+						<xsl:if test="@parent">
+							<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+								<img border="0">
+									<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+								</img>
+							</a>
+						</xsl:if>
+						<font color="#ffffff"><i18n:text key="copletManagement.items.row"/></font>
+					</div>
+				</td>
+				<td bgcolor="#295163">
+					<div align="right">
+						<xsl:call-template name="drawToolActions">
+							<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+							<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+							<xsl:with-param name="forceDeleteButton">true</xsl:with-param>
+							<xsl:with-param name="forceAddButtons">true</xsl:with-param>
+							<xsl:with-param name="forceAddTabButton">true</xsl:with-param>
+							<xsl:with-param name="forceDrillDownButton">true</xsl:with-param>
+						</xsl:call-template>
+					</div>
+				</td>
+			  </tr>
+			  <tr>
+				<td colspan="2">
+					<xsl:for-each select="item">
+						<xsl:apply-templates/> 
+					</xsl:for-each>
+				</td>
+			  </tr>
+			</table>
+		</xsl:if>
+		
+		<!-- tab -->
+		<xsl:if test="contains(@name,'tab')">
+			<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#3a3fa6">
+			  <tr>
+				<td bgcolor="#3a3fa6">
+					<div align="left">
+						<xsl:if test="@parent">
+							<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+								<img border="0">
+									<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+								</img>
+							</a>
+						</xsl:if>
+						<font color="#ffffff"><i18n:text key="copletManagement.items.tabFolder"/></font>
+					</div>
+				</td>
+				<td bgcolor="#3a3fa6">
+					<div align="right">
+						<xsl:call-template name="drawToolActions">
+							<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+							<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+							<xsl:with-param name="forceDeleteButton">false</xsl:with-param>
+							<xsl:with-param name="forceAddTabButton">true</xsl:with-param>
+						</xsl:call-template>
+					</div>
+				</td>
+			  </tr>
+			  <tr>
+				<td colspan="2">
+					<table>
+						<tr>
+							<xsl:for-each select="named-item">
+								<td>
+									<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#292c63">
+									  <tr>
+										<td bgcolor="#292c63">
+											<div align="left">
+												<xsl:if test="@parent">
+													<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+														<img border="0">
+															<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+														</img>
+													</a>
+												</xsl:if>	
+												<font color="#ffffff"><i18n:text key="copletManagement.items.tab"/>: <xsl:value-of select="@name"/></font>
+											</div>
+										</td>
+										<td bgcolor="#292c63">
+											<div align="right">
+												<xsl:call-template name="drawToolActions">
+													<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+													<xsl:with-param name="actionitem"><xsl:value-of select="@id"/></xsl:with-param>
+													<xsl:with-param name="forceMoveButtons">true</xsl:with-param>
+													<xsl:with-param name="forceDeleteButton">true</xsl:with-param>
+													<xsl:with-param name="forceDrillDownButton">true</xsl:with-param>
+												</xsl:call-template>
+											</div>
+										</td>
+									  </tr>
+									  <tr>
+										<td colspan="2">
+											<xsl:value-of select="@name"/>
+										</td>
+									  </tr>
+									</table>				
+								</td>
+							</xsl:for-each>
+						</tr>
+					</table>
+				</td>
+			  </tr>
+			</table>
+		</xsl:if>
+	</xsl:template>
+	
+	<xsl:template match="coplet-layout|frame-layout">
+		<table style="border-width:1px; border-style:solid; border-color:#292c63; spacing:3px; padding:5px;" border="0" cellpadding="3" cellspacing="0" bordercolor="#4e95b6">
+		  <tr>
+			<td bgcolor="#4e95b6">
+				<div align="left">
+					<xsl:if test="@parent">
+						<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="@parent"/></xsl:attribute>
+							<img border="0">
+								<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+							</img>
+						</a>
+					</xsl:if>	
+					<font color="#ffffff"><i18n:text key="copletManagement.items.coplet"/></font>
+				</div>
+			</td>
+			<td bgcolor="#4e95b6">
+				<div align="right">
+					<xsl:call-template name="drawToolActions">
+						<xsl:with-param name="id"><xsl:value-of select="$current"/></xsl:with-param>
+						<xsl:with-param name="actionitem"><xsl:value-of select="substring(coplet-instance-data/@id, 0, string-length(coplet-instance-data/@id)-1)"/></xsl:with-param>
+						<xsl:with-param name="forceDeleteButton">true</xsl:with-param>
+						<xsl:with-param name="forceDrillDownButton">true</xsl:with-param>
+						<xsl:with-param name="forceEditCopletButton">true</xsl:with-param>
+					</xsl:call-template>
+				</div>
+			</td>
+		  </tr>
+		  <tr>
+			<td colspan="2">
+				<xsl:choose>
+					<xsl:when test="coplet-instance-data/.">
+						Coplet: <xsl:value-of select="coplet-instance-data/."/>
+ 					</xsl:when>
+ 					<xsl:otherwise>
+ 						Coplet				
+					</xsl:otherwise>
+				</xsl:choose>
+			</td>
+		  </tr>
+		</table>	
+	</xsl:template>
+	
+
+	<xsl:template match="help" mode="foo">
+		<a href="tools/plugins/copletManagement/showTab?action=save">Save</a> - <a href="tools/plugins/copletManagement/showTab?action=restore">Restore</a>
+		<table>
+			<tr>
+				<td><i18n:text key="copletManagement.actions.title"/></td>
+				<td></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/left.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveLeft"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/right.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveRight"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/up.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveUp"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/down.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.moveDown"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/del.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.removeItem"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addTab.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addTab"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCol.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addCol"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addRow.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addRow"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCoplet.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.addCoplet"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/drillDown.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.drillDown"/></td>				
+			</tr>
+			<tr>
+				<td>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/goUp.jpg</xsl:attribute>
+					</img>
+				</td>
+				<td><i18n:text key="copletManagement.actions.goUp"/></td>				
+			</tr>
+		</table>
+	</xsl:template>
+
+	<xsl:template match="@*|node()">
+		<xsl:copy>
+			<xsl:apply-templates select="@*|node()" />
+		</xsl:copy>
+	</xsl:template>
+	
+	<xsl:template name="drawToolActions">
+		<xsl:param name="id"/>
+		<xsl:param name="actionitem"/>
+		<xsl:param name="forceMoveButtons"/>
+		<xsl:param name="forceDeleteButton"/>
+		<xsl:param name="forceAddTabButton"/>
+		<xsl:param name="forceAddButtons"/>
+		<xsl:param name="forceDrillDownButton"/>
+		<xsl:param name="forceEditCopletButton"/>
+		
+		<xsl:if test="$forceEditCopletButton = 'true'">
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/editCoplet?actionitem=<xsl:value-of select="$actionitem"/>&amp;id=<xsl:value-of select="$id"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/edit.jpg</xsl:attribute>
+				</img>
+			</a>
+		</xsl:if>
+		
+		<xsl:if test="$forceDeleteButton = 'true'">
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=del&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/del.jpg</xsl:attribute>
+				</img>
+			</a>
+		</xsl:if>
+		
+		<xsl:if test="count(../../node()) > 1 or $forceMoveButtons = 'true'">
+		<xsl:choose>
+			<xsl:when test="(../../@name) = 'row'">
+				<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=up&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/up.jpg</xsl:attribute>
+					</img>
+				</a>
+				<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=down&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/down.jpg</xsl:attribute>
+					</img>
+				</a>
+			</xsl:when>
+			<xsl:otherwise>
+				<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=up&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/left.jpg</xsl:attribute>
+					</img>
+				</a>
+				<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=down&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+					<img border="0">
+						<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/right.jpg</xsl:attribute>
+					</img>
+				</a>
+			</xsl:otherwise>
+		</xsl:choose>
+		</xsl:if>
+		
+		<xsl:if test="$forceAddTabButton = 'true'">
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=addTab&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addTab.jpg</xsl:attribute>
+				</img>
+			</a>
+		</xsl:if>
+		
+		<xsl:if test="$forceAddButtons = 'true'">
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=addRow&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addRow.jpg</xsl:attribute>
+				</img>
+			</a>
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=addCol&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCol.jpg</xsl:attribute>
+				</img>
+			</a>
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$id"/>&amp;action=addCoplet&amp;actionitem=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/addCoplet.jpg</xsl:attribute>
+				</img>
+			</a>
+		</xsl:if>
+		
+		<xsl:if test="$forceDrillDownButton = 'true'">
+			<a><xsl:attribute name="href">tools/plugins/copletManagement/showTab?id=<xsl:value-of select="$actionitem"/></xsl:attribute>
+				<img border="0">
+					<xsl:attribute name="src">toolImages/<xsl:value-of select="$skin"/>/drillDown.jpg</xsl:attribute>
+				</img>
+			</a>
+		</xsl:if>
+	</xsl:template>
+
+</xsl:stylesheet>

Modified: cocoon/trunk/status.xml
Url: http://svn.apache.org/viewcvs/cocoon/trunk/status.xml?view=diff&rev=148909&p1=cocoon/trunk/status.xml&r1=148908&p2=cocoon/trunk/status.xml&r2=148909
==============================================================================
--- cocoon/trunk/status.xml	(original)
+++ cocoon/trunk/status.xml	Fri Jan 28 09:54:58 2005
@@ -457,6 +457,9 @@
    </action>
  </release>
  <release version="2.1.7" date="TBD">
+   <action dev="CZ" type="add" fixes-bug="33287" due-to="Jens Maukisch" due-to-email="jmaukisch@s-und-n.de">
+     Portal Block: Add portal tools framework contribution.
+   </action>
    <action dev="CZ" type="add">
      Build system: External blocks can be built together with Cocoon.
    </action>

Mime
View raw message