Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- controllers/Users.cfc
- <cfcomponent extends="Controller">
- <cffunction name="new">
- <cfset user = model("user").new()>
- </cffunction>
- </cfcomponent>
- views/users/new.cfm
- <cfoutput>
- <h1>Create a New User</h1>
- #startFormTag(action="create")#
- <div>#textField(objectName="user", property="name", label="Name")#</div>
- <div>#textField(objectName="user", property="email", label="Email")#</div>
- <div>#passwordField(objectName="user", property="password", label="Password")#</div>
- <div>#submitTag()#</div>
- #endFormTag()#
- </cfoutput>
- config/settings.cfm
- <cfscript>
- /*
- If you leave these settings commented out, CFWheels will set the data source name to the same name as the folder the application resides in.
- */
- set(dataSourceName="tablename");
- set(dataSourceUserName="username");
- set(dataSourcePassword="gibberish");
- /*
- If you leave this setting commented out, CFWheels will try to determine the URL rewrite capabilities automatically.
- The "URLRewriting" setting can bet set to "on", "partial" or "off".
- To run with "partial" rewriting, the "cgi.path_info" variable needs to be supported by the web server.
- To run with rewriting set to "on", you need to apply the necessary rewrite rules on the web server first.
- */
- // set(URLRewriting="partial");
- </cfscript>
- url: https://localhost/tablename/index.cfm/users/new
- Output:
- Wheels.ObjectNotFound
- CFWheels tried to find the model object user for the form helper, but it does not exist.
- Error location
- Line 7 in views\users\new.cfm
- 5: #startFormTag(action="create")#
- 6:
- 7: <div>#textField(objectName="user", property="name", label="Name")#</div>
- 8:
- 9: <div>#textField(objectName="user", property="email", label="Email")#</div>
- Tag context
- Error thrown on line 534 in wheels\view\miscellaneous.cfm
- - called from line 247 in wheels\view\forms.cfm
- - called from line 303 in wheels\view\forms.cfm
- - called from line 25 in wheels\view\formsobject.cfm
- - called from line 7 in views\users\new.cfm
- - called from line 128 in wheels\global\cfml.cfm
- - called from line 434 in wheels\controller\rendering.cfm
- - called from line 157 in wheels\controller\rendering.cfm
- - called from line 53 in wheels\controller\rendering.cfm
- - called from line 140 in wheels\controller\processing.cfm
- - called from line 95 in wheels\controller\processing.cfm
- - called from line 198 in wheels\dispatch\request.cfm
- - called from line 1 in wheels\index.cfm
- - called from line 1 in index.cfm
- - called from line 1 in wheels\events\onrequest.cfm
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement