unhandledPaths - using partial paths?

39 views
Skip to first unread message

Russ Johnson

unread,
May 1, 2012, 4:07:04 PM5/1/12
to framew...@googlegroups.com
Playing around with the idea of trying to integrate FW/1 into a legacy app we have and Im running into an issue with unhandledPaths. We use the root index.cfm as a sort of front controller for the app. Thats the way it was written years ago so we are stuck with it for now. Currently the url scheme uses a variable name 'disk' to tell the app what section to load so the urls look something like:

index.cfm?disp=login

My question is can you pass in a partial url to match against in unhandledPaths somehow? I can't begin to try and match all of the urls in this app exactly. What about wildcards in the url patterns?

Thanks in advance!


Russ Johnson
@russ_johnson
ru...@angry-fly.com
www.angry-fly.com


 

Chris Blackwell

unread,
May 4, 2012, 3:46:47 AM5/4/12
to framew...@googlegroups.com
this is just an uneducated guess but couldn't you do this in onRequestStart? 
fw/1 does its magic in its onRequestStart method, so you could override in your Application.cfc and then choose whether or not to invoke fw/1

Application.cfc
function onRequestStart() {
  // this is a legacy app call
  if(somePatternMatches) {
  }
  // invoke fw/1 request
  else {
    super.onRequestStart(argumentcollection=arguments);
  }
}

Chris

--
FW/1 on RIAForge: http://fw1.riaforge.org/
 
FW/1 on github: http://github.com/seancorfield/fw1
 
FW/1 on Google Groups: http://groups.google.com/group/framework-one

image001.gif

Russ Johnson

unread,
May 8, 2012, 6:09:57 PM5/8/12
to framew...@googlegroups.com
I have tried this approach but on requests that do not invoke the framework this way, I get errors constantly about certain framework vars being undefined.


Russ Johnson
@russ_johnson
ru...@angry-fly.com
www.angry-fly.com


 

On May 4, 2012, at 3:46 AM, Chris Blackwell wrote:

this is just an uneducated guess but couldn't you do this in onRequestStart? 
fw/1 does its magic in its onRequestStart method, so you could override in your Application.cfc and then choose whether or not to invoke fw/1

Application.cfc
function onRequestStart() {
  // this is a legacy app call
  if(somePatternMatches) {
  }
  // invoke fw/1 request
  else {
    super.onRequestStart(argumentcollection=arguments);
  }
}

Chris

On 1 May 2012 21:07, Russ Johnson <ru...@angry-fly.com> wrote:
Playing around with the idea of trying to integrate FW/1 into a legacy app we have and Im running into an issue with unhandledPaths. We use the root index.cfm as a sort of front controller for the app. Thats the way it was written years ago so we are stuck with it for now. Currently the url scheme uses a variable name 'disk' to tell the app what section to load so the urls look something like:

index.cfm?disp=login

My question is can you pass in a partial url to match against in unhandledPaths somehow? I can't begin to try and match all of the urls in this app exactly. What about wildcards in the url patterns?

Thanks in advance!


Russ Johnson
@russ_johnson
ru...@angry-fly.com
www.angry-fly.com

<image001.gif>
 


--
FW/1 on RIAForge: http://fw1.riaforge.org/
 
FW/1 on github: http://github.com/seancorfield/fw1
 
FW/1 on Google Groups: http://groups.google.com/group/framework-one
Reply all
Reply to author
Forward
0 new messages