-
-
Save nolandubeau/054b4a010e6e3b9b40b8 to your computer and use it in GitHub Desktop.
ColdBox Validation test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the function getValidationManager has an invalid return value , can't cast Object type [Component coldbox.system.validation.ValidationManager] to a value of type [coldbox.system.validation.IValidationManager] | |
at railo.runtime.type.UDFImpl._call(UDFImpl.java:383):383 | |
at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284 | |
at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:775):775 | |
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:723):723 | |
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1506):1506 | |
at system.frameworksupertype_cfc$cf._2(/Library/WebServer/Documents/accessarmor/api/webapp/frameworks/coldbox/system/FrameworkSupertype.cfc:126):126 | |
at system.frameworksupertype_cfc$cf.udfCall(/Library/WebServer/Documents/accessarmor/api/webapp/frameworks/coldbox/system/FrameworkSupertype.cfc):-1 | |
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 | |
at railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 | |
at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284 | |
at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:775):775 | |
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:723):723 | |
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1506):1506 | |
at handlers.itest_cfc$cf.udfCall(/Library/WebServer/Documents/accessarmor/api/webapp/handlers/iTest.cfc:55):55 | |
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 | |
at railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 | |
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:275):275 | |
at railo.runtime.ComponentImpl._call(ComponentImpl.java:608):608 | |
at railo.runtime.ComponentImpl._call(ComponentImpl.java:490):490 | |
at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1796):1796 | |
at railo.runtime.tag.Invoke.doComponent(Invoke.java:209):209 | |
at railo.runtime.tag.Invoke.doEndTag(Invoke.java:182):182 | |
at system.web.controller_cfc$cf._6(/Library/WebServer/Documents/accessarmor/api/webapp/frameworks/coldbox/system/web/Controller.cfc:753):753 | |
at system.web.controller_cfc$cf.udfCall(/Library/WebServer/Documents/accessarmor/api/webapp/frameworks/coldbox/system/web/Controller.cfc):-1 | |
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 | |
at railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 | |
at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284 | |
at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:775):775 | |
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:723):723 | |
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1506):1506 | |
at system.web.controller_cfc$cf._5(/Library/WebServer/Documents/accessarmor/api/webapp/frameworks/coldbox/system/web/Controller.cfc:637):637 | |
at system.web.controller_cfc$cf.udfCall(/Library/WebServer/Documents/accessarmor/api/webapp/frameworks/coldbox/system/web/Controller.cfc):-1 | |
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 | |
at railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 | |
at railo.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:275):275 | |
at railo.runtime.ComponentImpl._call(ComponentImpl.java:608):608 | |
at railo.runtime.ComponentImpl._call(ComponentImpl.java:490):490 | |
at railo.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1800):1800 | |
at railo.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:749):749 | |
at railo.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1521):1521 | |
at system.coldbox_cfc$cf._1(/Library/WebServer/Documents/accessarmor/api/webapp/frameworks/coldbox/system/Coldbox.cfc:236):236 | |
at system.coldbox_cfc$cf.udfCall(/Library/WebServer/Documents/accessarmor/api/webapp/frameworks/coldbox/system/Coldbox.cfc):-1 | |
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 | |
at railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 | |
at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284 | |
at railo.runtime.ComponentImpl._call(ComponentImpl.java:607):607 | |
at railo.runtime.ComponentImpl._call(ComponentImpl.java:490):490 | |
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1781):1781 | |
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:723):723 | |
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1506):1506 | |
at application_cfc$cf._1(/Library/WebServer/Documents/accessarmor/api/webapp/Application.cfc:199):199 | |
at application_cfc$cf.udfCall(/Library/WebServer/Documents/accessarmor/api/webapp/Application.cfc):-1 | |
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:103):103 | |
at railo.runtime.type.UDFImpl._call(UDFImpl.java:371):371 | |
at railo.runtime.type.UDFImpl.call(UDFImpl.java:284):284 | |
at railo.runtime.ComponentImpl._call(ComponentImpl.java:607):607 | |
at railo.runtime.ComponentImpl._call(ComponentImpl.java:490):490 | |
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1781):1781 | |
at railo.runtime.listener.ModernAppListener.call(ModernAppListener.java:346):346 | |
at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:107):107 | |
at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18 | |
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2255):2255 | |
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2222):2222 | |
at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:315):315 | |
at railo.loader.servlet.CFMLServlet.service(CFMLServlet.java:29):29 | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717):717 | |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290):290 | |
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206):206 | |
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233):233 | |
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191):191 | |
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127):127 | |
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102):102 | |
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109):109 | |
at net.stax.appserver.webapp.RequestMonitorValve.invoke(RequestMonitorValve.java:35):35 | |
at net.stax.appserver.webapp.RequestSetupValve.invoke(RequestSetupValve.java:31):31 | |
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:647):647 | |
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293):293 | |
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859):859 | |
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602):602 | |
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489):489 | |
at java.lang.Thread.run(Thread.java:680):680 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* I am a new handler | |
*/ | |
component{ | |
property name="UserService" inject="id:UserService"; | |
function testUser(event,rc,prc){ | |
var testData = {firstname="TestUser", lastname="TestLastname", email="te...@email.com", username="test_user",password="password"}; | |
//fake up what would be a variable passed in | |
var user = UserService.new(properties=testData);//creates a new user and populates it from the "form" | |
prc.validationResults = validateModel( user ); | |
writedump(prc.validationResults.hasErrors()); | |
abort; | |
//user = UserService.save(user); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component output="false" accessors="true" extends="BaseModelObject" | |
{ | |
property name="id" type="any"; | |
property name="firstname" type="String"; | |
property name="lastname" type="string"; | |
property name="email" type="string"; | |
property name="username" type="string"; | |
property name="password" type="string"; | |
// Validation | |
this.constraints = { | |
firstname = { required = true }, | |
lastname = { required = true}, | |
username = { required = true}, | |
password = { required = true}, | |
email = {required=true, type="email"} | |
}; | |
public User function init() | |
{ | |
return this; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment