URL Parameters:
categoryid = 2
categoryitemid = 117
So, the parameters should be getting to the add function, right?
I'm passing the parameters from the category-items/create.
Here's the relevant code:
<cfset redirectTo(action="add", controller ="projectItems", params = "categoryId = #categoryItem.categoryId#&categoryItemId = #categoryItem.Id#")>
Here's the relevant page results:
http://localhost:8500/slotc/index.cfm/project-items/add?categoryid = 2&categoryitemid = 117
Element CATEGORYID is undefined in PARAMS.
The error occurred in /Applications/ColdFusion9/wwwroot/slotc/controllers/ProjectItems.cfc: line 4
Called from /Applications/ColdFusion9/wwwroot/slotc/wheels/global/cfml.cfm: line 130
Called from /Applications/ColdFusion9/wwwroot/slotc/wheels/dispatch/request.cfm: line 381
Called from /Applications/ColdFusion9/wwwroot/slotc/wheels/dispatch/request.cfm: line 348
Called from /Applications/ColdFusion9/wwwroot/slotc/wheels/index.cfm: line 1
Called from /Applications/ColdFusion9/wwwroot/slotc/index.cfm: line 1
Called from /Applications/ColdFusion9/wwwroot/slotc/wheels/events/onrequest.cfm: line 1
2 : <cffunction name="add" output="false">
3 : <cfset projectItem = model("projectItem").new()>
4 : <cfdump var="#params.categoryid#"> <cfabort>
5 :
6 : <cfset projects = model("project").findAllByCategoryId(params.categoryid)>
Thanks for any enlightenment!
--Sam Singer
<cfdump var="#params#"><cfabort>
On Feb 17, 9:32 am, Sam Singer <samsinge...@gmail.com> wrote:
> Sorry for being a pest, CFWheels is just too much cool. I gotta make it
> work!
>
> I'm passing parameters from category-items/add to project-items/add.
>
> The parameters aren't getting to the add function in the project-items
> controller. Yet, at the bottom of the project-items/add page in debug I
> find:
>
> *URL Parameters:*
> categoryid = 2
> categoryitemid = 117
>
> So, the parameters should be getting to the add function, right?
>
> I'm passing the parameters from the category-items/create.
> Here's the relevant code:
>
> <cfset redirectTo(action="add", controller ="projectItems", params =
> "categoryId = #categoryItem.categoryId#&categoryItemId =
> #categoryItem.Id#")>
>
> *Here's the relevant page results:
>
> http://localhost:8500/slotc/index.cfm/project-items/add?categoryid=
> 2&categoryitemid = 117
> *
> Element CATEGORYID is undefined in PARAMS.
>
> The error occurred in
> /Applications/ColdFusion9/wwwroot/slotc/controllers/ProjectItems.cfc:
> line 4
> Called from /Applications/ColdFusion9/wwwroot/slotc/wheels/global/cfml.cfm:
> line 130
> Called from /Applications/ColdFusion9/wwwroot/slotc/wheels/dispatch/request.cfm:
> line 381
> Called from /Applications/ColdFusion9/wwwroot/slotc/wheels/dispatch/request.cfm:
> line 348
> Called from /Applications/ColdFusion9/wwwroot/slotc/wheels/index.cfm: line 1
> Called from /Applications/ColdFusion9/wwwroot/slotc/index.cfm: line 1
> Called from /Applications/ColdFusion9/wwwroot/slotc/wheels/events/onrequest.cfm:
> line 1
>
> 2 : <cffunction name="add" output="false">
> 3 : <cfset projectItem = model("projectItem").new()>
> 4 : *<cfdump var="#params.categoryid#"> <cfabort>*
--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To post to this group, send email to cfwh...@googlegroups.com.
To unsubscribe from this group, send email to cfwheels+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cfwheels?hl=en.
On Wed, Feb 17, 2010 at 5:26 PM, John C. Bland II