Changeset 1732

Show
Ignore:
Timestamp:
08/26/08 07:34:06 (4 months ago)
Author:
sullah
Message:

many tweaks for cf8 ajax features

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • coldbox/trunk/samples/applications/CF8Ajax/Application.cfc

    r1573 r1732  
    2222        <cfset this.setClientCookies = true> 
    2323         
     24        <!--- Create CF-Mapping for Ajax to work properly... ---> 
     25        <cfset this.mappings['/cf8ajax'] = getDirectoryFromPath(getCurrentTemplatePath())> 
    2426        <!--- COLDBOX STATIC PROPERTY, DO NOT CHANGE UNLESS THIS IS NOT THE ROOT OF YOUR COLDBOX APP ---> 
    2527        <cfset COLDBOX_APP_ROOT_PATH = getDirectoryFromPath(getCurrentTemplatePath())> 
  • coldbox/trunk/samples/applications/CF8Ajax/config/coldbox.xml.cfm

    r1510 r1732  
    55                <!--The name of your application.--> 
    66                <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"/> 
    79                <!--Default Debugmode boolean flag (Set to false in production environments)--> 
    810                <Setting name="DebugMode"                                       value="false" /> 
  • coldbox/trunk/samples/applications/CF8Ajax/config/environments.xml.cfm

    r1510 r1732  
    3232        </environment> 
    3333 
    34         <environment name="staging" urls="staging.realestate.com"> 
     34        <environment name="staging" urls="staging.cf8ajax.com"> 
    3535                <!--ColdBoxSpecific Settings --> 
    3636                <Setting name="BaseURL" value="http://staging.cf8ajax.com/" /> 
  • coldbox/trunk/samples/applications/CF8Ajax/handlers/ehMain.cfc

    r1446 r1732  
    2525                <cfargument name="Event" type="coldbox.system.beans.requestContext"> 
    2626                <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)> 
    3927                 
    4028                <!--- Get the location of this app's coldboxproxy.cfc ---> 
  • coldbox/trunk/samples/applications/CF8Ajax/handlers/ehPlugin.cfc

    r1456 r1732  
    7474                <cfset var rc = event.getCollection() /> 
    7575                <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" /> 
    7777                 
    7878                <cfset UserInfo["FirtName"] = "Sana" /> 
  • coldbox/trunk/samples/applications/CF8Ajax/views/ajax/vwLoginForm.cfm

    r1446 r1732  
    1111        coldbox as a model framework. 
    1212-----------------------------------------------------------------------> 
     13<cfajaxproxy cfc="#rc.locColdBoxProxy#" jsclassname="coldboxproxy" /> 
    1314 
    1415<script type="text/javascript"> 
     
    2425            ColdFusion.Window.hide("loginWindow"); 
    2526        } else { 
    26             var msg = document.getElementById("loginWindow_title"); 
     27            var msg = document.getElementById("invalidmsg"); 
    2728            msg.innerHTML = "Incorrect username/password. Please try again!"; 
    2829        } 
    2930    } 
    3031</script> 
    31  
    32 <cfajaxproxy cfc="#rc.locColdBoxProxy#" /> 
    3332 
    3433<cfif structKeyExists(URL,"logout") and URL.logout> 
     
    4140                title="Please login to use this system" 
    4241                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. ---> 
    4544        <cfform name="loginForm" format="xml"> 
    4645            <cfinput type="text" name="username" label="username" /><br /> 
     
    4847            <cfinput type="button" name="login" value="Login!" onclick="doLogin();" /> 
    4948        </cfform> 
     49                 
    5050                <div id="info-d"> 
    5151                        Try some wrong username for testing<br> 
  • coldbox/trunk/samples/applications/CF8Ajax/views/plugin/vwCookieStorage.cfm

    r1456 r1732  
    3232        <pre><cfset writeoutput("rc.plugin.getVar('UserInfo')")></pre> 
    3333        <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> 
    3937</p> 
    4038 

Copyright 2006 ColdBox Framework by Luis Majano