URL Route problem

17 views
Skip to first unread message

at

unread,
Feb 4, 2012, 9:23:44 AM2/4/12
to framework-one
Hi,

If I add this route [ {"/userList" = "/user/list"}] to fw/1, it will
cause onRequestStart to be executed twice. Am I using the routes
incorrectly? Is this a bug?

I tested the bug against the userManager app that is included in the
example of fw/1 apps using the line debugger to verify that
onRequestStart was called twice.

Any guidance would be greatly appreciated.

thank you

anthony

application.cfc

<cfcomponent extends="org.corfield.framework">

<cfscript>
this.mappings["/userManager"] =
getDirectoryFromPath(getCurrentTemplatePath());
this.name = 'fw1-userManager';

// FW/1 - configuration:
variables.framework = {
home = "user.default",
suppressImplicitService = false,
routes = [ {"/userList" = "/user/list"}]
};

function setupApplication()
{
setBeanFactory(createObject("component",
"model.ObjectFactory").init(expandPath("./assets/config/
beans.xml.cfm")));
}
</cfscript>

</cfcomponent>

layouts/default.cfm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>User Manager</title>
<link rel="stylesheet" type="text/css" href="assets/css/styles.css" />
</head>
<body>

<div id="container">

<h1>User Manager</h1>

<ul class="nav horizontal clear">
<li><a href="index.cfm">Home</a></li>
<li><a href="index.cfm/userList" title="View the list of
users">Users</a></li>
<li><a href="index.cfm?action=user.form" title="Fill out form to add
new user">Add User</a></li>
<li><a href="index.cfm?reload=true" title="Resets framework
cache">Reload</a></li>
</ul>

<br />

<div id="primary">
<cfoutput>#body#</cfoutput>
</div>

</div>

</body>
</html>
Reply all
Reply to author
Forward
0 new messages