RE: [cfaussie] Re: Catching cfcomponent extends errors

2011-06-09 Thread charlie arehart
AJ, I think Kai and Mark may have been on the right track: with CFERROR
(which would typically be setup at the application level, in
application.cfm) or the onerror method of application.cfc, I'm pretty sure
those COULD catch the fact that the code in your requested page had a
compile-time error. Not able to setup a test at the moment. Let us know if
it helps. 

And sure, the site-wide error would work, as well, but I realize you want
finer control. Besides these being application-level, you can even (within
the error handler) look for specific errors and handle them individually.

Hope that's helpful.

/charlie


 -Original Message-
 From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On
 Behalf Of AJ Dyka
 Sent: Tuesday, June 07, 2011 10:00 PM
 To: cfaussie
 Subject: [cfaussie] Re: Catching cfcomponent extends errors
 
 True, however I want to fix the mapping not just hide the error ...
 perhaps I can write my own error template which checks the mappings
 and fixes them if they're missing? That could work for me ...
 
 On Jun 8, 11:05 am, MrBuzzy mrbu...@gmail.com wrote:
  But using a global error handler will enable you to not show the
 error on-screen.
 
 --
 You received this message because you are subscribed to the Google
 Groups cfaussie group.
 To post to this group, send email to cfaussie@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Re: Catching cfcomponent extends errors

2011-06-09 Thread Sean Corfield
On Thu, Jun 9, 2011 at 10:13 AM, charlie arehart
charlie_li...@carehart.org wrote:
 AJ, I think Kai and Mark may have been on the right track: with CFERROR
 (which would typically be setup at the application level, in
 application.cfm) or the onerror method of application.cfc, I'm pretty sure
 those COULD catch the fact that the code in your requested page had a
 compile-time error. Not able to setup a test at the moment. Let us know if
 it helps.

If the problem is an Application.cfc that extends a mapped CFC without
the mapping in place, then no other code has executed so nothing can
call cferror to set up a handler and onError() won't apply because
Application.cfc can't even be compiled.

The *only* possible handler for a bad extends= on Application.cfc is
the global handler in the admin AFAIK (and at that point I don't think
you can do much by way of recovery?).
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] Re: Catching cfcomponent extends errors

2011-06-09 Thread charlie arehart
Ah, I missed that it was in application.cfc itself. My bad. Sorry.

/charlie


 -Original Message-
 From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On
 Behalf Of Sean Corfield
 Sent: Thursday, June 09, 2011 4:42 PM
 To: cfaussie@googlegroups.com
 Subject: Re: [cfaussie] Re: Catching cfcomponent extends errors
 
 On Thu, Jun 9, 2011 at 10:13 AM, charlie arehart
 charlie_li...@carehart.org wrote:
  AJ, I think Kai and Mark may have been on the right track: with
 CFERROR
  (which would typically be setup at the application level, in
  application.cfm) or the onerror method of application.cfc, I'm pretty
 sure
  those COULD catch the fact that the code in your requested page had a
  compile-time error. Not able to setup a test at the moment. Let us
 know if
  it helps.
 
 If the problem is an Application.cfc that extends a mapped CFC without
 the mapping in place, then no other code has executed so nothing can
 call cferror to set up a handler and onError() won't apply because
 Application.cfc can't even be compiled.
 
 The *only* possible handler for a bad extends= on Application.cfc is
 the global handler in the admin AFAIK (and at that point I don't think
 you can do much by way of recovery?).
 --
 Sean A Corfield -- (904) 302-SEAN


-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] ColdFusion Online Test / Exam

2011-06-09 Thread charlie arehart
Harry, did this help?

/charlie


 -Original Message-
 From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On
 Behalf Of charlie arehart
 Sent: Monday, May 30, 2011 11:55 AM
 To: cfaussie@googlegroups.com
 Subject: RE: [cfaussie] ColdFusion Online Test / Exam
 
 See some options at http://www.cf411.com/#certprep
 
 /charlie
 
 
  -Original Message-
  From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On
  Behalf Of Harry Patel
  Sent: Sunday, May 29, 2011 9:38 PM
  To: cfaussie
  Subject: [cfaussie] ColdFusion Online Test / Exam
 
  Hi there,
 
  Can anyone please help to find out FREE online websites to perform
  ColdFusion online test?
  I like to do some practices since I am required to do that.
 
  It will be your great help!
 
  Thanks,
  Harry
 
  --
  You received this message because you are subscribed to the Google
  Groups cfaussie group.
  To post to this group, send email to cfaussie@googlegroups.com.
  To unsubscribe from this group, send email to
  cfaussie+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/cfaussie?hl=en.
 
 
 --
 You received this message because you are subscribed to the Google
 Groups cfaussie group.
 To post to this group, send email to cfaussie@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



[cfaussie] cfloop inside a cfif tag

2011-06-09 Thread raiola
Hi

 

I am building an online application form and the last page testes for which
fields across the multi pages of the application form

 

As the application form allows for multiple applicants some of the mandatory
fields only need to be checked dependant on whether there are more than one
applicant entered into the form

 

Each page of the application form captures the data entered and saves the
data into session variables to allow for the values entered across the
application form to remain present as the applicant moves through the
various pages of the application form .

 

If there is a second applicant loaded then session variables relating to the
seconds applicants data are defined

 

eg session.applicant2_firstname, session.applicant2_familyname

 

One the last page I test form mandatory fields with code similar to

 

cfif

 

cfloop index=-i from 1 to #total_applicants#

session.applicant#i#_firstname eq '' or session.applicant#i#_familyname eq
''/cfloop 

 

or #loan_amount# eq ''

 

mandatory fields are missing

 

/cfif

 

I need to be abel to perform a cfloop within the cfif statement so that the
mandatory fields relating to the 2nd. 3rd or 4th applicants are only tested
for when the value for total_applicants is 2,3 or 4

 

I trust the above makes sense

 

I look forward to your suggestion to achieve the above 

 

 

 

 

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



RE: [cfaussie] cfloop inside a cfif tag

2011-06-09 Thread Adam Chapman
How about this..

cfloop index=i from=1 to=#total_applicants#
  cfif session[applicant#i#_firstname] eq '' or 
session[applicant#i#_familyname] eq '' or form.loan_amount eq ''
mandatory fields are missing
  /cfif
/cfloop

From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of 
rai...@ozemail.com.au
Sent: Friday, 10 June 2011 10:08 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] cfloop inside a cfif tag

Hi

I am building an online application form and the last page testes for which 
fields across the multi pages of the application form

As the application form allows for multiple applicants some of the mandatory 
fields only need to be checked dependant on whether there are more than one 
applicant entered into the form

Each page of the application form captures the data entered and saves the data 
into session variables to allow for the values entered across the application 
form to remain present as the applicant moves through the various pages of the 
application form .

If there is a second applicant loaded then session variables relating to the 
seconds applicants data are defined

eg session.applicant2_firstname, session.applicant2_familyname

One the last page I test form mandatory fields with code similar to

cfif

cfloop index=-i from 1 to #total_applicants#
session.applicant#i#_firstname eq '' or session.applicant#i#_familyname eq 
''/cfloop

or #loan_amount# eq ''

mandatory fields are missing

/cfif

I need to be abel to perform a cfloop within the cfif statement so that the 
mandatory fields relating to the 2nd. 3rd or 4th applicants are only tested for 
when the value for total_applicants is 2,3 or 4

I trust the above makes sense

I look forward to your suggestion to achieve the above




--
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to 
cfaussie@googlegroups.commailto:cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.commailto:cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] cfloop inside a cfif tag

2011-06-09 Thread Kai Koenig
You could certainly achieve this with the naming convention you went for, but 
it's messy. I'd rather rework the data structure with your session

session.applicants = ArrayNew(1);
session.applicants[1] = StructNew();
session.applicants[1][firstName] = Kai;
session.applicants[1][lastName] = Koenig;
...
session.applicants[2] = StructNew();
session.applicants[2][firstName] = Mark;
session.applicants[2][lastName] = Mandel;
...

Depending on how you create the structure and what exactly you do to populate 
fields in your data structure, you could for instance check

cfloop array=#session.applicants# index=applicant

cfif Len(applicant[firstName]) or ... 

/cfif

/cfloop


Multiple benefits:

- Much better datastructure in your session scope instead of gazillion 
individual variables
- Less string manipulation and # signs in your loops


Cheers
Kai

--
Kai Koenig - Ventego Creative Ltd
ph: +64 4 476 6781 - mob: +64 21 928 365 /  +61 435 263 414
web: http://www.ventego-creative.co.nz
blog: http://www.bloginblack.de
twitter: http://www.twitter.com/agentK
--

 Hi
  
 I am building an online application form and the last page testes for which 
 fields across the multi pages of the application form
  
 As the application form allows for multiple applicants some of the mandatory 
 fields only need to be checked dependant on whether there are more than one 
 applicant entered into the form
  
 Each page of the application form captures the data entered and saves the 
 data into session variables to allow for the values entered across the 
 application form to remain present as the applicant moves through the various 
 pages of the application form .
  
 If there is a second applicant loaded then session variables relating to the 
 seconds applicants data are defined
  
 eg session.applicant2_firstname, session.applicant2_familyname
  
 One the last page I test form mandatory fields with code similar to
  
 cfif
  
 cfloop index=-i from 1 to #total_applicants#
 session.applicant#i#_firstname eq '' or session.applicant#i#_familyname eq 
 ''/cfloop
  
 or #loan_amount# eq ''
  
 mandatory fields are missing
  
 /cfif
  
 I need to be abel to perform a cfloop within the cfif statement so that the 
 mandatory fields relating to the 2nd. 3rd or 4th applicants are only tested 
 for when the value for total_applicants is 2,3 or 4
  
 I trust the above makes sense
  
 I look forward to your suggestion to achieve the above
  
  
  









-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



[cfaussie] Cfaussie] cfloop inside a cfif tag

2011-06-09 Thread raiola
Hi,

 

I need to have the cfloop inside the cfif not the other way

 

so that all session variables  that are mandatory are tested to have a
value.

 

 

 

cfif

 

cfloop index=-i from 1 to #total_applicants#

session.applicant#i#_firstname eq '' or 

session.applicant#i#_familyname eq ''

/cfloop or #loan_amount# eq ''

 

mandatory fields are missing

 

cfloop index=-i from 1 to #total_applicants#

cfif  session.applicant#i#_firstname eq ''a href=page1.cfm?fielsdname=
applicant#i#_firstname Applicant #i# First Name Missing/a /cfif

cfif  session.applicant#i#_firstllastname eq ''a
href=page1.cfm?fielsdname= applicant#i#_firstname Applicant #i# First
Name Missing/a /cfif

/cfloop

 

 

 cfelse

 

 

All Mandatory fields are present SUBMIT APPLICATION

 

 

/cfif

 

 

 

Regards

Claude Raiola (B.Econ Acc; B.Hot. Mngt)
Samaris Software
Email: i...@samaris.net mailto:i...@trackingcentral.om.au 
Website: www.SAMARIS.net http://www.TrackingCentral.com.au 
Mobile: 0414 228 948

 

From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf
Of Kai Koenig
Sent: Friday, 10 June 2011 10:22 AM
To: cfaussie@googlegroups.com
Subject: Re: [cfaussie] cfloop inside a cfif tag

 

You could certainly achieve this with the naming convention you went for,
but it's messy. I'd rather rework the data structure with your session

 

session.applicants = ArrayNew(1);

session.applicants[1] = StructNew();

session.applicants[1][firstName] = Kai;

session.applicants[1][lastName] = Koenig;

...

session.applicants[2] = StructNew();

session.applicants[2][firstName] = Mark;

session.applicants[2][lastName] = Mandel;

...

 

Depending on how you create the structure and what exactly you do to
populate fields in your data structure, you could for instance check

 

cfloop array=#session.applicants# index=applicant

 

cfif Len(applicant[firstName]) or ... 

 

/cfif

 

/cfloop

 

 

Multiple benefits:

 

- Much better datastructure in your session scope instead of gazillion
individual variables

- Less string manipulation and # signs in your loops

 

 

Cheers

Kai

 

--

Kai Koenig - Ventego Creative Ltd

ph: +64 4 476 6781 - mob: +64 21 928 365 /  +61 435 263 414

web: http://www.ventego-creative.co.nz

blog: http://www.bloginblack.de

twitter: http://www.twitter.com/agentK

--

 

Hi

 

I am building an online application form and the last page testes for which
fields across the multi pages of the application form

 

As the application form allows for multiple applicants some of the mandatory
fields only need to be checked dependant on whether there are more than one
applicant entered into the form

 

Each page of the application form captures the data entered and saves the
data into session variables to allow for the values entered across the
application form to remain present as the applicant moves through the
various pages of the application form .

 

If there is a second applicant loaded then session variables relating to the
seconds applicants data are defined

 

eg session.applicant2_firstname, session.applicant2_familyname

 

One the last page I test form mandatory fields with code similar to

 

cfif

 

cfloop index=-i from 1 to #total_applicants#

session.applicant#i#_firstname eq '' or session.applicant#i#_familyname eq
''/cfloop

 

or #loan_amount# eq ''

 

mandatory fields are missing

 

/cfif

 

I need to be abel to perform a cfloop within the cfif statement so that the
mandatory fields relating to the 2nd. 3rd or 4th applicants are only tested
for when the value for total_applicants is 2,3 or 4

 

I trust the above makes sense

 

I look forward to your suggestion to achieve the above

 

 

 

 

 

 

 

 

 

 

-- 
You received this message because you are subscribed to the Google Groups
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/cfaussie?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Dynamic function calls

2011-06-09 Thread Blair McKenzie
As far as I'm aware you need to use cfinvoke ... method=get#VarName#


Blair

On Fri, Jun 10, 2011 at 2:11 PM, Steve Onnis st...@cfcentral.com.au wrote:



 I am trying to achieve this... (which i can do in other languages)



 Component[“get#VarName#”]()



 Though CF is throwing an error.  Is this possible at all or do i have to
 use Evaluate(“Component.get#VarName#()”)





 Steve

 --
 You received this message because you are subscribed to the Google Groups
 cfaussie group.
 To post to this group, send email to cfaussie@googlegroups.com.
 To unsubscribe from this group, send email to
 cfaussie+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/cfaussie?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.



Re: [cfaussie] Dynamic function calls

2011-06-09 Thread Sean Corfield
On Thu, Jun 9, 2011 at 9:11 PM, Steve Onnis st...@cfcentral.com.au wrote:
 I am trying to achieve this... (which i can do in other languages)

 Component[“get#VarName#”]()

 Though CF is throwing an error.  Is this possible at all or do i have to use
 Evaluate(“Component.get#VarName#()”)

The CFML Advisory Committee were unanimous that this _should_ work -
and it's worked for a long time in Railo (and OpenBD I believe) but it
hasn't yet made it into a release of Adobe ColdFusion (hopefully it'll
be in CF X?).
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.