Re: CF Shopping carts

2010-06-28 Thread Kevan Stannard

I used CFShopKart a few years back before it was free and had a pretty poor
experience. The list of cart features were good, but I found its
implementation very poor with duplicate code, scores of bugs, messy markup
and sparse responses from the developer when attempting to contact him
regarding the bugs I found. I haven't looked at it recently so it may be
better now.

On 28 June 2010 15:28, Kym Kovan dev-li...@mbcomms.net.au wrote:


 Bringing this back on topic has anyone got any opinions about CFShopKart?


 --

 Yours,

 Kym Kovan
 mbcomms.net.au


 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334890
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Comma delimited list

2010-06-01 Thread Kevan Stannard

Hi Bill, looks like you just need to reference your getlistings query:

!--- Loop through all listings ---
cfloop query=getlistings

!--- Display listing details here ---

!--- Display feature codes ---
cfloop index=code list=#getlistings.FEATURE_CODES#
delimiters=#chr(44)#
cfif structKeyExists(featureCodes,code)
#featureCodes[code]#
cfelse
#code#
/cfif
/cfloop

/cfloop




On 1 June 2010 14:17, Bill Hartley b...@whdservices.com wrote:


 THIS IS REALLY CLOSE - THANK YOU SO FAR :-)

 The actual list inf feature codes come from a different query and for that
 matter a different table...here is the code for the first queryI almost
 had this working and then went through a block
 So it needs to read the list of feature_codes from the first query then
 display the matching feature_description in the second querystill with
 me? :-/  is this really easier than I'm making it out to be?

 ---
 CFQUERY name=getlistings datasource=flidx_data MAXROWS=10
 SELECT * FROM listings WHERE listings.TLN_FIRM_ID = '2014415' OR
 listings.TLN_FIRM_ID = '242913' OR listings.TLN_FIRM_ID = '2010937'
 ORDER BY sale_price DESC
 /CFQUERY
 !--- Get the feature codes ---
 cfquery name=featureCodesQuery ...
 select feature_code, feature_description
 from featureCodes
 /cfquery
 !--- Put the feature codes into a struct ---
 cfset featureCodes = {}
 cfloop query=featureCodes
   cfset featureCodes[feature_code] = feature_description
 /cfloop
 !--- Display the feature codes ---
 cfloop index=code list=#FEATURE_CODES# delimiters=#chr(44)#
   cfif structKeyExists(featureCodes,code)
   #featureCodes[code]#
   cfelse
   #code#
   /cfif
 /cfloop

 -

 On Mon, May 31, 2010 at 8:12 PM, Kevan Stannard ke...@stannard.net.au
 wrote:

 
  Hi Bill, this is the idea I was getting at:
 
  !--- Get the feature codes ---
  cfquery name=featureCodesQuery ...
  select feature_code, feature_description
  from featureCodes
  /cfquery
 
  !--- Put the feature codes into a struct ---
  cfset featureCodes = {}
  cfloop query=featureCodes
 cfset featureCodes[feature_code] = feature_description
  /cfloop
 
  !--- Display the feature codes ---
  cfloop index=code list=#FEATURE_CODES# delimiters=#chr(44)#
 cfif structKeyExists(featureCodes,code)
 #featureCodes[code]#
 cfelse
 #code#
 /cfif
  /cfloop
 
 
  On 1 June 2010 09:43, Bill Hartley b...@whdservices.com wrote:
 
  
   Is there a way I can do it with in the CF code on the page itself and
 not
   in
   the select statement in the query?
  
   Something like
   cfset fullname=#MLS_AGENT_NAME#
   #gettoken(fullname,2,,)# #gettoken(fullname,1,,)#
   HRBR/CFOUTPUT
   cfset codelist=#FEATURE_CODES#
   cfloop index=code list=#codelist# delimiters=#chr(44)#
   CFIF code EQ #featurecodes.feature_codes#
   #featurecodes.description#
   CFELSE
   #code#
   /CFIF
   /cfloop
  
   I know this this code is totally wrong but thats the situation that
 would
   help me the mostanybody know the correct way to concieve of this?
  
   On Sat, May 29, 2010 at 1:45 AM, Kevan Stannard 
  kevan.stann...@gmail.com
   wrote:
  
   
A simple option for you is to load all of your feature codes into a
structure then loop through your feature codes list and just pull the
feature code descriptions from the struct.
   
On 29/05/2010 12:37 PM, Bill Hartley b...@whdservices.com wrote:
   
   
I am trying to display feature codes from a comma delimited list
 inside
  a
database.  Here is my setup:
   
Table: Listings has a column called FEATURE_CODES and example of the
  data
in
this column is B01,E09,E20,G12,J07
   
Then I have another table inside the same database called
 FeatureCodes
   the
data inside this table is arranged
FEATURE_CODE FEATURE_DESCRIPTION
B01  Sold As Is
E09  Frame and Stucco
and so on
I need to display the feature description from the FeatureCodes table
  on
the
display page by reading the feature_codes from the listing table
   
Any Suggestions?? Please!!
   
   
   
   
  
  
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334170
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Comma delimited list

2010-05-31 Thread Kevan Stannard

Hi Bill, this is the idea I was getting at:

!--- Get the feature codes ---
cfquery name=featureCodesQuery ...
select feature_code, feature_description
from featureCodes
/cfquery

!--- Put the feature codes into a struct ---
cfset featureCodes = {}
cfloop query=featureCodes
cfset featureCodes[feature_code] = feature_description
/cfloop

!--- Display the feature codes ---
cfloop index=code list=#FEATURE_CODES# delimiters=#chr(44)#
cfif structKeyExists(featureCodes,code)
#featureCodes[code]#
cfelse
#code#
/cfif
/cfloop


On 1 June 2010 09:43, Bill Hartley b...@whdservices.com wrote:


 Is there a way I can do it with in the CF code on the page itself and not
 in
 the select statement in the query?

 Something like
 cfset fullname=#MLS_AGENT_NAME#
 #gettoken(fullname,2,,)# #gettoken(fullname,1,,)#
 HRBR/CFOUTPUT
 cfset codelist=#FEATURE_CODES#
 cfloop index=code list=#codelist# delimiters=#chr(44)#
 CFIF code EQ #featurecodes.feature_codes#
 #featurecodes.description#
 CFELSE
 #code#
 /CFIF
 /cfloop

 I know this this code is totally wrong but thats the situation that would
 help me the mostanybody know the correct way to concieve of this?

 On Sat, May 29, 2010 at 1:45 AM, Kevan Stannard kevan.stann...@gmail.com
 wrote:

 
  A simple option for you is to load all of your feature codes into a
  structure then loop through your feature codes list and just pull the
  feature code descriptions from the struct.
 
  On 29/05/2010 12:37 PM, Bill Hartley b...@whdservices.com wrote:
 
 
  I am trying to display feature codes from a comma delimited list inside a
  database.  Here is my setup:
 
  Table: Listings has a column called FEATURE_CODES and example of the data
  in
  this column is B01,E09,E20,G12,J07
 
  Then I have another table inside the same database called FeatureCodes
 the
  data inside this table is arranged
  FEATURE_CODE FEATURE_DESCRIPTION
  B01  Sold As Is
  E09  Frame and Stucco
  and so on
  I need to display the feature description from the FeatureCodes table on
  the
  display page by reading the feature_codes from the listing table
 
  Any Suggestions?? Please!!
 
 
 
 

 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334160
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Comma delimited list

2010-05-28 Thread Kevan Stannard

A simple option for you is to load all of your feature codes into a
structure then loop through your feature codes list and just pull the
feature code descriptions from the struct.

On 29/05/2010 12:37 PM, Bill Hartley b...@whdservices.com wrote:


I am trying to display feature codes from a comma delimited list inside a
database.  Here is my setup:

Table: Listings has a column called FEATURE_CODES and example of the data in
this column is B01,E09,E20,G12,J07

Then I have another table inside the same database called FeatureCodes the
data inside this table is arranged
FEATURE_CODE FEATURE_DESCRIPTION
B01  Sold As Is
E09  Frame and Stucco
and so on
I need to display the feature description from the FeatureCodes table on the
display page by reading the feature_codes from the listing table

Any Suggestions?? Please!!



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334107
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Validating that only .5 decimal gets through?

2010-02-20 Thread Kevan Stannard

Good catch Greg (clearly I was just testing everyone, right :).

Yep, I like Jerry's answer too:

cfset isValid = (n*2) eq int(n*2)


On 20 February 2010 18:36, Greg Morphis gmorp...@gmail.com wrote:


 cfset isValid = (n * 10) mod 5 eq 0

 That works unless you try something like 2.05
 cfset isValid = (2.05 * 10) mod 5 eq 0
 cfoutputisValid : #isValid#/cfoutput
 isValid : YES
 but should fail



 On Sat, Feb 20, 2010 at 1:28 AM, Kevan Stannard ke...@stannard.net.au
 wrote:
 
  This might do:
 
  cfset isValid = (n * 10) mod 5 eq 0
 
 
  On 20 February 2010 17:41, Marie Taylore mt4yl...@yahoo.com wrote:
 
 
  I have an app that I need to validate that they enter either whole
 numbers
  (1,2,3, etc.) or if they DO enter a decimal, it can only be in half
  increments, so 2.5 is okay, but not 2.1, 2.2, 2.25, etc.  Of course, 2.0
  would be okay too, so .0 after the number is fine.
 
  Is there a good way to check that with Regex rather than parsing the
 string
  and checking that the value after the period is a 5 or a 0?
 
  Thanks,
 
  MarieT
 
 
 
 
 
 
 

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330981
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: is there a safe way to save an object/cfc loaded into the app scope into the session scope?

2010-02-19 Thread Kevan Stannard

Take a look at this to give you some ideas on working with application and
session data:

http://learn.objectorientedcoldfusion.org/wiki/Accessing_a_Users_Session_Data

http://learn.objectorientedcoldfusion.org/wiki/Accessing_a_Users_Session_Data
Kevan


On 19 February 2010 17:22, crippe crippe crippe...@hotmail.com wrote:


 I am building an application that loads all my cfc objects into the
 application scope  in the onApplicationStart function like so:
 cfset Application.components[variables.thisComponentVarName] =
 CreateObject(component,variables.thisComponentRelativeLoc) /

 (notice i am not calling the init method, but let me know if I should. The
 init method simply returns this cfreturn this /)

 One of the components that gets loaded is the sessionHandler, an object
 that deals with getting/setting session vars. I load it into the session
 scope like this:
 cfset session.sessionHandler =
 Application.components.controller_sessionHandler.init() /
 My expectation in doing that is that I would get a new instance of the
 sessionHandler object loaded into the session, however, it seems that CF
 continues to simply point to the shared application scoped object b/c all
 sessions seem to be sharing the same set of vars. If I alter one in one
 session I can see the change in a different browser session.

 Can anyone explain why this is happening and if I need to change the way I
 am loading the objects into App memory or instantiating them. I am worried
 that if this is happening in the session scope it is also happening with
 other cfc's in the application scope, such as when I call their init
 functions within a request - is it possible that it will alter the data for
 other requests if they are accessing the cfc at the same time?

 Worried, please help!

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330945
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Validating that only .5 decimal gets through?

2010-02-19 Thread Kevan Stannard

This might do:

cfset isValid = (n * 10) mod 5 eq 0


On 20 February 2010 17:41, Marie Taylore mt4yl...@yahoo.com wrote:


 I have an app that I need to validate that they enter either whole numbers
 (1,2,3, etc.) or if they DO enter a decimal, it can only be in half
 increments, so 2.5 is okay, but not 2.1, 2.2, 2.25, etc.  Of course, 2.0
 would be okay too, so .0 after the number is fine.

 Is there a good way to check that with Regex rather than parsing the string
 and checking that the value after the period is a 5 or a 0?

 Thanks,

 MarieT




 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330979
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: For consideration...

2009-12-11 Thread Kevan Stannard

I haven't tried these but they may be what you are looking for

http://www.validatethis.org/

http://www.validatethis.org/http://thor.riaforge.org/

http://thor.riaforge.org/

2009/12/12 Justin Scott jscott-li...@gravityfree.com


 I'm tired of writing form input validation routines over and over again.
 Using CFINPUT and its validation options work great for the front end, but
 it's still a pain to write input validation on the server-side, and the
 rules between the two can get out of sync, and the built-in validation
 rules
 don't have as much flexibility as server-side rules do.  I'm working on a
 project where I have some flexible time to write a new tool and wanted to
 see if there would be any interest in the community in a tool defined as
 such:

 A form library that would allow a form with all of its properties and
 validation requirements to be defined in one place (likely a JSON file)
 which would then 1) Generate the form for display (optional), 2) provide
 for
 AJAX-based client-side validation, and 3) provide server-side validation.
 The core library would have a number of built-in validation options and
 allow for new rules to be added as needed without changing the core library
 files.

 My thought is that this would help speed development by centralizing form
 definitions and properties and make input validation on both the client and
 server side consistent and reliable without having to constantly write and
 rewrite huge blocks of cfif/cfelseif code for each form.

 Thoughts?  Opinions?  Bad idea?  Someone already release something that
 does
 this?  If it sounds like something you could use, please let me know.  If
 it's pursued, it would be released free for the community to use, but I
 don't want to waste time building it if something similar exists or nobody
 else could benefit from it.  Any feedback appreciated.


 -Justin Scott



 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329116
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Setting Static Image Expire

2009-12-05 Thread Kevan Stannard

Which version of IE are you experiencing the flickering problem in? I tried
IE8, FF3.5, Chrome and all showed no flickering.

Considering that the flickering problem may only be present in one browser
and version then image caching may not be the right solution.

First, reduce the size of your image files. Your link background image is
currently a 47KB png, which is extremely large for a 5x5 pixel single colour
image. Try saving it as a gif; this should bring the file size down to a few
bytes.

Your background image really needs to be brought down in size, currently
over 1MB. Try optimising as much as you can. ideally not more than 100K, of
course less is better if you can. Maybe recutting the images in a different
way may help to retain quality and reduce image size (separating the header
from the background for example).

In any sites I've worked on I don't recall ever needing to cache images to
prevent flicking, but maybe your case is a little different.


2009/12/6 Jessica Kennedy police_kidnapped_your_child...@yahoo.com


 Well, it's good you didn't see it I guess... It's only on the 5-6 links at
 the top.

 Yes, I have combed through every combination of google searches I can think
 of, but the problem is that I do not know how to implement the information,
 I have not been able to find a single source that has told me how TO SET
 caches (most trying to prevent it)-- and especially not how TO cache an
 IMAGE in IIS.

 I need someone to tell me EXACTLY how to go about doing this.  I know it
 can't be hard, there are a million resources that almost tell me.

  Hello,
 
  I do not see any image flickering going on with IE.  I do see that
  your
  background image is a little over 1MB in size.  You should really work
  on
  optimizing that.
 
  A google search provides a lot of info:
  http://www.google.
 com/search?hl=
 ensource=hpq=add+expires+header+to+imagesaq=1oq=add+expiraqi=g10
 
  http://www.google.
 com/search?hl=en
 source=hpq=add+expires+header+to+imagesaq=1oq=add+expiraqi=g10if
  that link doesn't work search for: add expires header to images
 
 
  Randy
 
  On Sat, Dec 5, 2009 at 1:14 PM, Jessica Kennedy 
  police_kidnapped_your_child...@yahoo.com wrote:
 
  
   nothing... really?
  
  
  


 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328894
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Methods not found.

2009-11-25 Thread Kevan Stannard

 I'm not sure if this is the best way of going
 about it so if anyone has a better idea, I'd like to hear about it. :)

You may like to take a look at 'dependecy injection' techniques

http://learn.objectorientedcoldfusion.org/wiki/Dependency_Injection


2009/11/26 Chung Chow cyc...@annex.net


 Hi all,

 I'm trying to instantiate an object either in the psuedo-contructor or
 init of my cfc as a variable so I can use it within all my method inside
 that cfc.  For some reason when I call a method from that object I get a
 Method not found error.  I'm not sure if this is the best way of going
 about it so if anyone has a better idea, I'd like to hear about it. :)
 If I istantiate it WITHIN the cffunction, it works fine. Any ideas?




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328709
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: ARGUMENT scope case

2009-11-25 Thread Kevan Stannard

The struct key name case should be retained with the following syntax:

cfset retStruct[success] = 1



2009/11/26 Bryan Stevenson br...@electricedgesystems.com


 Hey All,

 I just bumped into an interesting/annoying potential difference between
 Adobe CF 8 and OpenBD.

 When I run the following code in a CFFUNCTION:

 !--- define the structure---
 cfset var retStruct = StructNew()

 cfset structInsert(retStruct, success, 1)
 cfset structInsert(retStruct, output, #ARGUMENTS#)
 cfset structInsert(retStruct, exception, )

 I get the following results:

 OpenBD: each ARGUMENT key is lowercase (along with values)

 Adobe CF 8: each ARGUMENT key is uppercase (along with values)

 This is a royal PITA for JS that uses the retStruct (json serialized BTW
 by ajaxCFC and not serializeJSON()).  All my JS code is lowercase.

 Anyways.I'm sure there is a simple solution to force lowercase
 ARGUMENT scope structure keys, but I'm a few days into a nasty head cold
 and the noodle isn't multi-tasking right now ;-)

 TIA

 Cheers

 --

 Bryan Stevenson B.Comm.
 VP  Director of E-Commerce Development
 Electric Edge Systems Group Inc.
 phone: 250.480.0642
 fax: 250.480.1264
 cell: 250.920.8830
 e-mail: br...@electricedgesystems.com
 web: www.electricedgesystems.com

 Notice:
 This message, including any attachments, is confidential and may contain
 information that is privileged or exempt from disclosure. It is intended
 only for the person to whom it is addressed unless expressly authorized
 otherwise by the sender. If you are not an authorized recipient, please
 notify the sender immediately and permanently destroy all copies of this
 message and attachments.





 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328721
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Methods not found.

2009-11-25 Thread Kevan Stannard

If you create all of your application wide objects once on application
startup then it's unlikely you will reach any limit. I would imagine that a
small application would have less than 10 application scoped objects,
whereas a very large application may need 50 or so, just to pick a few
numbers out of the air.


2009/11/26 Chung Chow cyc...@annex.net


 Hi Kevin. I've read that whole site a couple of days ago.  Good stuff.
 But apart from making these utilities load in an application scope, I
 was trying to find a better way accesing them object-wide I guess.  I'm
 worried aboout having to load all these utilities objects in a
 application variable.  Right now it loads the system settings object.
 How much is too much objects when loading them into an application
 scope? Sorry for the questions.  I just started to revert my programming
 thinking into an OOP stand point so I'm still sorting through all the
 damn terminology and concepts.

  -Original Message-
  From: Kevan Stannard [mailto:ke...@stannard.net.au]
  Sent: Wednesday, November 25, 2009 1:56 PM
  To: cf-talk
  Subject: Re: Methods not found.
 
 
   I'm not sure if this is the best way of going about it so if anyone
   has a better idea, I'd like to hear about it. :)
 
  You may like to take a look at 'dependecy injection' techniques
 
  http://learn.objectorientedcoldfusion.org/wiki/Dependency_Injection
 
 
  2009/11/26 Chung Chow cyc...@annex.net
 
  
   Hi all,
  
   I'm trying to instantiate an object either in the
  psuedo-contructor or
   init of my cfc as a variable so I can use it within all my method
   inside that cfc.  For some reason when I call a method from that
   object I get a Method not found error.  I'm not sure if this is the
   best way of going about it so if anyone has a better idea,
  I'd like to
   hear about it. :) If I istantiate it WITHIN the cffunction,
  it works fine. Any ideas?
  
  
 
 
 

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328722
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


ColdFusion with a Java model

2009-11-01 Thread Kevan Stannard

I'm looking to find any information on using ColdFusion for the presentation
layer with a Java/Spring back end.

So far I have found an excellent presentation by Andrew Powell here
http://www.infoaccelerator.net/blog/post.cfm/enterprise-mvc-with-coldfusion-and-java

http://www.infoaccelerator.net/blog/post.cfm/enterprise-mvc-with-coldfusion-and-javaBut
I need to fill in a few gaps in how to set up the environment so that this
would work.

Any other sample applications, blog articles, presentations etc would be a
great help.

Thanks

Kevan


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327884
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: How to Handle Objects when Doing Several Updates and Once?

2009-09-29 Thread Kevan Stannard

Hi Glyn
From your example I am guessing there is some thing that these options are
associated with. Let's assume it's a product with various options. Within
CFML I would probably have code something like:

// create the object
cfset productBean = createProductBean()

// populate with the primary fields (eg optionId might be here?)
cfset populate(productBean)

// Set the individual options
cfloop from=1 to=#form.qty# index=i
cfset productBean.setOption(form[value  i])
/cfloop

// Save the product
cfset saveProduct(productBean)

The options /are/ stored as some kind of collection (array, struct, etc)
inside the product bean and you would loop over that when saving.
saveProduct() could call productBean.getOptions() to get the collection of
options.

I have left out quite a lot but hopefully this gets the idea across.

Kevan


2009/9/28 Glyn Jackson glyn.jack...@newebia.co.uk


 I am trying to work with objects and better understand how to use them. So
 far it has been straight forward when updating/creating/deleting one record
 at a time. But I now need to update many records at once is getting a bit
 tricky.

 I simplified version of what I am doing so far is below...


 I create an object...
 var productBean = variables.storeService.createProductBean(); //Create
 Product Bean

 Push the data into it using this very useful plugin in CB
 getPlugin('beanFactory').populateBean(productBean);//The Magic Bean Machine

 and then simply update my DAO via my service like so
 variables.storeService.saveProduct(productBean)

 my question
 However I am now faced with a situation where I need update several records
 at the same time. So my question is how to I handle this with an object? do
 I have to repopulate my object in a loop and then do the database updates
 one at a time? I can see this causing many issues what if the write fails
 halfway etc, and it means writing some sort of array to store all the data
 while its being looped over, sounds cumbersome!

 Below is how I would have done the update before objects in a procedural
 manner if you get what I mean...

 cfloop from=1 to=#FORM.qty# index=i
cfscript
value = ;
if (i IS 1) {
value = #FORM.value1#;
}
else if (i IS 2) {
value = #FORM.value2#;
}
else if (i IS 3) {
value = #FORM.value3#;
}
else if (i IS 4) {
value = #FORM.value4#;
}
else if (i IS 5) {
value = #FORM.value5#;
}
else if (i IS 6) {
value = #FORM.value6#;
}
else if (i IS 7) {
value = #FORM.value7#;
}
/cfscript

 cfif NOT value IS 
 cfquery name=addValue datasource=dbSource
 INSERT INTO optionValues (value, optionId) VALUES ('#value#', '#optionId#')
 /cfquery
 /cfif
 cfset i = i + 1
 /cfloop
 cfset success = TRUE


 how do other people do this sort of update using objects, any example, blog
 posts, ect would be very useful. Thanks.

 :)


 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326737
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Invoking components, methods and storing instance in application scope

2009-09-27 Thread Kevan Stannard

Hi Tony, you make like to take a look at

http://learn.objectorientedcoldfusion.org/wiki/The_Init()_Function

 instances of an object. I have also seen quite a bit about using 
 init() in every component but am not sure why I would do this if I 
 just want to call a method from the application scope:


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326682
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFMENU - message submenu collapsed. click to expand submenu

2009-08-29 Thread Kevan Stannard

Hi Glyn, tried this and did not see the extra message. Also running CF 8.01.

2009/8/30 Glyn Jackson glyn.jack...@newebia.co.uk


 could someone cut and paste the the code below and tell me if you see the
 message
 submenu collapsed. click to expand submenu
 under products items.

 I dont remember CFMENU having this message before and I cannot get rid of
 it!

 running CF 8.01



 cfmenu bgColor=##c0c0c0
cfmenuitem display=Adobe href=http://www.adobe.com; /
cfmenuitem display=Products
cfmenuitem display=ColdFusion href=
 http://www.adobe.com/go/coldfusion; /
cfmenuitem display=Flash href=http://www.adobe.com/go/flash; /
/cfmenuitem
 /cfmenu



 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325847
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFMENU - message submenu collapsed. click to expand submenu

2009-08-29 Thread Kevan Stannard

Not sure if this matters, but your version of
YUI /scripts/ajax/yui/menu/menu-min.js is 2.2.0 The version I am running is
2.3.0.
My full CF version is 8,0,1,195765


2009/8/30 Glyn Jackson glyn.jack...@newebia.co.uk


 you can see it happening here

 http://demo.salesmaxx.co.uk/test.cfm

 only code on the page is

 cfmenu bgColor=##c0c0c0
cfmenuitem display=Adobe href=http://www.adobe.com; /
cfmenuitem display=Products
cfmenuitem display=ColdFusion href=
 http://www.adobe.com/go/coldfusion; /
cfmenuitem display=Flash href=http://www.adobe.com/go/flash; /
/cfmenuitem
 /cfmenu

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325853
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Help with creating a filename field

2009-08-24 Thread Kevan Stannard

Would be a good idea to also check the file extension of the uploaded file,
otherwise you may get a .cfm file uploaded with a spoofed mime type of
image/jpg for example.
2009/8/24 Dave l cfl...@jamwerx.com


 I'm in the middle of remaking a decent jquery uploader for my admin sites
 and here is what i do ( for the whole upload):

 1. photo uploaded via jquery  flash and sent to a cfc, I send a long with
 the file variables for file size, mime  whether or not I want to run the
 virus scanner. I do not try and rename yet.

 2. File is run through cffile to upload and I have set up a small partition
 on another hd on the same server thats only purpose is to have a safe place
 for uploading and processing before delivery to final folder.

 2a. runs antivirus check if it is selected with clamav. If it reports as a
 virus it is renamed with the site it came from(this uploader is for server),
 clamps permissions down on it and moves it to quarantine folder and emails
 me a message with all the info.

 3. after uploading it runs a java mime check

 4. then runs a file size check

 5. if it passed those it moves the file to a processing folder and then
 renames the file with a uuid for a temp file name.

 6. run a scan of upload folders and delete any orphaned files over 1 hr
 old.

 7. pass the temp uuid back to the upload script which inserts it into a
 hidden form field, it also gets additional variables for the image
 processing at this time and inserts them into form as well. These are for
 things like final img size, thumb size, dest folder name, conver image,
 convert to, etc..

 8 user fills out rest of form and submits via ajax to cfc again and final
 processing starts.

 9. checks the destination folder to make sure it exists if not create it
 and any additional folders needed (large, thumbs, additional, files)

 10. gets image info for height and width

 11. create new name... either use part of the form that was submitted if it
 has any seo worth, like if it's an employee profile then I would use their
 first and last name then company name then just to be extra special(not like
 Don special) I will add the date at the end so would end up like:
 john-doe-acme-drugs-09212009.jpg, of course if they are adding more images
 then put a counter on it.

 12. if it's just a file them move it now and add info to db

 13. if its an image then I convert it to a png and then back to whatever
 format you passed in. I do this to strip jpg exif data out without loosing
 quality.

 14. then i check the height and with against the uploaded imag height and
 width against the size of the large img var that was passed in and if bigger
 than resize down

 15. sharpen it and copy it to the final folder

 16. do the same with thumbs

 17. if additional image is set do that here now as well

 18. if all is ok then enter it all into db and send back ok message to
 upload script, if not ok then it rolls back and fetches imgages and deletes
 them.




 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325629
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: returning all table records ColdBox ColdSpring via an object?

2009-08-18 Thread Kevan Stannard

Hi Glyn, couple of options:
1) If you only need a query, then just return a query. Not ideal, not OO,
breaks encapsulation, but does not suffer performance or memory issues.

2) Use an iterating business object which is just like a bean with getters
but also has a next() function to move to the next record of data. Your
entire query recordset is stored inside the bean and maintains a pointer
internally to the current row, but from the outside it just looks like a
normal bean. Great for display listings, cannot be used if you need to store
individual beans for separate usage later. Have a look at
http://www.pbell.com/index.cfm/IBO

I'd go with a query unless you have a particular reason not to.


2009/8/19 Glyn Jackson glyn.jack...@newebia.co.uk


 Confused about how I would go about returning all records from a table from
 my DAO?

 this is how I would return a record with an ID (see below), however when
 returning all records needed for a cfloop i am not sure.

 handler
  variables.adminUsersService.getUserByID(userBean); -- access service pass
 in my populated object

 then to use it in my page
 Welcome: #getPlugin(ioc).getBean(adminUsersService).getCurrentUser()#



 my options are...

 1)forget the bean as it only holds a set of data and have the service layer
 access the DAO and return a query, however downside cannot use getters!

 2) use the object somehow to keep populating the data I need i.e. pass it
 in the server layer, server layer accesses the DAO passing in object, object
 is retuned populated object. --- not sure how to loop the data in a hander
 to keep population it until done?

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325533
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: ColdBox and ColdSpring Login

2009-08-15 Thread Kevan Stannard

 if I should be do this all in my service, or should I come out again with
the username
 and run the bean.setUserSession() in the handler?
I'd keep everything behind the service (or even other objects beyond that)
and not put session related code in your handler.

I'd also keep session code out of the user object (if that is what
the setUserSession() function is doing). I would probably do something more
like:

if credentials are valid, then
session.user = userBean
endif

So your user object would be stored in the session rather than just the
username (if that's what you were planning).

Also have a look at
http://learn.objectorientedcoldfusion.org/wiki/Accessing_a_Users_Session_Data


~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325480
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: venture into OO, well sort of, need help!

2009-08-14 Thread Kevan Stannard

Can you provide a few more details on what you are trying to do? If you are
just logging in a user then you probably don't need the validation steps.
// Returns zero if not authenticated, else returns a User object
var user =
variables.adminUsersService.getAuthenticatedUser(rc.username,rc.password);

if not isObject(user) {
getPlugin(messagebox).setMessage(error, Sorry, Username/Password not
found.);
}


2009/8/14 Glyn Jackson glyn.jack...@newebia.co.uk


 The more I venture into OO type of design the more I have to get my head
 around todays its getters and setters. I think I am 'getting' in to the
 swing of this but I could do with some advice please! any advice and help is
 welcome!

 I have no idea if I am just making this up as I go along anymore lol!

 I have a ColdBox application which I am trying to learn ColdSpring with, so
 I have ColdSpring setup I need to it use...here how it went

 I wanted to do some basic validation on a form and check if the user exists
 in the DB.

 Below is my code, from my understanding. Right or wrong?


 var rc = event.getCollection();//RC Reference
 var userBean = variables.adminUsersService.createAdminUserBean(); //Create
 adminUserBean
 var errors = userBean.validateUser(rc);//Check For Validation Errors

 if (NOT ArrayLen(errors)){//No Validation Errors
 getPlugin('beanFactory').populateBean(userBean);
 resultCount = variables.adminUsersService.validateCredentials(userBean);
 //Check Login Credentials Does User Exist?
 if (resultCount.IDEXISTS eq 1){
 //do login
 }
 else {
 getPlugin(messagebox).setMessage(error, Sorry, Username/Password not
 found.);
  }
   }
 else {//We Have Validation Errors Show The User A Message
   getPlugin(messagebox).setMessage(error,
 bThe Following Validation Errors Occurred:/bbr /,errors);

   }


 Few questions.

 Is what I am doing OK?
 service -- passes in the admin bean needs the gateway
 gateway  -- my sql only acced from the service
 admin.cfc --- getters and setters, right?
 correct right?

 what are the benefits of me create the userBean above passing that into the
  getPlugin('beanFactory').populateBean(userBean); then using it and not the
 direct gateway?


 
 my service
 !---gets the gateway so it can be access via the service layer---
 cffunction name=setadminUsersGateway access=public returntype=void
 output=false
cfargument name=adminUsersGateway required=true
 type=salesMaxx.model.adminUsersGateway /
cfset variables.adminUsersGateway = arguments.adminUsersGateway /
 /cffunction

 !---creates the AdminUser Bean---
 cffunction name=createAdminUserBean access=public
 returntype=salesMaxx.model.adminUsers output=false
  cfset var bean =
 createObject('component','salesMaxx.model.adminUsers').init(createUUID()) /
 cfreturn bean /
 /cffunction


 cffunction name=validateCredentials access=public returntype=any
 output=false
  cfargument name=bean type=salesMaxx.model.adminUsers required=true
 /
  cfset result =
 variables.adminUsersGateway.existsAdminUsers(arguments.bean) /
  cfreturn result /
 /cffunction






 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325456
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: venture into OO, well sort of, need help!

2009-08-14 Thread Kevan Stannard

Ah, good point. What I meant was that for a typical user/pass authentication
scenario then no explicit validate() function would be required. The data
must be sanitized but I expect this would be this would be implicit in the
authentication code rather than an explicit step that returned a collection
of errors, as in Glyn's sample code.
2009/8/15 Matt Quackenbush quackfu...@gmail.com


 I respectfully 100% disagree.  You should **ALWAYS** validate ___ALL___
 data
 that comes from your users.

 (Note the period at the end of that sentence.)


 On Fri, Aug 14, 2009 at 3:57 PM, Kevan Stannard wrote:

 
  If you are just logging in a user then you probably don't need the
  validation steps.


 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325466
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Alternatives to multiple 'if/else if' statements

2009-07-28 Thread Kevan Stannard

You can probably put your winner criteria into a struct:

cfset winnerData = {}
cfset winnerData[doosh] = { category = DOOSH Collections, winner =
Carol Yeung }
etc ...

Then loop over the struct keys

cfset result = 0
cfloop item=code collection=#winnerData#
cfif getImageInfo.name contains code
cfset result = data[code]
cfbreak
/cfif
/cfloop

cfif isStruct(result)
... you've found a match ...
cfelse
   ... no match found ...
/cfif




2009/7/29 Mark Henderson m...@cwc.co.nz


 This is a pretty basic question so I hope it makes sense, as I'm curious
 to know what other techniques are available to achieve the same result
 as the code below (hopefully in a more efficient manner).

 This is for a photo gallery of winning garments from a recent awards
 evening. Here is the current process (and yes, one day soon this will
 all be databased and I can match the images to a separate results table,
 but for now the quick dirty solution will suffice). Only the relevant
 code is included.

 Query the gallery folder:
 cfdirectory
 name=getGalleryJpegs
 action=list
 directory=#attributes.galleryDir#
 filter=*.jpg
 /

 Do some processing next to add a friendly display name (strippedName),
 the image dimensions etc.
 ..code_truncated..

 From all the images found, get the details for the selected photo when a
 user clicks on a thumb.
 cfquery dbtype=query name=getImageInfo
 SELECT   name
,strippedName
,size
,width
,height
,dateLastModified
,recordID
 FROMgetGalleryJpegs
 WHERE   recordID = #attributes.recordID#
 /cfquery

 As an FYI, recordID is the image position taken from a value list of
 names from the above query.

 !--- Check the image name and add category and designer ---
 !--- this is the part I think could be optimized ---

 What I've done is, instead of listing every single image and matching
 the name against a description (in which case I would've used a text
 file and read it in), I've used a common naming theme (the winning
 garment of each category has multiple photos). For instance, every image
 in the Heartlands Nightlife category has 'Heartlands' in the image name,
 but in order to determine the category and winner I have to do the
 following.

 cfscript
  if (getImageInfo.name CONTAINS doosh) {
category = DOOSH Collections;
winner = Carol Yeung;
  }
  else if (getImageInfo.name CONTAINS heartlands) {
attributes.category = Heartlands Hotel Croydon Nightlife;
attributes.winner = Charmaine Cowlishaw;
  }
  else if (getImageInfo.name CONTAINS kiwiana) {
attributes.category = Hokonui Heritage Centre Kiwiana;
attributes.winner = Margaret Lewis;
  }
  else if (getImageInfo.name CONTAINS MPP) {
attributes.category = Macdonald Pearce Perniskie Menswear and
 Overall;
attributes.winner = Laura Marshall;
  }
  else if (getImageInfo.name CONTAINS nu-dax) {
attributes.category = Nu-Dax Denim;
attributes.winner = Gregory Wiseman Spence;
  }
  else if (getImageInfo.name CONTAINS SIT) {
attributes.category = SIT Knitted;
attributes.winner = Ruth Bucknell;
  }
  else if (getImageInfo.name CONTAINS streetwear) {
attributes.category = Streetwear and Young Designer;
attributes.winner = Elise Barnes;
  }
  else if (getImageInfo.name CONTAINS vnc) {
attributes.category = VnC Cocktails Avant-Garde;
attributes.winner = Marie Kelly;
  }
  else if (getImageInfo.name CONTAINS westpac) {
attributes.category = Westpac Wool;
attributes.winner = Roberta Lee Davis;
  }
  else {
attributes.category = N.A;
attributes.winner = N.A;
  }
 /cfscript

 The above is all working fine, but if there were 30+ categories this
 approach doesn't seem the best. In an OO world I know polymorphism is
 the answer (but unfortunately that doesn't apply in this case).

 I know I could use cfswitch and cfcase but that really doesn't seem to
 change the process much. Any other ideas on how to match the winner and
 category to a particular image without a bunch of if else if
 statements??

 Please note, I googled before posting.

 TIA
 Mark

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325065
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Alternatives to multiple 'if/else if' statements

2009-07-28 Thread Kevan Stannard

You can probably put your winner criteria into a struct:

cfset winnerData = {}
cfset winnerData[doosh] = { category = DOOSH Collections, winner =
Carol Yeung }
etc ...

Then loop over the struct keys

cfset result = 0
cfloop item=code collection=#winnerData#
cfif getImageInfo.name contains code
cfset result = data[code]
cfbreak
/cfif
/cfloop

cfif isStruct(result)
... you've found a match ...
cfelse
   ... no match found ...
/cfif


 2009/7/29 Mark Henderson m...@cwc.co.nz


 This is a pretty basic question so I hope it makes sense, as I'm curious
 to know what other techniques are available to achieve the same result
 as the code below (hopefully in a more efficient manner).

 cfscript
  if (getImageInfo.name CONTAINS doosh) {
category = DOOSH Collections;
winner = Carol Yeung;
  }
  else if (getImageInfo.name CONTAINS heartlands) {
attributes.category = Heartlands Hotel Croydon Nightlife;
attributes.winner = Charmaine Cowlishaw;
  }
  else if (getImageInfo.name CONTAINS kiwiana) {
attributes.category = Hokonui Heritage Centre Kiwiana;
attributes.winner = Margaret Lewis;
  } ...




~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325066
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: ecommerce emergency

2009-07-22 Thread Kevan Stannard

Phillip, you might need to double check but last I looked cfshopkart it was
storing credit card details in its database (an MS Access database). And if
you're on shared hosting this this db is likely to be web accessible. If
this is still the case then avoid this cart.
Mike, cfshopkart was one of the authors first cf applications so is not a
good example of a well designed or coded app.

I'd recommend going with James' advise:

http://www.cfwebstore.com


http://www.cfwebstore.com/

2009/7/23 Phillip Vector vec...@mostdeadlygame.com


 Just figured it out what I was looking for (and it seems we have the
 same issue).

 http://www.cfshopkart.com/

 :)

 On Wed, Jul 22, 2009 at 7:00 PM, mike popmikepoplaw...@gmail.com wrote:
 
  i have 2 months to learn how to build an entire ecommerce application.
  i've been in the finance field for so long that ecommerce is a completely
 new industry for me.
 
  to be honest, i wouldn't know if cookies or client variables are the best
 choice for cart storage.  what data should i store in session variables?
  the basic ecommerce questions are things that I have not been exposed to
 before.
 
  there's lots of snippets here and there; lots of basic material in books
 and tutorials.
 
  i need something to tie everything together.  i found a free coldfusion
 app but this spaghetti code is so old that it's like looking at code from a
 time machine.
 
  all recommendations and advice welcome.  if anything, the first step is
 building the admin interface for products, categories/subcategories,
 customers, orders, shipping, and payment (only credit card and COD
 available).
 
  the customer site will come later.
 
 
 
 

 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324840
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


File not found error with flash remoting talking to a cfc

2009-03-12 Thread Kevan Stannard

We are using AS3 in Flash and trying to get flash remoting working via
IIS6 to access a ColdFusion 7 component.

The remoting call is failing and producing an error message:

File not found: C:\sites\orion\remote\quizEngineProxy.cfm

C:\sites\orion is the web root.

The actual file we are calling has the same name, but is a CFC and not a CFM,
i.e.: C:\sites\orion\remote\quizEngineProxy.cfc

Within the AS3 code we don't specify a file extension for the
component; the call is similar to:

quizService.call(remote.QuizEngineProxy.recordQuizAnswer, responder);

Any thoughts on why it is looking for a cfm rather than a cfc?

Thanks 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320429
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: CFEclipse code folding; not working

2008-08-12 Thread Kevan Stannard
Hi Dominic

In the version of CFEclipse we are using the code folding does not work in
files that have nested CF comments. Once the nested comments have been
removed then the fold icons show up.

Kevan


-Original Message-
From: Dominic Watson [mailto:[EMAIL PROTECTED] 
Sent: Monday, 11 August 2008 6:36 PM
To: CF-Talk
Subject: CFEclipse code folding; not working

Hi all, i've just installed eclipse ganymede with aptana and then
cfeclipse and code folding just isn't happening (no little grey fold
icons). I have checked all the cfeclipse code folding preferences and
no clues.

Anyone experienced this?

Thanks in advance,

Dominic

-- 
Blog it up: http://fusion.dominicwatson.co.uk



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310851
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: date problem

2008-01-25 Thread Kevan Stannard
Richard

Just a final comment on this:

If you know that your dates are always in the /mm/dd format, then you
should use parseDateTime() to parse them and then format accordingly:

Eg. Assuming your date is in a variable 'd'

Format according to the setLocale() value:
cfset dateDisplay = lsDateFormat(parseDateTime(d))

Format explicitly:
cfset dateDisplay = dateFormat(parseDateTime(d),dd/mm/)

Regards

Kevan


-Original Message-
From: Kevan Stannard [mailto:[EMAIL PROTECTED] 
Sent: Saturday, 26 January 2008 2:28 PM
To: 'cf-talk@houseoffusion.com'
Subject: RE: date problem

Hi Richard

We deal with the same issue here in Australia.

You may have the problem sorted out by now, but you may like to have a look
at some notes I put down a little while ago on this.

http://stannard.net.au/blog/index.cfm/2006/10/25/Date-Objects-vs-Date-String
s-in-ColdFusion

Just an extra comment:

When you use lsDateFormat() then CF uses lsParseDateTime() to first convert
your string to a date object before formatting.

When you use dateFormat() then CF uses parseDateTime() to first convert your
string to a date object before formatting.

parseDateTime() can handle dates in /mm/dd format

lsParseDateTime() can not handle dates in /mm/dd format, which is why
you get an error.

Kevan


-Original Message-
From: Richard White [mailto:[EMAIL PROTECTED] 
Sent: Monday, 21 January 2008 1:18 AM
To: CF-Talk
Subject: date problem

Hi, 

i have been playing around with date formats for ages and still encountering
problems. i am in the uk and have set the following code when someone logs
in:

cfset SetLocale(English (UK))

i have dates stored in a mysql db which is in the format /mm/dd

when i try to get data out of the db and put it in the dd/mm/ format i
use lsdateformat(date,dd/mm/)

and it spits out an error: 01/20/2008 is not a valid date format!!

i dont understand this at all, does anyone have any ideas why it would do
this. i dont understand why it would output this when i am telling it to put
it in dd/mm/ format not mm/dd/ format

thanks very much 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297512
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: date problem

2008-01-25 Thread Kevan Stannard
Hi Richard

We deal with the same issue here in Australia.

You may have the problem sorted out by now, but you may like to have a look
at some notes I put down a little while ago on this.

http://stannard.net.au/blog/index.cfm/2006/10/25/Date-Objects-vs-Date-String
s-in-ColdFusion

Just an extra comment:

When you use lsDateFormat() then CF uses lsParseDateTime() to first convert
your string to a date object before formatting.

When you use dateFormat() then CF uses parseDateTime() to first convert your
string to a date object before formatting.

parseDateTime() can handle dates in /mm/dd format

lsParseDateTime() can not handle dates in /mm/dd format, which is why
you get an error.

Kevan


-Original Message-
From: Richard White [mailto:[EMAIL PROTECTED] 
Sent: Monday, 21 January 2008 1:18 AM
To: CF-Talk
Subject: date problem

Hi, 

i have been playing around with date formats for ages and still encountering
problems. i am in the uk and have set the following code when someone logs
in:

cfset SetLocale(English (UK))

i have dates stored in a mysql db which is in the format /mm/dd

when i try to get data out of the db and put it in the dd/mm/ format i
use lsdateformat(date,dd/mm/)

and it spits out an error: 01/20/2008 is not a valid date format!!

i dont understand this at all, does anyone have any ideas why it would do
this. i dont understand why it would output this when i am telling it to put
it in dd/mm/ format not mm/dd/ format

thanks very much 



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297511
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


re: CF8 Java Problem, Works on CF7

2007-11-28 Thread Kevan Stannard
Matthew, I gave this a try using your mock classes and it work fine for me, 
however a dump of outer.getInner() showed

Class Name: Outer$Inner
Parent Class: AbstractDecorator
Class Name: AbstractDecorator
Methods: getID() int

Parent Class: Wrapped
Class Name: Wrapped
Methods: getID() int

which includes the details of the Wrapped class, are you seeing this as well?





~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293937
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


re: Getting the data time from an unfamiliar returned value

2007-11-28 Thread Kevan Stannard
That looks like ISO 8601 date time format 

You can get more info
http://en.wikipedia.org/wiki/ISO_8601
http://www.w3.org/TR/NOTE-datetime

And a UDF from
http://www.cflib.org/udf.cfm?id=1144enable=1





~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finderproductID=1522loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293941
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Dynamic cfinvoke

2007-11-06 Thread Kevan Stannard
Hi Rick

An idea you might like to try is to wrap up your URL and FORM variables in
an 'Event' component and pass this event object to your controller.

For example, you could create a component called Event.cfc and init() it
with the url and form data. This event object has a function available such
as getArg(argName) to get access to it's data.

Then pass this event object on to your controller via a handleEvent(event)
function, and the controller in turn passes the event on to the individual
functions:

cfset functionName = event.getArg(event)
cfinvoke method=#functionName# returnvariable=eventResult
cfinvokeargument name=event value=#event# /
/cfinvoke

So the controller functions all accept just one parameter - the event, which
is really just another way of passing in effectively the same argument
collection.

Kevan



-Original Message-
From: Rick Mason [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 6 November 2007 7:55 AM
To: CF-Talk
Subject: Dynamic cfinvoke

I am trying to write a controller for a project I am working on.  I want to
pass it everything that it needs from the form page as hidden variables.

But I am not having much success in getting cfinvoke to work dynamically.  I
believe the correct way to do this is by using cfargumentcollection.  I am
able to cfdump a structure called args showing the field name and form
value.  The only two variables that make it to the CFC are a session
variable and a table ID, but none of the form variables.

Here's how I am calling it:


cfinvoke component=#Combo# method=#MethodToCall# argumentcollection =
#args#/

Any ideas?

Rick Mason




~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292728
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Session not being maintained

2007-02-01 Thread Kevan Stannard
Hi

 

I have an application on our server that is not being maintained across
pages. I have set up a test directory with only two files:

 

Application.cfm

--

 

cfapplication

name=test

clientmanagement=Yes

sessionmanagement=Yes

sessiontimeout=#createTimeSpan(0,0,30,0)#

applicationtimeout=#createTimeSpan(1,0,0,0)#

 

 

index.cfm

--

 

pBEFORE:/p

cfdump var=#session#

 

cfset session.x = now()

 

pAFTER:/p

cfdump var=#session#

 

p

a href=index.cfmRefresh/a

/p

 

 

When I execute index.cfm, this is the output:

 

BEFORE:

 

struct 

cfid 3660  

cftoken 18546740  

sessionid TEST_3660_18546740  

urltoken CFID=3660CFTOKEN=18546740  

 

AFTER:

 

struct 

cfid 3660  

cftoken 18546740  

sessionid TEST_3660_18546740  

urltoken CFID=3660CFTOKEN=18546740  

x {ts '2007-02-02 11:55:57'}  

 

Refresh 

 

 

 

When I refresh the page the cfide, cftoken etc are changed and the variable
session.x is gone

 

* I am running IE7

* This is using http://

* This works fine within Firefox

 

Any suggestions?

 

Kevan



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268383
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Session not being maintained

2007-02-01 Thread Kevan Stannard
I have tested on a number of machines and all are set to allow cookies.

I have tested in IE7 and IE6 with the same behaviour, but Firefox 2.0 seems
to be fine.

I have also tries changing the privacy setting within IE to allow all
cookies for our test internal server, but the problem continues.

Yes, your sample code does append the cfide and cftoken variables, and the
session is then retained when they are present.

Kevan

-Original Message-
From: AJ Mercer [mailto:[EMAIL PROTECTED] 
Sent: Friday, 2 February 2007 12:06 PM
To: CF-Talk
Subject: Re: Session not being maintained

does you browser accept cookies?

try this for your refresh link
a href=#urlSessionFormat('index.cfm')#Refresh/a

ColdFusion works out if it needs to append CFID and CFTOKEN to the URL -
like if cookies are not enabled.


On 2/2/07, Kevan Stannard [EMAIL PROTECTED] wrote:

 Hi



 I have an application on our server that is not being maintained across
 pages. I have set up a test directory with only two files:



 Application.cfm

 --



 cfapplication

 name=test

 clientmanagement=Yes

 sessionmanagement=Yes

 sessiontimeout=#createTimeSpan(0,0,30,0)#

 applicationtimeout=#createTimeSpan(1,0,0,0)#





 index.cfm

 --



 pBEFORE:/p

 cfdump var=#session#



 cfset session.x = now()



 pAFTER:/p

 cfdump var=#session#



 p

 a href=index.cfmRefresh/a

 /p





 When I execute index.cfm, this is the output:



 BEFORE:



 struct

 cfid 3660

 cftoken 18546740

 sessionid TEST_3660_18546740

 urltoken CFID=3660CFTOKEN=18546740



 AFTER:



 struct

 cfid 3660

 cftoken 18546740

 sessionid TEST_3660_18546740

 urltoken CFID=3660CFTOKEN=18546740

 x {ts '2007-02-02 11:55:57'}



 Refresh







 When I refresh the page the cfide, cftoken etc are changed and the
 variable
 session.x is gone



 * I am running IE7

 * This is using http://

 * This works fine within Firefox



 Any suggestions?



 Kevan



 



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268386
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Session not being maintained

2007-02-01 Thread Kevan Stannard
Thanks James

These are standard installs of IE with no fiddling with cookie settings
AFAIK. No toolbars/helpers present on any of the test browsers.

I have tried accessing my test page from both internally and externally and
get the same results.

I have also added the sites to the trusted sites within IE.

On the 'web page privacy policy' window IE claims 'based on your privacy
settings, no cookies were restricted or blocked'.

Thanks


-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Friday, 2 February 2007 12:27 PM
To: CF-Talk
Subject: Re: Session not being maintained

OK, so you aren't using J2EE session variables, which means that
persistent cookies are being set (rather than session-based ones);
these are often treated more harshly by cookie blockers. Check again
for the cookie settings in IE or any toolbars/helpers loaded into IE,
as this is the problem.

On 2/2/07, Kevan Stannard [EMAIL PROTECTED] wrote:
 I have tested on a number of machines and all are set to allow cookies.

 I have tested in IE7 and IE6 with the same behaviour, but Firefox 2.0
seems
 to be fine.

 I have also tries changing the privacy setting within IE to allow all
 cookies for our test internal server, but the problem continues.

 Yes, your sample code does append the cfide and cftoken variables, and the
 session is then retained when they are present.

 Kevan

 -Original Message-
 From: AJ Mercer [mailto:[EMAIL PROTECTED]
 Sent: Friday, 2 February 2007 12:06 PM
 To: CF-Talk
 Subject: Re: Session not being maintained

 does you browser accept cookies?

 try this for your refresh link
 a href=#urlSessionFormat('index.cfm')#Refresh/a

 ColdFusion works out if it needs to append CFID and CFTOKEN to the URL -
 like if cookies are not enabled.


 On 2/2/07, Kevan Stannard [EMAIL PROTECTED] wrote:
 
  Hi
 
 
 
  I have an application on our server that is not being maintained across
  pages. I have set up a test directory with only two files:
 
 
 
  Application.cfm
 
  --
 
 
 
  cfapplication
 
  name=test
 
  clientmanagement=Yes
 
  sessionmanagement=Yes
 
  sessiontimeout=#createTimeSpan(0,0,30,0)#
 
  applicationtimeout=#createTimeSpan(1,0,0,0)#
 
 
 
 
 
  index.cfm
 
  --
 
 
 
  pBEFORE:/p
 
  cfdump var=#session#
 
 
 
  cfset session.x = now()
 
 
 
  pAFTER:/p
 
  cfdump var=#session#
 
 
 
  p
 
  a href=index.cfmRefresh/a
 
  /p
 
 
 
 
 
  When I execute index.cfm, this is the output:
 
 
 
  BEFORE:
 
 
 
  struct
 
  cfid 3660
 
  cftoken 18546740
 
  sessionid TEST_3660_18546740
 
  urltoken CFID=3660CFTOKEN=18546740
 
 
 
  AFTER:
 
 
 
  struct
 
  cfid 3660
 
  cftoken 18546740
 
  sessionid TEST_3660_18546740
 
  urltoken CFID=3660CFTOKEN=18546740
 
  x {ts '2007-02-02 11:55:57'}
 
 
 
  Refresh
 
 
 
 
 
 
 
  When I refresh the page the cfide, cftoken etc are changed and the
  variable
  session.x is gone
 
 
 
  * I am running IE7
 
  * This is using http://
 
  * This works fine within Firefox
 
 
 
  Any suggestions?
 
 
 
  Kevan
 
 
 
 



 



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268389
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Session not being maintained

2007-02-01 Thread Kevan Stannard
One additional bit of information:

I am accessing this site via a subdomain:
http://testsite.ourdomain.com.au/test/

Internally, I can access the same code via a server's name:
http://testsite/test/

This second option IS retaining the session.



-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Friday, 2 February 2007 12:27 PM
To: CF-Talk
Subject: Re: Session not being maintained

OK, so you aren't using J2EE session variables, which means that
persistent cookies are being set (rather than session-based ones);
these are often treated more harshly by cookie blockers. Check again
for the cookie settings in IE or any toolbars/helpers loaded into IE,
as this is the problem.

On 2/2/07, Kevan Stannard [EMAIL PROTECTED] wrote:
 I have tested on a number of machines and all are set to allow cookies.

 I have tested in IE7 and IE6 with the same behaviour, but Firefox 2.0
seems
 to be fine.

 I have also tries changing the privacy setting within IE to allow all
 cookies for our test internal server, but the problem continues.

 Yes, your sample code does append the cfide and cftoken variables, and the
 session is then retained when they are present.

 Kevan

 -Original Message-
 From: AJ Mercer [mailto:[EMAIL PROTECTED]
 Sent: Friday, 2 February 2007 12:06 PM
 To: CF-Talk
 Subject: Re: Session not being maintained

 does you browser accept cookies?

 try this for your refresh link
 a href=#urlSessionFormat('index.cfm')#Refresh/a

 ColdFusion works out if it needs to append CFID and CFTOKEN to the URL -
 like if cookies are not enabled.


 On 2/2/07, Kevan Stannard [EMAIL PROTECTED] wrote:
 
  Hi
 
 
 
  I have an application on our server that is not being maintained across
  pages. I have set up a test directory with only two files:
 
 
 
  Application.cfm
 
  --
 
 
 
  cfapplication
 
  name=test
 
  clientmanagement=Yes
 
  sessionmanagement=Yes
 
  sessiontimeout=#createTimeSpan(0,0,30,0)#
 
  applicationtimeout=#createTimeSpan(1,0,0,0)#
 
 
 
 
 
  index.cfm
 
  --
 
 
 
  pBEFORE:/p
 
  cfdump var=#session#
 
 
 
  cfset session.x = now()
 
 
 
  pAFTER:/p
 
  cfdump var=#session#
 
 
 
  p
 
  a href=index.cfmRefresh/a
 
  /p
 
 
 
 
 
  When I execute index.cfm, this is the output:
 
 
 
  BEFORE:
 
 
 
  struct
 
  cfid 3660
 
  cftoken 18546740
 
  sessionid TEST_3660_18546740
 
  urltoken CFID=3660CFTOKEN=18546740
 
 
 
  AFTER:
 
 
 
  struct
 
  cfid 3660
 
  cftoken 18546740
 
  sessionid TEST_3660_18546740
 
  urltoken CFID=3660CFTOKEN=18546740
 
  x {ts '2007-02-02 11:55:57'}
 
 
 
  Refresh
 
 
 
 
 
 
 
  When I refresh the page the cfide, cftoken etc are changed and the
  variable
  session.x is gone
 
 
 
  * I am running IE7
 
  * This is using http://
 
  * This works fine within Firefox
 
 
 
  Any suggestions?
 
 
 
  Kevan
 
 
 
 



 



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268392
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Session not being maintained

2007-02-01 Thread Kevan Stannard
Some more info:

I am accessing the site from 
1) http://testsite.ourdomain.com.au/ - not working
2) http://testsite/ - working

When I ping these domains they return different IP addresses (both external
IPs).

Thanks


-Original Message-
From: Kevan Stannard [mailto:[EMAIL PROTECTED] 
Sent: Friday, 2 February 2007 12:58 PM
To: 'cf-talk@houseoffusion.com'
Subject: RE: Session not being maintained

One additional bit of information:

I am accessing this site via a subdomain:
http://testsite.ourdomain.com.au/test/

Internally, I can access the same code via a server's name:
http://testsite/test/

This second option IS retaining the session.



-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED] 
Sent: Friday, 2 February 2007 12:27 PM
To: CF-Talk
Subject: Re: Session not being maintained

OK, so you aren't using J2EE session variables, which means that
persistent cookies are being set (rather than session-based ones);
these are often treated more harshly by cookie blockers. Check again
for the cookie settings in IE or any toolbars/helpers loaded into IE,
as this is the problem.

On 2/2/07, Kevan Stannard [EMAIL PROTECTED] wrote:
 I have tested on a number of machines and all are set to allow cookies.

 I have tested in IE7 and IE6 with the same behaviour, but Firefox 2.0
seems
 to be fine.

 I have also tries changing the privacy setting within IE to allow all
 cookies for our test internal server, but the problem continues.

 Yes, your sample code does append the cfide and cftoken variables, and the
 session is then retained when they are present.

 Kevan

 -Original Message-
 From: AJ Mercer [mailto:[EMAIL PROTECTED]
 Sent: Friday, 2 February 2007 12:06 PM
 To: CF-Talk
 Subject: Re: Session not being maintained

 does you browser accept cookies?

 try this for your refresh link
 a href=#urlSessionFormat('index.cfm')#Refresh/a

 ColdFusion works out if it needs to append CFID and CFTOKEN to the URL -
 like if cookies are not enabled.


 On 2/2/07, Kevan Stannard [EMAIL PROTECTED] wrote:
 
  Hi
 
 
 
  I have an application on our server that is not being maintained across
  pages. I have set up a test directory with only two files:
 
 
 
  Application.cfm
 
  --
 
 
 
  cfapplication
 
  name=test
 
  clientmanagement=Yes
 
  sessionmanagement=Yes
 
  sessiontimeout=#createTimeSpan(0,0,30,0)#
 
  applicationtimeout=#createTimeSpan(1,0,0,0)#
 
 
 
 
 
  index.cfm
 
  --
 
 
 
  pBEFORE:/p
 
  cfdump var=#session#
 
 
 
  cfset session.x = now()
 
 
 
  pAFTER:/p
 
  cfdump var=#session#
 
 
 
  p
 
  a href=index.cfmRefresh/a
 
  /p
 
 
 
 
 
  When I execute index.cfm, this is the output:
 
 
 
  BEFORE:
 
 
 
  struct
 
  cfid 3660
 
  cftoken 18546740
 
  sessionid TEST_3660_18546740
 
  urltoken CFID=3660CFTOKEN=18546740
 
 
 
  AFTER:
 
 
 
  struct
 
  cfid 3660
 
  cftoken 18546740
 
  sessionid TEST_3660_18546740
 
  urltoken CFID=3660CFTOKEN=18546740
 
  x {ts '2007-02-02 11:55:57'}
 
 
 
  Refresh
 
 
 
 
 
 
 
  When I refresh the page the cfide, cftoken etc are changed and the
  variable
  session.x is gone
 
 
 
  * I am running IE7
 
  * This is using http://
 
  * This works fine within Firefox
 
 
 
  Any suggestions?
 
 
 
  Kevan
 
 
 
 



 



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268393
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Session not being maintained - Problem solved

2007-02-01 Thread Kevan Stannard
Problem solved.

The subdomain we were using contained an underscore. 

test_site.ourdomain.com.au

Of course I never thought to include that in my emails to the list!

The underscore is not a valid domain name character. We switched to using a
hyphen and suddenly our cookies (and sessions) started working.

Regards

Kevan


-Original Message-
From: Doug Brown [mailto:[EMAIL PROTECTED] 
Sent: Friday, 2 February 2007 1:23 PM
To: CF-Talk
Subject: Re: Session not being maintained

http://www.coldfusionmuse.com/index.cfm/2006/7/28/sessions.and.subdomains



Hope this helps



Doug B.



- Original Message - 
From: Kevan Stannard [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Thursday, February 01, 2007 6:58 PM
Subject: RE: Session not being maintained


 One additional bit of information:

 I am accessing this site via a subdomain:
 http://testsite.ourdomain.com.au/test/

 Internally, I can access the same code via a server's name:
 http://testsite/test/

 This second option IS retaining the session.



 -Original Message-
 From: James Holmes [mailto:[EMAIL PROTECTED]
 Sent: Friday, 2 February 2007 12:27 PM
 To: CF-Talk
 Subject: Re: Session not being maintained

 OK, so you aren't using J2EE session variables, which means that
 persistent cookies are being set (rather than session-based ones);
 these are often treated more harshly by cookie blockers. Check again
 for the cookie settings in IE or any toolbars/helpers loaded into IE,
 as this is the problem.

 On 2/2/07, Kevan Stannard [EMAIL PROTECTED] wrote:
  I have tested on a number of machines and all are set to allow cookies.
 
  I have tested in IE7 and IE6 with the same behaviour, but Firefox 2.0
 seems
  to be fine.
 
  I have also tries changing the privacy setting within IE to allow all
  cookies for our test internal server, but the problem continues.
 
  Yes, your sample code does append the cfide and cftoken variables, and
the
  session is then retained when they are present.
 
  Kevan
 
  -Original Message-
  From: AJ Mercer [mailto:[EMAIL PROTECTED]
  Sent: Friday, 2 February 2007 12:06 PM
  To: CF-Talk
  Subject: Re: Session not being maintained
 
  does you browser accept cookies?
 
  try this for your refresh link
  a href=#urlSessionFormat('index.cfm')#Refresh/a
 
  ColdFusion works out if it needs to append CFID and CFTOKEN to the URL -
  like if cookies are not enabled.
 
 
  On 2/2/07, Kevan Stannard [EMAIL PROTECTED] wrote:
  
   Hi
  
  
  
   I have an application on our server that is not being maintained
across
   pages. I have set up a test directory with only two files:
  
  
  
   Application.cfm
  
   --
  
  
  
   cfapplication
  
   name=test
  
   clientmanagement=Yes
  
   sessionmanagement=Yes
  
   sessiontimeout=#createTimeSpan(0,0,30,0)#
  
   applicationtimeout=#createTimeSpan(1,0,0,0)#
  
  
  
  
  
   index.cfm
  
   --
  
  
  
   pBEFORE:/p
  
   cfdump var=#session#
  
  
  
   cfset session.x = now()
  
  
  
   pAFTER:/p
  
   cfdump var=#session#
  
  
  
   p
  
   a href=index.cfmRefresh/a
  
   /p
  
  
  
  
  
   When I execute index.cfm, this is the output:
  
  
  
   BEFORE:
  
  
  
   struct
  
   cfid 3660
  
   cftoken 18546740
  
   sessionid TEST_3660_18546740
  
   urltoken CFID=3660CFTOKEN=18546740
  
  
  
   AFTER:
  
  
  
   struct
  
   cfid 3660
  
   cftoken 18546740
  
   sessionid TEST_3660_18546740
  
   urltoken CFID=3660CFTOKEN=18546740
  
   x {ts '2007-02-02 11:55:57'}
  
  
  
   Refresh
  
  
  
  
  
  
  
   When I refresh the page the cfide, cftoken etc are changed and the
   variable
   session.x is gone
  
  
  
   * I am running IE7
  
   * This is using http://
  
   * This works fine within Firefox
  
  
  
   Any suggestions?
  
  
  
   Kevan
  
  
  
  
 
 
 
 



 



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268396
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Session not being maintained - Problem solved

2007-02-01 Thread Kevan Stannard
Problem solved.

The subdomain we were using contained an underscore. 

test_site.ourdomain.com.au

Of course I never thought to include that in my emails to the list!

The underscore is not a valid domain name character. We switched to using a
hyphen and suddenly our cookies (and sessions) started working.

Regards

Kevan




~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268397
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


ColdFusion Shopping Cart

2007-01-31 Thread Kevan Stannard
Sorry if this has been asked 1000 times before, but can anyone recommend a
ColdFusion shopping cart under $500? It will only need to hold around 100
products but most importantly it needs to work correctly within Australia (I
have had a disastrous experience in the past with a cart that fell apart
when trying to set up for Australia). Ideally I will be able to link it to
an Australian payment gateway, and if not it should have a secure strategy
for storing credit card details. Any suggestions much appreciated.

 

Kevan Stannard

 

 

 



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:268280
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: CFML IDE's

2007-01-19 Thread Kevan Stannard
An extra 0.02c on IDEs. I don't use either in much depth (mostly as simple
code editors), but I found:

HomeSite+
- Outstanding text editor
- Very fast to start up
- Has an patch to support CF7 tags
- If you are using tortoise SVN, you can still access the context menu from
the list of folders within HomeSite, but you don't get any icon overlays

CFEclipse
- Takes a while to start up
- Aptana plugin (for CSS, plus probably some other stuff) is fantastic
- Subversion plugin made things a bit sluggish for me. 
- Seems to have better support for CFC development (such as a method view
panel)
- Code folding (I didn't notice if this was in Homesite)
- A bit buggy with tag completion, but for something this amazing and free I
am not going to complain.

I generally prefer CFEclipse, mostly because of Aptana plugin and CFC
support.

Best regards

Kevan


-Original Message-
From: John Sterrett [mailto:[EMAIL PROTECTED] 
Sent: Friday, 19 January 2007 2:57 AM
To: CF-Talk
Subject: SPAM-LOW: CFML IDE's

Does anyone have any recommendations for Coldfusion IDE's on Windows
platform other than Dreamweaver? 



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266966
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Getting auto generated id after insert in MSSQL

2007-01-18 Thread Kevan Stannard
Thanks everyone, works perfectly.

-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, 18 January 2007 6:30 PM
To: CF-Talk
Subject: SPAM-LOW: Re: Getting auto generated id after insert in MSSQL

Indeed, this is clearly identified within BOL.   In most cases, where you
know the schema etc then @@identity will work but to be safe it is best to
use one of the scoped returns.

-Original Message-
From: Doug Bezona
To: CF-Talk
Sent: Thu Jan 18 03:27:48 2007
Subject: RE: Getting auto generated id after insert in MSSQL

scope_identity() is preferrable to @@identity.

@@identity will return the latest ID generated by your statement, which
means if your insert kicks off a trigger, for example, and the trigger also
uses an ID value, you would get the ID from the trigger, not your main
insert.  

Scope_identity() is restricted to the scope of your main query.

Now, chances are you don't have any triggers in play, but it's better to get
in the habit of using scope_identity() so you don't have a surprise down the
road.




~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266851
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Getting auto generated id after insert in MSSQL

2007-01-17 Thread Kevan Stannard
Hi everyone

Can anyone advise if this is the best way to get the auto generated id from
MSSQL after an insert? Is it multiuser safe?

cfquery name=personInsertQuery datasource=mydb 
insert into
person (firstName,lastName)
values
(
cfqueryparam cfsqltype=CF_SQL_VARCHAR
value=#firstName#,
cfqueryparam cfsqltype=CF_SQL_VARCHAR
value=#lastName#
);

select @@identity as personId;
/cfquery

cfset personId = personInsertQuery.personId

Thanks

Kevan



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266841
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: JS and Radio Button Issue

2007-01-10 Thread Kevan Stannard
Hi Bruce,

Something that you might want to look at is either the Prototype or jQuery
(www.jquery.com) javascript libraries. They are just amazing in how they can
manipulate a page. They are cross browser compatible too.

For example, using jQuery you would write your code as follows (may not be
exactly right (I am still learning) but will give you the idea)

Just include the jquery-latest.js file at the top of your page.

script language=JavaScript
function toggle(divToShow) {
if (divToShow == with) {
$(#withdiv).show();
$(#withoutdiv).hide();
} else {
$(#withdiv).hide();
$(#withoutdiv).show();
}
}
/script

With jQuery it helps to know a little CSS as the same syntax is used for
selecting page elements.

Best regards

Kevan


-Original Message-
From: Bruce Sorge [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 10 January 2007 3:05 PM
To: CF-Talk
Subject: RE: JS and Radio Button Issue

Thanks Charlie. That did it.

-Original Message-
From: Charlie Griefer [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 09, 2007 4:20 PM
To: CF-Talk
Subject: Re: JS and Radio Button Issue

few things i can see would be a problem.

you have multiple elements with ids with and without (the radio
buttons and the divs).

the code below should work.

script language=JavaScript
function toggle(divToShow) {
if (document.getElementById) {
if (divToShow == with) {

document.getElementById('withdiv').style.display = inline;

document.getElementById('withoutdiv').style.display = none;
} else {

document.getElementById('withdiv').style.display = none;

document.getElementById('withoutdiv').style.display = inline;
}
}
}
/script

input type=radio name=VBM value=1 id=with
onclick=toggle('with') / With
br /br /
input type=radio name=VBM value=2 id=without
onclick=toggle('without') / Without

br /br /

div id=withdiv style=display:none;
With vote by mail options here
/div
div id=withoutdiv style=display:none;
without vote by mail options here
/div

On 1/9/07, Bruce Sorge [EMAIL PROTECTED] wrote:
 I have a form that has two radio buttons. Their function is to show one of
 two hidden divs.
 The JS is this:
 script language=JavaScript
 function toggle('with', 'without')
 {
 if (document.getElementById) {
 withvbm= document.getElementById('with');
 withoutvbm= document.getElementById('without');
 }

 if (withvbm.style.display == none){
 withvbm.style.display = ;
 withoutvbm.style.display = none;
 }

 else if (withoutvbm.style.display == none){
 withoutvbm.style.display = ;
 withvbm.style.display = none;
 }
 }
 /script
 The radio buttons look like this:
  input type=radio name=VBM value=1 id=with
onclick=toggle('with',
 'without')WithBRBR
input type=radio name=VBM value=2 id=without
 onclick=toggle('without', 'with')With Out

 And the divs look like this:
  div id='with' style=display:none;
  With vote by mail options here
  /div
  div id='without' style=display:none;
  without vote by mail options here
  /div
 When I click either button, I get an error that and Object is expected.
The
 error is on the radio buttons. From what I can tell everything looks OK.
Can
 anyone see any issues with this? Also, I tried changing the first div's
 style to display:block assuming that the page needed to see one of them
and
 of it did not work, but then I though no, that cannot be it since I want
 both div's hidden until the user clicks one of the buttons.

 Thanks,
 --
 Bruce Sorge


 





~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266111
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: A question about CFCFactory objects as a singleton ....

2007-01-09 Thread Kevan Stannard
Hi Mike

I would take the approach of passing the user object in as part of your DAO
save (or create and update) method.

cfset widgetDAO = application.factory.getBean(WidgetDAO)
cfset widgetDAO.save(widget,session.currentUser)

Just as you only need a singleton factory, you also only need singleton
DAOs.

Best regards

Kevan Stannard


-Original Message-
From: Mike Kear [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 9 January 2007 5:24 AM
To: CF-Talk
Subject: Re: A question about CFCFactory objects as a singleton 

yes as a matter of routine, my tables usually have fields for:

createdby   (the userid of the person who created this record)
datecreated  (timestamp)
updatedby  (The userid of the last person to alter this record)
dateupdated (timestamp)

So the methods in the DAOs that manipulate the records need to be told who's
doing it.  Since DAOs dont know anything about the application, request or
session scopes, they have to be told what they need to know.   In this case
they dont need to know the curent time (thats from the getdate() function in
the database) but they do need to know the userid of the person initiating
this action.My question was about the best way to pass this info in,
since the application doesnt .instantiate the dao directly, but through a
CFCFactory which knows everything it needs to know to instantiate any CFC
required.

When someone logs in, there is a userbean created in their session scope,
containing their name, userid, access rights and lots more depending on what
else happens in this site.

So the question is about this .if there is only one CFCFactory created
as a singleton in the Application scope, all the users on the site are using
the same instance of the CFC to instantiate whatever CFCS they need.  Each
time, the CFC being created will need to be told who's the user, so it can
update any records it needs to update correctly.   Or perhaps it's better to
pass the userID into each method as it's called rather than into the init
method of the DAO cfc.

The options in my first post were the ones that came to mind as i wrote it,
but there are probably other possibilities

What's brought this to mind now is that i'm working on an app that will have
maybe 150-200 concurrent users, all accessing, creating and updating
records.  In the past i've had plenty of reasonably high traffic sites, but
none with that many users creating and updating records simultaniously.  The
high traffic has all been in the read only category,with the write/update
being one or two people at a time max. Under those low traffic situations it
doesnt really matter to have everyone with their own CFCFactory.   One or
two fo them in RAM isnt a big deal   100-200 of them would definitely have a
performance hit on the site so i can't do that here.

Thats' the background to my question.

Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month


On 1/9/07, Josh Nathanson [EMAIL PROTECTED] wrote:

 It seems like option [B] would use a lot less memory resources.

 A little more detail about how your objects are set up would be helpful to
 get a clearer picture.  Do you have multiple tables which each store which
 user/ when created?  It seems like you could have a userID property in
 each
 of your objects that needs to maintain the user info, then do:

 myObject.setUserID(session.userbean.getUserID())

 before commiting. Then have timestamp field in the db.







~|
Create robust enterprise, web RIAs.
Upgrade  integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:266030
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4