Re: Model-Glue application behaving badly when moved to staging server

2007-05-01 Thread npetersn
Jon,

Thanks for your reply...

I initially didn't think this problem had much to do with Model-Glue  
but then I examined the debug output and saw that the default event is  
being fired multiple (i.e. more than once) times (the default event is  
where the session objects are being instantiated), even when an event  
is defined, so I'm confused here.  I am using Apache on the dev laptop  
and staging server and this was a brand new install of both Apache and  
ColdFusion on the stage server, so when I first noticed this problem I  
also realized that we forgot to set index.cfm as the directory index  
in the apache httpd.conf file. We then set index.cfm as the directory  
index thinking that would resolve the problem but no such luck.  
Perhaps there is something else to look at on the web server? The  
development web server uses named virtual hosts, and the root  
directory for the application has the same name on both development  
and stage. All application files (model, view, controller) are stored  
outside the web root with only index.cfm and Application.cfm in the  
web root.

The staging server does not use SSL but the production server will.

The setdomaincookies attribute of the cfapplication tag is not defined.

I have the views set to not cache using the following:



There is no usage of cfcookie.

Again, many thanks for trying to help.

Nate


Quoting Jon Clausen <[EMAIL PROTECTED]>:

> Nate,
>
> I don't think it's a Model Glue related issue based on the browser-
> specific issues you are encountering.At first blush it sounds
> like a Web Server configuration issue or maybe something with the
> handling of cfide/cftoken variables.  Are you using SSL at all on the
> staging server?  There are some caching differences between IE
> and the others with SSL.
>
> IMHO it may be an issue with your client and/or session variables in
> general, if the application is re-creating the session (thereby re-
> instantiating your objects), have you checked the following:
>
>   - cfapplication tag has setdomaincookies="false". If you have this
> as false, it might explain the problem since the CF token cookies are
> being set and CF can't follow the user properly.If you're
> development domain is "localhost", you sometimes won't notice these
> differences until you move it to a remote machine.
>
> - usage of CFCookie  for any variables which CF would normally
> handle.  If CFCookie was used to set or override variables that were
> handled by CF, the writing of these variables may be causing
> overwriting of session ids as well.
>
> IE tends to be a bit fussier in allowing the webserver to do multiple
> writes per request on cookies so you may not be seeing the issues in
> IE because of this.
>
> HTH,
>
> Jon
>
> P.S. - There is one Model Glue related thing I can think of:is
> the directory name for the root of your project different on the
> staging server from your development machine?   MG (Unity at least
> and I believe 1.1 as well) uses that directory name to set it's
> "application[ModelGlue_APP_KEY].framework" variables by default.
> If your application uses that Struct Key at all, it could be that  MG
> can't find the key correctly on concurrent requests re-instantiates
> some objects.   Seems like that would throw CFErrors in most cases I
> can think of, but it's worth a look...
>
>
> On May 1, 2007, at 3:52 PM, Nate Petersen wrote:
>
>> Hello all,
>>
>> I posted this previously to the model-glue site's message board and
>> also to the model-glue list here and didn't get any action, so I
>> hope someone here can help.
>>
>> So after working for the last couple months on my first Model-Glue
>> application, I
>> finally have it ready for some wider-scale testing. So I move the
>> code from my
>> development machine (windows laptop, where the application is
>> running smoothly and completely as expected on both FireFox and
>> IE), to my staging server (sun solaris box) where things start to
>> go south a bit. When testing the application from the staging
>> server it runs smoothly and as expected using IE, but in Firefox
>> (and Safari) it's not so smooth. The default event which
>> initializes several objects in the session scope appears to be
>> running multiple times on every other event/request (according to
>> the Model-Glue debug output), therefore effectively killing and re-
>> initializing the session based objects on each request! I am
>> pulling my hair out on this one... I can't understand why it's
>> isolated to Firefox/Safari when coming from the staging server. I
>> have tested with 3 different machines (two PC's and one Mac) and
>> all yield the same crazy results when running the application from
>> the staging server in Firefox or Safari. The only significant
>> difference between servers (aside from the fact that it is moving
>> from Windows to Unix) is that the staging server is running CF 7.02
>> and the laptop is running CF 7. I am using Model-Glue 1.1. Can
>> anyo

Handling "Marketing URLs"

2006-09-28 Thread npetersn
This may be somewhat off topic but...

I am trying to figure out the best way to handle "marketing URLs", or URLs
like: www.domain.com/easytoremember where easytoremember doesen't exist as a
directory on the server.
Would it be recommended to use a special 404 error handler on the server, URL
rewrites or something else?
I have tried defining a .cfm file as a 404 error handler in which I tried to
parse out the requested URL as entered into the browser using cgi.request_uri
(apache), but it only provides me with the path of the error handler itself.
I am using CFMX 7/apache/solaris.

Thanks,

Nate

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

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


Populating multiple structs with form field data

2004-04-21 Thread npetersn
A while back there was a thread that discussed the best way to create
variables from a form submission.

So instead of using a bunch of individual if statements like so:


  


  


It was suggested that one would use the following:



And that works really well, but I was wondering if it is possible to use
this method of creating variables to populate different structs...

So on a single form page I have something like this:







And on the action page instead of the following code, is it possible to use
something like the above mentioned cfset with the duplicate function??


  


  



  


  


Thanks in advance for any suggestions you may have.

Nate
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: help needed with variables, loops, and multi-step forms

2004-04-14 Thread npetersn
Thanks Raymond.

Nate

Quoting Raymond Camden <[EMAIL PROTECTED]>:

> Use
> 
> 	value="#variables.stPeople['stPerson#i#'].firstname#"
> 
> -Raymond Camden
> 
> 
> >   variables.numPeople = 3;
> > 
> >   variables.stPeople = structNew();
> > 
> >   for (i=1; i LTE variables.numPeople; i=i+1) {
> > variables.stPeople['stPerson' & i] = structNew();
> > variables.stPeople['stPerson' & i]['firstName'] = "";
> > variables.stPeople['stPerson' & i]['lastName'] = "";
> >   }
> > 
> > 
> > 
> > Based on the numPeople value I want to dispaly as many sets 
> > of form fields for a user to fill in as follows:
> > 
> > 
> >   
> > 
> >   
> >   
> > 
> >   
> > 
> > 
> > So my question is how do I populate the value attribute of 
> > the form fields that are created in a loop with the initial 
> > empty variables that were also created in a loop? Basically I 
> > want the value attribute of the form fields to be 
> > value="#variables.stPeople.stPerson1.firstName#" and the 
> > stPerson1 changes numbers as the loop increments. Is it just 
> > a matter of using the proper syntax? If so I am missing it completely.
> > 
> > Hopefully I have expressed myself clearly!
> > 
> > Thanks,
> > 
> > Nate
> > 
> > 
> > 
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




help needed with variables, loops, and multi-step forms

2004-04-14 Thread npetersn
Please bear with me as this is the first time I have attempted this.

I am creating variables that will be used as initial empty values for form
fields in a multi-step process. I am creating the variables as follows:



  variables.numPeople = 3;

  variables.stPeople = structNew();

  for (i=1; i LTE variables.numPeople; i=i+1) {
    variables.stPeople['stPerson' & i] = structNew();
    variables.stPeople['stPerson' & i]['firstName'] = "";
    variables.stPeople['stPerson' & i]['lastName'] = "";
  }



Based on the numPeople value I want to dispaly as many sets of form fields
for a user to fill in as follows:


  
    
  
  
    
  


So my question is how do I populate the value attribute of the form fields
that are created in a loop with the initial empty variables that were also
created in a loop? Basically I want the value attribute of the form fields
to be value="#variables.stPeople.stPerson1.firstName#" and the stPerson1
changes numbers as the loop increments. Is it just a matter of using the
proper syntax? If so I am missing it completely.

Hopefully I have expressed myself clearly!

Thanks,

Nate
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: cfform and the onsubmit event

2004-03-08 Thread npetersn
Thanks!

Nate

Quoting [EMAIL PROTECTED]:

> check out the docs
>
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p38.htm#wp2433198
> there is a attribute of cffor called onsubmit you can use
> onSubmit
> 	Optional
> 	 
> 	
> _javascript_ function to execute after input validation. Use for
> preprocessing data before form is submitted. See Developing ColdFusion MX
> Applications.
>  
> HTH!!!
>  
> Doug
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 08, 2004 3:09 PM
> To: CF-Talk
> Subject: cfform and the onsubmit event
> 
> 
> When using cfform is it possible to use additional _javascript_ function
> calls
> in the onsubmit attribute since cfform automatically puts in something
> like
>  _CF_checkFormName(this)"? If it is possible what would
> be
> the best way to do it?
> 
> Thanks,
> 
> Nate 
>   _  
> 
> 
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




cfform and the onsubmit event

2004-03-08 Thread npetersn
When using cfform is it possible to use additional _javascript_ function calls
in the onsubmit attribute since cfform automatically puts in something like
 _CF_checkFormName(this)"? If it is possible what would be
the best way to do it?

Thanks,

Nate
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




cfinput and event handlers

2004-01-22 Thread npetersn
Is it possible for different event handlers (onblur, onkeyup etc.) to work
with the cfinput tag? For instance I have a _javascript_ function that
automatically formats a phone or social secrutity number using the onkeyup
event handler. Or is it possible to do this with the
validate="regular_expression" attribute of the cfinput tag?

Thanks,

Nate
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: cflocation and urlSessionFormat()

2004-01-09 Thread npetersn
Peter,

Thanks for your reply. I'll give your suggestion a try, but I also wanted to
ask regarding the getPageContext().forward() function. I have heard/read
very little on this and I am no java expert so tell me if I am way off
base, but would the following work?

getPageContext().forward(urlSessionFormat("view_application.cfm"));

Thanks,

Nate

Quoting Peter Tilbrook <[EMAIL PROTECTED]>:

> You answered your own question by saying "no" to the addtoken attribute.
> 
> Make your life easier with:
> 
> 
> 
> Remember that because CFLOCATION changes the headers cookies are not set
> on
> the page containing a CFLOCATION. Annoying but true.
> Peter Tilbrook
> ColdFusion Applications Developer
> ColdGen Internet Solutions
> Manager, ACT and Region ColdFusion Users Group - http://www.actcfug.com
> 4/73 Tharwa Road
> Queanbeyan, NSW, 2620
> AUSTRALIA
> 
> Telephone: +61-2-6284-2727
> Mobile: +61-0439-401-823
> E-mail: [EMAIL PROTECTED]
> 
> \¯\/¯/ |¯|)¯) /¯/\¯\ \¯\/¯/
> /_/\_\ |_|)_) \_\/_/ /_/\_\ RULES
> 
>   -Original Message-
>   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>   Sent: Saturday, 10 January 2004 8:59 AM
>   To: CF-Talk
>   Subject: cflocation and urlSessionFormat()
> 
> 
>   Has anyone ever run into problems when using the urlSessionFormat()
> function
>   inside the url attribute of the cflocation tag? When I use the
> following
>   code with cookies disabled on the browser I get two (J2EE sessions are
>   enabled in cf administrator) jsessionid's in the URL and the whole
>   application gets screwed up...
> 
>   
> 
>   Even when I set the addtoken attribute to "no" with cookies disabled
> the
>   application does not function properly.
> 
>   Any insight would be appreciated.
> 
>   Nate
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




cflocation and urlSessionFormat()

2004-01-09 Thread npetersn
Has anyone ever run into problems when using the urlSessionFormat() function
inside the url attribute of the cflocation tag? When I use the following
code with cookies disabled on the browser I get two (J2EE sessions are
enabled in cf administrator) jsessionid's in the URL and the whole
application gets screwed up...



Even when I set the addtoken attribute to "no" with cookies disabled the
application does not function properly.

Any insight would be appreciated.

Nate
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Problems with Oracle sequence in a CFC

2003-11-06 Thread npetersn
I've been stuck on this for a good portion of the day, and I'm completely frustrated.

I have written the following function that calls an Oracle sequence:


  
    SELECT ESERVICES.CGI_ID_SEQ.NEXTVAL as newID
    FROM DUAL
  
  


To test whether the above function works I placed it in a regular .cfm file and called it within the same file as follows:



No problems.

When I take the same function and place it in a cfc as a private method and call it from within another setter function in the same cfc...


  

  
  
  


It fails with the following error "Element newID is undefined in qGetNewID."

Anyone have any idea what I am doing wrong?

Thanks,

Nate
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: I need some enlightenment...

2003-10-24 Thread npetersn
Thanks everyone for all your suggestions, I got the results I needed now.

Nate

Quoting [EMAIL PROTECTED], [EMAIL PROTECTED]:

> I still consider myself to be somewhat inexperienced when it comes to 
> creating/using complex data types, so please forgive my ignorance.
> 
> In the following bit of code:
> 
> 
>   for (i=1; i LTE 4; i = i+1) {
> variables.testStruct[i] = structNew();
>   }
> 
> 
> 
> 
> I expected it to create four separate structures within the variables 
> scope/structure, i.e. variables.testStruct1, variables.testStruct2, 
> variables.testStruct3, variables.testStruct4
> 
> instead it creates a structure of structures, i.e.
> variables.testStruct.1, 
> variables.testStruct.2, variables.testStruct.3, variables.testStruct.4
> 
> Can someone please explain to me what I am missing?
> 
> Thanks,
> 
> Nate
> 
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: I need some enlightenment...

2003-10-24 Thread npetersn
Sandy,

I tried your code and replaced the brackets around the i with pound signs 
and I got an error.

Thanks for the suggestion,

Nate

Quoting Sandy Clark <[EMAIL PROTECTED]>:

>  
> 
>   for (i=1; i LTE 4; i = i+1) {
> variables.testStruct#i#= structNew();
>   }
> 
> 
>   _  
> 
> From: [EMAIL PROTECTED] [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] 
> Sent: Friday, October 24, 2003 1:54 PM
> To: CF-Talk
> Subject: I need some enlightenment...
> 
> 
> I still consider myself to be somewhat inexperienced when it comes to 
> creating/using complex data types, so please forgive my ignorance.
> 
> In the following bit of code:
> 
> 
>   for (i=1; i LTE 4; i = i+1) {
> variables.testStruct[i] = structNew();
>   }
> 
> 
> 
> 
> I expected it to create four separate structures within the variables 
> scope/structure, i.e. variables.testStruct1, variables.testStruct2, 
> variables.testStruct3, variables.testStruct4
> 
> instead it creates a structure of structures, i.e.
> variables.testStruct.1, 
> variables.testStruct.2, variables.testStruct.3, variables.testStruct.4
> 
> Can someone please explain to me what I am missing?
> 
> Thanks,
> 
> Nate 
>   _  
> 
> 
> 
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




I need some enlightenment...

2003-10-24 Thread npetersn
I still consider myself to be somewhat inexperienced when it comes to 
creating/using complex data types, so please forgive my ignorance.

In the following bit of code:


  for (i=1; i LTE 4; i = i+1) {
    variables.testStruct[i] = structNew();
  }




I expected it to create four separate structures within the variables 
scope/structure, i.e. variables.testStruct1, variables.testStruct2, 
variables.testStruct3, variables.testStruct4

instead it creates a structure of structures, i.e. variables.testStruct.1, 
variables.testStruct.2, variables.testStruct.3, variables.testStruct.4

Can someone please explain to me what I am missing?

Thanks,

Nate
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Anybody have Discovering CFCs by Hal Helms?

2003-03-19 Thread npetersn
I just finished reading this book today, and for me it was exactly what I needed to 
answer alot of my questions regarding CFC's and basic OO concepts, as well as starting 
me on the path of creating CFC based applications.

A point that Hal Helms brought out in this book on page 153 in paragraph 345 has to do 
with a CFC bug that prevents output from a CFC method in a shared scope variable when 
you call the method more than once. Does anyone know the status of this bug? I scanned 
the release notes for the CFMX updater 3 that was released today and saw no mention of 
it.
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



CF based financial calculators

2003-02-14 Thread npetersn
I would like to see it, please send it to me.
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4