Author: jonesde
Date: Thu Jul 17 10:37:02 2008 New Revision: 677645 URL: http://svn.apache.org/viewvc?rev=677645&view=rev Log: A few little cleanups, moved the ftl demo files to the database and simplified the controller file quite a bit Removed: ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/DemoFooter.ftl ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/DemoHeader.ftl ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/DemoHome.ftl Modified: ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/controller.xml Modified: ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml?rev=677645&r1=677644&r2=677645&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml (original) +++ ofbiz/trunk/specialpurpose/cmssite/data/CmsSiteDemoData.xml Thu Jul 17 10:37:02 2008 @@ -33,13 +33,27 @@ <Content contentId="CMSS_HHEAD" contentTypeId="DOCUMENT" contentName="CMS Site HTML Head" dataResourceId="CMSS_HTML_HEAD"/> <ContentPurpose contentId="CMSS_HHEAD" contentPurposeTypeId="SECTION"/> - <DataResource dataResourceId="CMSS_DEMO_HEADER" dataResourceTypeId="URL_RESOURCE" dataTemplateTypeId="FTL" - objectInfo="component://cmssite/webapp/cmssite/DemoHeader.ftl"/> + <DataResource dataResourceId="CMSS_DEMO_HEADER" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/> + <ElectronicText dataResourceId="CMSS_DEMO_HEADER"> + <textData><![CDATA[ + <div id="header"> + <div>This is the header!</div> + <hr/> + </div> + ]]></textData> + </ElectronicText> <Content contentId="CMSS_DEMO_HEADER" contentTypeId="DOCUMENT" contentName="CMS Site Demo Header" dataResourceId="CMSS_DEMO_HEADER"/> <ContentPurpose contentId="CMSS_DEMO_HEADER" contentPurposeTypeId="SECTION"/> - <DataResource dataResourceId="CMSS_DEMO_FOOTER" dataResourceTypeId="URL_RESOURCE" dataTemplateTypeId="FTL" - objectInfo="component://cmssite/webapp/cmssite/DemoFooter.ftl"/> + <DataResource dataResourceId="CMSS_DEMO_FOOTER" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/> + <ElectronicText dataResourceId="CMSS_DEMO_FOOTER"> + <textData><![CDATA[ + <div id="footer"> + <hr/> + <div>This is the footer!</div> + </div> + ]]></textData> + </ElectronicText> <Content contentId="CMSS_DEMO_FOOTER" contentTypeId="DOCUMENT" contentName="CMS Site Demo Footer" dataResourceId="CMSS_DEMO_FOOTER"/> <ContentPurpose contentId="CMSS_DEMO_FOOTER" contentPurposeTypeId="SECTION"/> @@ -48,8 +62,16 @@ <ContentAssoc contentId="CMSS_DEC" contentIdTo="CMSS_DEMO_FOOTER" contentAssocTypeId="SUB_CONTENT" mapKey="footer" fromDate="2001-01-01 00:00:00"/> <!-- demo home page --> - <DataResource dataResourceId="CMSS_DEMO_HOME" dataResourceTypeId="URL_RESOURCE" dataTemplateTypeId="FTL" - objectInfo="component://cmssite/webapp/cmssite/DemoHome.ftl"/> + <DataResource dataResourceId="CMSS_DEMO_HOME" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL"/> + <ElectronicText dataResourceId="CMSS_DEMO_HOME"> + <textData><![CDATA[ + <div> + <h1>Welcome to the Home page.</h1> + <div><a href="/cmssite/cms/CMSS_DEMO_PAGE1">Demo Page 1 - Hard Coded Link</a></div> + <div><a href="${thisContent.content.CMSS_DEMO_PAGE1.link}">Demo Page 1 - Dynamic Link</a></div> + </div> + ]]></textData> + </ElectronicText> <Content contentId="CMSS_DEMO_HOME" contentTypeId="DOCUMENT" decoratorContentId="CMSS_DEC" contentName="CMS Site Demo Home Page" dataResourceId="CMSS_DEMO_HOME"/> <ContentPurpose contentId="CMSS_DEMO_HOME" contentPurposeTypeId="SECTION"/> Modified: ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/controller.xml?rev=677645&r1=677644&r2=677645&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/cmssite/webapp/cmssite/WEB-INF/controller.xml Thu Jul 17 10:37:02 2008 @@ -20,21 +20,9 @@ <site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd"> + <include location="component://common/webcommon/WEB-INF/common-controller.xml"/> + <description>OFBiz: CMS Site Controller Configuration File</description> - <owner>Copyright 2007-2007 The Apache Software Foundation</owner> - <errorpage>/error/error.jsp</errorpage> - - <handler name="java" type="request" class="org.ofbiz.webapp.event.JavaEventHandler"/> - <handler name="soap" type="request" class="org.ofbiz.webapp.event.SOAPEventHandler"/> - <handler name="service" type="request" class="org.ofbiz.webapp.event.ServiceEventHandler"/> - <handler name="service-multi" type="request" class="org.ofbiz.webapp.event.ServiceMultiEventHandler"/> - <handler name="simple" type="request" class="org.ofbiz.webapp.event.SimpleEventHandler"/> - <handler name="rome" type="request" class="org.ofbiz.webapp.event.RomeEventHandler"/> - - <handler name="jsp" type="view" class="org.ofbiz.webapp.view.JspViewHandler"/> - <handler name="http" type="view" class="org.ofbiz.webapp.view.HttpViewHandler"/> - <handler name="screen" type="view" class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/> - <handler name="simplecontent" type="view" class="org.ofbiz.content.view.SimpleContentViewHandler"/> <!-- Events run from here for the first hit in a visit --> <firstvisit> @@ -45,59 +33,17 @@ <!-- Events to run on every request before security (chains exempt) --> <preprocessor> <!-- This event allows affilate/distributor entry on any page --> - <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="checkExternalLoginKey"/> <event type="java" path="org.ofbiz.marketing.tracking.TrackingCodeEvents" invoke="checkTrackingCodeUrlParam"/> <event type="java" path="org.ofbiz.marketing.tracking.TrackingCodeEvents" invoke="checkPartnerTrackingCodeUrlParam"/> </preprocessor> - <!-- Events to run on every request after all other processing (chains exempt) --> - <!-- - <postprocessor> - <event type="java" path="org.ofbiz.webapp.event.TestEvent" invoke="test"/> - </postprocessor> - --> - - <after-login> - </after-login> - <!-- default request; call into CMS --> <default-request request-uri="cms"/> - <!-- Security Mappings --> - <request-map uri="checkLogin" edit="false"> - <description>Verify a user is logged in.</description> - <security https="true" auth="false"/> - <event type="java" path="org.ofbiz.securityext.login.LoginEvents" invoke="storeCheckLogin"/> - <response name="success" type="view" value="main"/> - <response name="error" type="view" value="login"/> - </request-map> - <request-map uri="login"> - <security https="true" auth="false"/> - <event type="java" path="org.ofbiz.securityext.login.LoginEvents" invoke="storeLogin"/> - <response name="success" type="view" value="main"/> - <response name="requirePasswordChange" type="view" value="login"/> - <response name="error" type="view" value="login"/> - </request-map> - <request-map uri="logout"> - <security https="true" auth="true"/> - <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="logout"/> - <response name="success" type="request" value="checkLogin"/> - <response name="error" type="view" value="main"/> - </request-map> - <request-map uri="autoLogout"> - <security https="true" auth="false"/> - <event type="java" path="org.ofbiz.webapp.control.LoginWorker" invoke="autoLoginRemove"/> - <response name="success" type="request" value="checkLogin"/> - <response name="error" type="view" value="main"/> - </request-map> - <!-- End of Security Mappings --> - <!-- Request Mappings --> <request-map uri="main"> <security https="false" auth="false"/> - <event type="java" path="org.ofbiz.content.cms.CmsEvents" invoke="cms"/> - <response name="success" type="none"/> - <response name="error" type="view" value="error"/> + <response name="success" type="request" value="cms"/> </request-map> <request-map uri="cms"> <security https="false" auth="false"/> @@ -105,16 +51,8 @@ <response name="success" type="none"/> <response name="error" type="view" value="error"/> </request-map> - <request-map uri="verifyEmailAddress"> - <security https="false" auth="false"/> - <event type="service" invoke="verifyEmailAddress"/> - <response name="success" type="none"/> - <response name="error" type="view" value="error"/> - </request-map> <!-- End of Request Mappings --> <!-- View Mappings --> - <view-map name="error" page="/error/error.jsp"/> - <view-map name="login" type="screen" page="component://common/widget/CommonScreens.xml#login"/> <!-- End of View Mappings --> </site-conf> |
Free forum by Nabble | Edit this page |