Changeset 1732
- Timestamp:
- 08/26/08 07:34:06 (4 months ago)
- Files:
-
- coldbox/trunk/samples/applications/CF8Ajax/Application.cfc (modified) (1 diff)
- coldbox/trunk/samples/applications/CF8Ajax/config/coldbox.xml.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/CF8Ajax/config/environments.xml.cfm (modified) (1 diff)
- coldbox/trunk/samples/applications/CF8Ajax/handlers/ehMain.cfc (modified) (1 diff)
- coldbox/trunk/samples/applications/CF8Ajax/handlers/ehPlugin.cfc (modified) (1 diff)
- coldbox/trunk/samples/applications/CF8Ajax/views/ajax/vwLoginForm.cfm (modified) (4 diffs)
- coldbox/trunk/samples/applications/CF8Ajax/views/plugin/vwCookieStorage.cfm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
coldbox/trunk/samples/applications/CF8Ajax/Application.cfc
r1573 r1732 22 22 <cfset this.setClientCookies = true> 23 23 24 <!--- Create CF-Mapping for Ajax to work properly... ---> 25 <cfset this.mappings['/cf8ajax'] = getDirectoryFromPath(getCurrentTemplatePath())> 24 26 <!--- COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP ---> 25 27 <cfset COLDBOX_APP_ROOT_PATH = getDirectoryFromPath(getCurrentTemplatePath())> coldbox/trunk/samples/applications/CF8Ajax/config/coldbox.xml.cfm
r1510 r1732 5 5 <!--The name of your application.--> 6 6 <Setting name="AppName" value="CF8Ajax"/> 7 <!-- I have CF-Mapping 'cf8ajax' which this.mappings['/cf8ajac'] for Ajax stuff to work properly --> 8 <Setting name="AppMapping" value="cf8ajax"/> 7 9 <!--Default Debugmode boolean flag (Set to false in production environments)--> 8 10 <Setting name="DebugMode" value="false" /> coldbox/trunk/samples/applications/CF8Ajax/config/environments.xml.cfm
r1510 r1732 32 32 </environment> 33 33 34 <environment name="staging" urls="staging. realestate.com">34 <environment name="staging" urls="staging.cf8ajax.com"> 35 35 <!--ColdBoxSpecific Settings --> 36 36 <Setting name="BaseURL" value="http://staging.cf8ajax.com/" /> coldbox/trunk/samples/applications/CF8Ajax/handlers/ehMain.cfc
r1446 r1732 25 25 <cfargument name="Event" type="coldbox.system.beans.requestContext"> 26 26 <cfset var locColdBoxProxy = ""> 27 <cfset var qry1 = queryNew('idt,fname,lname,phone,location') />28 29 <cfloop from="1" to="4" index="i">30 <cfset queryAddRow(qry1,1) />31 <cfset querySetCell(qry1, 'idt', '#i#')>32 <cfset querySetCell(qry1, 'fname', 'fname-q1-#chr(RandRange(65,85))#')>33 <cfset querySetCell(qry1, 'lname', 'lname-q1-#chr(RandRange(65,85))#')>34 <cfset querySetCell(qry1, 'phone', 'phone-q1-954-555-5555-#i#')>35 <cfset querySetCell(qry1, 'location', 'location-q1-#chr(RandRange(65,85))#')>36 </cfloop>37 38 <cfset getColdBoxOCM().set("qry1",qry1, 0)>39 27 40 28 <!--- Get the location of this app's coldboxproxy.cfc ---> coldbox/trunk/samples/applications/CF8Ajax/handlers/ehPlugin.cfc
r1456 r1732 74 74 <cfset var rc = event.getCollection() /> 75 75 <cfset var UserInfo = structNew() /> 76 <cfset var SimpleValue = " something very simple will be store in cookie" />76 <cfset var SimpleValue = "This value was encrypted by cookie plugin" /> 77 77 78 78 <cfset UserInfo["FirtName"] = "Sana" /> coldbox/trunk/samples/applications/CF8Ajax/views/ajax/vwLoginForm.cfm
r1446 r1732 11 11 coldbox as a model framework. 12 12 -----------------------------------------------------------------------> 13 <cfajaxproxy cfc="#rc.locColdBoxProxy#" jsclassname="coldboxproxy" /> 13 14 14 15 <script type="text/javascript"> … … 24 25 ColdFusion.Window.hide("loginWindow"); 25 26 } else { 26 var msg = document.getElementById(" loginWindow_title");27 var msg = document.getElementById("invalidmsg"); 27 28 msg.innerHTML = "Incorrect username/password. Please try again!"; 28 29 } 29 30 } 30 31 </script> 31 32 <cfajaxproxy cfc="#rc.locColdBoxProxy#" />33 32 34 33 <cfif structKeyExists(URL,"logout") and URL.logout> … … 41 40 title="Please login to use this system" 42 41 initshow="true" width="400" height="250"> 43 <!--- Notice that the form does not have a submit button. 44 Submission is done by the doLogin function. --->42 <div id="invalidmsg" style="font-weight:bold;"></div><br /><br> 43 <!--- Notice that the form does not have a submit button. Submission is done by the doLogin function. ---> 45 44 <cfform name="loginForm" format="xml"> 46 45 <cfinput type="text" name="username" label="username" /><br /> … … 48 47 <cfinput type="button" name="login" value="Login!" onclick="doLogin();" /> 49 48 </cfform> 49 50 50 <div id="info-d"> 51 51 Try some wrong username for testing<br> coldbox/trunk/samples/applications/CF8Ajax/views/plugin/vwCookieStorage.cfm
r1456 r1732 32 32 <pre><cfset writeoutput("rc.plugin.getVar('UserInfo')")></pre> 33 33 <cfdump var="#rc.plugin.getVar('UserInfo')#" label="Stored CF-Struct in Cookie scope"> 34 <br /> 35 A simple value stored in cookie. 36 "" 37 <cfdump var="#rc.plugin.getVar('SimpleValue')#" label="A simple value stored in cookie"> 38 "" 34 <cfoutput>#RepeatString('<br />',4)#</cfoutput> 35 <h3>A simple value stored in cookie.</h3><hr> 36 <cfoutput><strong> "" #rc.plugin.getVar('SimpleValue')# "" </strong></cfoutput> 39 37 </p> 40 38
