Changeset 1767
- Timestamp:
- 10/10/08 19:15:19 (3 months ago)
- Files:
-
- coldbox/trunk/samples/applications/SimpleBlog/install (added)
- coldbox/trunk/samples/applications/SimpleBlog/install/MSSQL.sql (added)
- coldbox/trunk/samples/applications/SimpleBlog/install/MySQL.sql (added)
- coldbox/trunk/samples/applications/SimpleBlog/install/readme.txt (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/coldbox.xml.cfm (modified) (7 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/datasource.xml.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/definitions/posts.comment$CECD40B75B7C44D4E37961DEFA07C0D0.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/definitions/posts.comment$DD0E546C15512852DA2752636C2A5FEA.transfer (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/definitions/posts.entry$E234F3A88153AD778DBA0B99FB3927C1.transfer (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/definitions/posts.entry$EDDC9D4CB655B5B66A17BA05F162FF79.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/routes.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/transfer.xml.cfm (modified) (2 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/handlers/general.cfc (modified) (3 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/handlers/main.cfc (modified) (2 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/handlers/place your handlers here.txt (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/handlers/tests (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/includes/generic_error.cfm (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/interceptors (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/logs/Use for coldbox logging.txt (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/model (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/plugins (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/views/about.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/views/footer.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/.amateras (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/Application.cfc (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/coldbox.xml.cfm (modified) (9 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/datasource.xml.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.comment$CECD40B75B7C44D4E37961DEFA07C0D0.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.comment$DD0E546C15512852DA2752636C2A5FEA.transfer (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.entry$269F334835FB86B20680C1BBF09490DD.transfer (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.entry$31A660C7128A12940C743CFE4CE40391.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.entry$4059B955F1745200505582274E3C9572.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.entry$550E9F7E626E10CD17BB8F80F6E6735B.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.entry$8CBAE43D26763C14BBE005E5EB2AD255.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.entry$EDDC9D4CB655B5B66A17BA05F162FF79.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.entry$EEFB0D408A4204A4918C4A5080B224D7.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.entry@269F334835FB86B20680C1BBF09490DD.transfer (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.entry@4059B955F1745200505582274E3C9572.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/definitions/posts.entry@EEFB0D408A4204A4918C4A5080B224D7.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/routes.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/transfer.xml.cfm (modified) (2 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/handlers/general.cfc (modified) (2 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/handlers/main.cfc (modified) (3 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/handlers/place your handlers here.txt (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/handlers/tests (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/includes/generic_error.cfm (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/interceptors (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/logs/Use for coldbox logging.txt (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/model/entries/Entry.cfc (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/model/entries/EntryService.cfc (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/plugins (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/views/about.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/views/footer.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/.amateras (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/Application.cfc (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/coldbox.xml.cfm (modified) (8 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/datasource.xml.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.comment$CECD40B75B7C44D4E37961DEFA07C0D0.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.comment$DD0E546C15512852DA2752636C2A5FEA.transfer (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.entry$31A660C7128A12940C743CFE4CE40391.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.entry$54834C43D3DED87286DFE6AAFFE707A3.transfer (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.entry$550E9F7E626E10CD17BB8F80F6E6735B.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.entry$8CBAE43D26763C14BBE005E5EB2AD255.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.entry$C0E476345993607BC2D2FC20323EBA42.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.entry$EDDC9D4CB655B5B66A17BA05F162FF79.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.entry$EEFB0D408A4204A4918C4A5080B224D7.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.entry@54834C43D3DED87286DFE6AAFFE707A3.transfer (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.entry@C0E476345993607BC2D2FC20323EBA42.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/definitions/posts.entry@EEFB0D408A4204A4918C4A5080B224D7.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/routes.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/config/transfer.xml.cfm (modified) (2 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/handlers/general.cfc (modified) (6 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/handlers/main.cfc (modified) (3 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/handlers/place your handlers here.txt (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/handlers/tests (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/interceptors (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/logs/Use for coldbox logging.txt (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/model/entries/Entry.cfc (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/model/entries/EntryService.cfc (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/model/rss/RSSService.cfc (modified) (3 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/plugins (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/views/about.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/views/blog.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_3/views/footer.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/.amateras (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/Application.cfc (modified) (2 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/config/coldbox.xml.cfm (modified) (8 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/config/definitions/posts.comment$DD0E546C15512852DA2752636C2A5FEA.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/config/definitions/posts.entry$1611A6201846C7489606BB1F415E81C8.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/config/definitions/posts.entry@1611A6201846C7489606BB1F415E81C8.transfer (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/config/definitions/users.user$D3EDB32B71036164BD2320E53E6CF6DD.transfer (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/config/routes.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/handlers/admin.cfc (modified) (5 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/handlers/general.cfc (modified) (3 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/handlers/main.cfc (modified) (2 diffs)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/handlers/place your handlers here.txt (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/handlers/tests (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/includes/ui.core.js (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/interceptors (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/layouts/Layout.Main.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/logs/Use for coldbox logging.txt (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/model/entries/Entry.cfc (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/plugins/custom plugins by convention here.txt (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/plugins/timer.cfc (deleted)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/views/about.cfm (added)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/views/footer.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/SimpleBlog/simple_blog_4/views/place your views here.txt (deleted)
- coldbox/trunk/system/frameworkSupertype.cfc (modified) (1 diff)
- coldbox/trunk/system/util/util.cfc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/coldbox.xml.cfm
r1763 r1767 41 41 <Setting name="RequestStartHandler" value="main.onRequestStart"/> 42 42 <!--Event Handler to run at end of all requests, leave blank if not used. Emulates the Application.cfc onRequestEnd method--> 43 <Setting name="RequestEndHandler" value=" main.onRequestEnd"/>43 <Setting name="RequestEndHandler" value=""/> 44 44 <!--Event Handler to run at the start of an application, leave blank if not used. Emulates the Application.cfc onApplicationStart method --> 45 45 <Setting name="ApplicationStartHandler" value="main.onAppInit"/> 46 46 <!--Event Handler to run at the start of a session, leave blank if not used.--> 47 <Setting name="SessionStartHandler" value=" main.onSessionStart"/>47 <Setting name="SessionStartHandler" value=""/> 48 48 <!--Event Handler to run at the end of a session, leave blank if not used.--> 49 <Setting name="SessionEndHandler" value=" main.onSessionEnd"/>49 <Setting name="SessionEndHandler" value=""/> 50 50 <!--The Email address from which all outgoing framework emails will be sent. --> 51 <Setting name="OwnerEmail" value=" hjoreteg@esri.com" />51 <Setting name="OwnerEmail" value="myemail@email.com" /> 52 52 <!-- Enable Bug Reports to be emailed out, set to true by default if left blank --> 53 53 <Setting name="EnableBugReports" value="false"/> … … 55 55 <Setting name="UDFLibraryFile" value="" /> 56 56 <!--The event handler to execute on all framework exceptions. Event Handler syntax required.--> 57 <Setting name="ExceptionHandler" value=" main.onException" />57 <Setting name="ExceptionHandler" value="" /> 58 58 <!--What event to fire when an invalid event is detected--> 59 59 <Setting name="onInvalidEvent" value="" /> 60 60 <!--Full path from the application's root to your custom error page, else leave blank. --> 61 <Setting name="CustomErrorTemplate" value=" includes/generic_error.cfm" />61 <Setting name="CustomErrorTemplate" value="" /> 62 62 <!--Messagebox Style (css) class name to use. Look at the messagebox.cfm in the includes directory--> 63 63 <Setting name="MessageboxStyleOverride" value="false" /> … … 129 129 maxPersistentRequestProfilers : Max records to keep in the profiler. Don't get gready. 130 130 maxRCPanelQueryRows : If a query is dumped in the RC panel, it will be truncated to this many rows.--> 131 131 <!-- 132 132 <DebuggerSettings> 133 133 <PersistentRequestProfiler>true</PersistentRequestProfiler> … … 140 140 <RCPanel show="true" expanded="true" /> 141 141 </DebuggerSettings> 142 142 --> 143 143 144 144 <!--Optional,if blank it will use the CFMX administrator settings.--> 145 <MailServerSettings> 146 <MailServer></MailServer> 147 <MailPort></MailPort> 148 <MailUsername></MailUsername> 149 <MailPassword></MailPassword> 150 </MailServerSettings> 145 <MailServerSettings /> 151 146 152 147 <!--Emails to Send bug reports, you can create as many as you like--> 153 <BugTracerReports> 154 155 </BugTracerReports> 148 <BugTracerReports /> 156 149 157 150 <!--List url dev environments, this determines your dev/pro environment for the framework--> 158 <DevEnvironments> 159 <url>localhost</url> 160 </DevEnvironments> 151 <DevEnvironments /> 161 152 162 153 <!--Webservice declarations your use in your application, if not use, leave blank … … 165 156 --> 166 157 <WebServices /> 158 167 159 <!--Declare Layouts for your application here--> 168 160 <Layouts> … … 191 183 192 184 <Datasources> 193 <Datasource alias="blogDSN" name=" blogengine" dbtype="mssql" username="" password="" />185 <Datasource alias="blogDSN" name="simpleblog" dbtype="mssql" username="" password="" /> 194 186 </Datasources> 195 196 187 197 188 <!--ColdBox Object Caching Settings Overrides the Framework-wide settings … … 225 216 226 217 <Interceptor class="coldbox.system.interceptors.autowire"> 218 <Property name="enableSetterInjection">false</Property> 227 219 </Interceptor> 228 220 coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/datasource.xml.cfm
r1763 r1767 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <datasource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 3 <name> blogengine</name>3 <name>simpleblog</name> 4 4 <username></username> 5 5 <password></password> coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/routes.cfm
r1763 r1767 59 59 ---> 60 60 61 <cfset setBaseURL("http://jorteg.esri.com/simple_blog/index.cfm/")> 62 61 <cfif len(getSetting("AppMapping")) lte 1> 62 <cfset setBaseURL("http://#cgi.HTTP_HOST#/index.cfm")> 63 <cfelse> 64 <cfset setBaseURL("http://#cgi.HTTP_HOST#/#getSetting('AppMapping')#/index.cfm")> 65 </cfif> 63 66 64 67 <!--- ------------------------------------------- coldbox/trunk/samples/applications/SimpleBlog/simple_blog/config/transfer.xml.cfm
r1763 r1767 7 7 8 8 <!--Entry--> 9 <object name="entry" table="entr y">9 <object name="entry" table="entries"> 10 10 <id name="entry_id" column="entry_id" type="UUID" generate="true" /> 11 11 <property name="title" type="string" /> … … 26 26 27 27 <!--Comment--> 28 <object name="comment" table="comment ">28 <object name="comment" table="comments"> 29 29 <id name="comment_id" column="comment_id" type="UUID" generate="true" /> 30 30 <property name="comment" type="string" /> coldbox/trunk/samples/applications/SimpleBlog/simple_blog/handlers/general.cfc
r1763 r1767 12 12 <cfcomponent name="general" extends="coldbox.system.eventhandler" output="false" autowire="true"> 13 13 14 <!--- Dependencies ---> 15 <cfproperty name="Transfer" type="ocm" scope="instance" /> 16 17 14 18 <!----------------------------------- CONSTRUCTOR ---------------------------------------> 15 16 <cfproperty name="Transfer" type="ocm" scope="instance" />17 19 18 20 <cffunction name="init" access="public" returntype="any" output="false" hint="constructor"> … … 29 31 <cffunction name="index" access="public" returntype="void" output="false"> 30 32 <cfargument name="Event" type="any"> 31 <cfset var rc = event.getCollection()>32 33 <!--- Do Your Logic Here to prepare a view --->34 33 <cfscript> 35 Event.setValue("welcomeMessage","Hello, Coldbox!"); 34 /* Welcome message */ 35 Event.setValue("welcomeMessage","Hello, welcome to Simple Blog!"); 36 /* Display View */ 37 Event.setView("home"); 36 38 </cfscript> 37 38 <!--- Set the View To Display, after Logic --->39 <cfset Event.setView("home")>40 41 39 </cffunction> 42 40 43 41 <!--- about ---> 44 42 <cffunction name="about" access="public" returntype="void" output="false" hint=""> 45 <cfargument name="Event" type=" coldbox.system.beans.requestContext" required="yes">43 <cfargument name="Event" type="any" required="yes"> 46 44 <cfset var rc = event.getCollection()> 47 48 <!--- Set the View To Display, after Logic ---> 45 <!--- Display View ---> 49 46 <cfset Event.setView("about")> 50 51 47 </cffunction> 52 48 53 49 <!--- blog ---> 54 <cffunction name="blog" access="public" returntype="void" output="false" hint="Displays the blog page" > 55 <cfargument name="Event" type="coldbox.system.beans.requestContext" required="yes"> 56 <cfset var rc = event.getCollection()> 57 50 <cffunction name="blog" access="public" returntype="void" output="false" hint="Displays the blog page" cache="true" cacheTimeout="10"> 51 <cfargument name="Event" type="any" required="yes"> 58 52 <cfscript> 59 rc.posts = instance.transfer.list("posts.entry","time", false); 60 53 var rc = event.getCollection(); 54 55 /* Get all Posts */ 56 rc.posts = instance.transfer.list("posts.entry","time", false); 57 /* Set View */ 61 58 Event.setView("blog"); 62 59 </cfscript> 63 64 60 </cffunction> 65 61 66 62 <!--- newPost ---> 67 63 <cffunction name="newPost" access="public" returntype="void" output="false" hint=""> 68 <cfargument name="Event" type=" coldbox.system.beans.requestContext" required="yes">64 <cfargument name="Event" type="any" required="yes"> 69 65 <cfset var rc = event.getCollection()> 70 66 71 <cfset Event.setView("newPost")> 72 67 <cfset Event.setView("newPost")> 73 68 </cffunction> 74 69 75 70 <!--- doNewPost ---> 76 71 <cffunction name="doNewPost" access="public" returntype="void" output="false" hint="Action to handle new post operation"> 77 <cfargument name="Event" type=" coldbox.system.beans.requestContext" required="yes">72 <cfargument name="Event" type="any" required="yes"> 78 73 <cfset var rc = event.getCollection()> 79 74 <cfset var newPost = ""> 80 81 75 <cfscript> 76 /* Get a new transfer entry object */ 82 77 newPost = instance.transfer.new("posts.entry"); 83 /*newPost.settitle(rc.title); 84 newPost.setpost(rc.post); 85 newPost.setauthor(rc.author); 86 */ 78 /* Populate the sucker */ 87 79 getPlugin("beanFactory").populateBean(newPost); 80 /* Save it */ 88 81 instance.transfer.save(newPost); 89 82 /* Clear event caching */ 90 83 getColdboxOcm().clearEvent("general.blog"); 91 92 setNextRoute("general/blog"); 93 84 /* Re-Route */ 85 setNextRoute("general/blog"); 94 86 </cfscript> 95 87 … … 97 89 98 90 <!--- viewPost ---> 99 <cffunction name="viewPost" access="public" returntype="void" output="false" hint="Shows one particular post and related comments" >100 <cfargument name="Event" type=" coldbox.system.beans.requestContext" required="yes">91 <cffunction name="viewPost" access="public" returntype="void" output="false" hint="Shows one particular post and related comments" cache="true" cacheTimeout="10" > 92 <cfargument name="Event" type="any" required="yes"> 101 93 <cfset var rc = event.getCollection()> 102 103 94 <cfscript> 95 /* Get Current incoming Post */ 104 96 rc.oPost = instance.transfer.get("posts.entry",rc.id); 97 /* Setup the comments */ 105 98 rc.comments = rc.oPost.getCommentArray(); 99 /* Setup the view */ 100 Event.setView('viewPost'); 106 101 </cfscript> 107 108 <cfset Event.setView('viewPost')>109 102 </cffunction> 110 103 111 104 <!--- doAddComment ---> 112 105 <cffunction name="doAddComment" access="public" returntype="void" output="false" hint="action that adds comment"> 113 <cfargument name="Event" type=" coldbox.system.beans.requestContext" required="yes">106 <cfargument name="Event" type="any" required="yes"> 114 107 <cfset var rc = event.getCollection()> 115 116 <cfscript> 108 <cfset var newComment = ""> 109 <cfscript> 110 /* get a New Comment */ 117 111 newComment = instance.transfer.new("posts.comment"); 112 /* Population */ 118 113 newComment.setComment(rc.commentField); 119 114 newComment.setParentEntry(instance.transfer.get("posts.entry", rc.id)); 115 /* Save it */ 120 116 instance.transfer.save(newComment); 121 117 /* Clear Events from cache */ 122 118 getColdboxOCM().clearEvent("general.viewPost","id=#rc.id#"); 123 119 /* Re route */ 124 120 setNextRoute("general/viewPost/" & rc.ID); 125 121 </cfscript> ` coldbox/trunk/samples/applications/SimpleBlog/simple_blog/handlers/main.cfc
r1763 r1767 27 27 28 28 <cffunction name="onAppInit" access="public" returntype="void" output="false"> 29 <cfargument name="Event" type=" coldbox.system.beans.requestContext">29 <cfargument name="Event" type="any"> 30 30 <!--- ON Application Start Here ---> 31 31 <!--- Create our Transfer Factory ---> … … 44 44 <cfset var rc = event.getCollection()> 45 45 46 <cfparam name="rc.pageTitle" default="Henrik's ColdBox App"> 47 48 <!--- On Request Start Code Here ---> 46 <cfset event.paramValue("pageTitle","Simple Blog")> 49 47 </cffunction> 50 48 51 <cffunction name="onRequestEnd" access="public" returntype="void" output="false">52 <cfargument name="Event" type="any">53 <!--- ON Request End Here --->54 </cffunction>55 56 <cffunction name="onSessionStart" access="public" returntype="void" output="false">57 <cfargument name="Event" type="any">58 <!--- ON session start Here --->59 </cffunction>60 61 <cffunction name="onSessionEnd" access="public" returntype="void" output="false">62 <cfargument name="Event" type="any">63 <!--- ON session End Here --->64 <cfset var sessionScope = event.getValue("sessionReference")>65 66 </cffunction>67 68 <cffunction name="onException" access="public" returntype="void" output="false">69 <cfargument name="Event" type="any">70 <!--- ON Exception Handler Here --->71 <cfscript>72 //Grab Exception From request collection, placed by ColdBox73 var exceptionBean = event.getValue("ExceptionBean");74 //Place exception handler below:75 76 </cfscript>77 </cffunction>78 79 80 49 </cfcomponent> coldbox/trunk/samples/applications/SimpleBlog/simple_blog/views/about.cfm
r1763 r1767 2 2 <div> 3 3 <h1>About this Site</h1> 4 <p>This site was created by Henrik as a way to teach himself how to use ColdBox and interract with a DB using an ORM. 4 <p>This site was created by Henrik as a way to teach himself how to use ColdBox and interract with a DB using an ORM.</p> 5 5 6 <p>In this case Transfer was used. 6 <p>In this case Transfer was used.</p> 7 8 <p>The entire suite of simple blog applications where revised by Luis Majano and Team ColdBox</p> 7 9 </div> 8 10 </cfoutput> coldbox/trunk/samples/applications/SimpleBlog/simple_blog/views/footer.cfm
r1763 r1767 1 <div class="copyright">© Henrik Joreteg <cfoutput>#year(now())#</cfoutput></div>1 <div class="copyright">© Henrik Joreteg & Luis Majano <cfoutput>#year(now())#</cfoutput></div> coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/Application.cfc
r1763 r1767 21 21 <cfset this.sessionTimeout = createTimeSpan(0,0,30,0)> 22 22 <cfset this.setClientCookies = true> 23 24 <!--- Mappings ---> 25 <cfset this.mappings["/simple_blog_2"] = getDirectoryFromPath(getCurrentTemplatePath())> 23 26 24 27 <!--- COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP ---> coldbox/trunk/samples/applications/SimpleBlog/simple_blog_2/config/coldbox.xml.cfm
r1763 r1767 4 4 <Settings> 5 5 <!--The name of your application.--> 6 <Setting name="AppName" value="simple_blog "/>6 <Setting name="AppName" value="simple_blog2"/> 7 7 <!-- ColdBox set-up information for J2EE installation. 8 8 As context-root are actually virtual locations which does not correspond to physical location of files. for example … … 17 17 is not set, then coldbox will try to auto-calculate it for you. Please read the docs.--> 18 18 19 <Setting name="AppMapping" value="/simple_blog_2"/> 20 19 21 20 <!--Default Debugmode boolean flag (Set to false in production environments)--> 22 <Setting name="DebugMode" value=" true" />21 <Setting name="DebugMode" value="false" /> 23 22 <!--The Debug Password to use in order to activate/deactivate debugmode,activated by url actions --> 24 23 <Setting name="DebugPassword" value=""/> … … 40 39 <Setting name="RequestStartHandler" value="main.onRequestStart"/> 41 40 <!--Event Handler to run at end of all requests, leave blank if not used. Emulates the Application.cfc onRequestEnd method--> 42 <Setting name="RequestEndHandler" value=" main.onRequestEnd"/>41 <Setting name="RequestEndHandler" value=""/> 43 42 <!--Event Handler to run at the start of an application, leave blank if not used. Emulates the Application.cfc onApplicationStart method --> 44 43 <Setting name="ApplicationStartHandler" value="main.onAppInit"/> 45 44 <!--Event Handler to run at the start of a session, leave blank if not used.--> 46 <Setting name="SessionStartHandler" value=" main.onSessionStart"/>45 <Setting name="SessionStartHandler" value=""/> 47 46 <!--Event Handler to run at the end of a session, leave blank if not used.--> 48 <Setting name="SessionEndHandler" value=" main.onSessionEnd"/>47 <Setting name="SessionEndHandler" value=""/> 49 48 <!--The Email address from which all outgoing framework emails will be sent. --> 50 <Setting name="OwnerEmail" value=" hjoreteg@esri.com" />49 <Setting name="OwnerEmail" value="myemail@email.com" /> 51 50 <!-- Enable Bug Reports to be emailed out, set to true by default if left blank --> 52 51 <Setting name="EnableBugReports" value="false"/> … … 54 53 <Setting name="UDFLibraryFile" value="" /> 55 54 <!--The event handler to execute on all framework exceptions. Event Handler syntax required.--> 56 <Setting name="ExceptionHandler" value=" main.onException" />55 <Setting name="ExceptionHandler" value="" /> 57 56 <!--What event to fire when an invalid event is detected--> 58 57 <Setting name="onInvalidEvent" value="" /> 59 58 <!--Full path from the application's root to your custom error page, else leave blank. --> 60 <Setting name="CustomErrorTemplate" value=" includes/generic_error.cfm" />59 <Setting name="CustomErrorTemplate" value="" /> 61 60 <!--Messagebox Style (css) class name to use. Look at the messagebox.cfm in the includes directory--> 62 61 <Setting name="MessageboxStyleOverride" value="false" /> … … 128 127 maxPersistentRequestProfilers : Max records to keep in the profiler. Don't get gready. 129 128 &nb
