component extends=framework.one { }
component accessors="true" { property framework; property beanFactory;
public function default( struct rc ){ if(!structKeyExists(rc, "testing")){ rc.testing = variables.beanFactory.getBean('testBean'); }
if(!structKeyExists(rc, "testVariable")){ rc.testVariable = "Testing Starting!"; } rc.testing.setTestOne("Here!"); }
public function test( struct rc ){ rc.testing.setTestTwo("Here!"); rc.testVariable = "Testing Over!"; }
}
component accessors="true" { property testOne; property testTwo;
public testBean function init(){ testOne = "Missing!"; testTwo = "Missing!"; return this; }}
<p>Main</p>
<cfoutput> <p><a href="#buildURL('main.test')#">Proceed to test...</a></p></cfoutput>
<cfdump var="#rc#">
<p>Test</p>
<cfoutput> <p><a href="#buildURL('main.default')#">Proceed back to main...</a></p></cfoutput>
<cfdump var="#rc#">
--
FW/1 documentation: http://framework-one.github.io
FW/1 source code: http://github.com/framework-one/fw1
FW/1 chat / support: https://gitter.im/framework-one/fw1
FW/1 mailing list: http://groups.google.com/group/framework-one
---
You received this message because you are subscribed to the Google Groups "framework-one" group.
To unsubscribe from this group and stop receiving emails from it, send an email to framework-on...@googlegroups.com.
Visit this group at https://groups.google.com/group/framework-one.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to a topic in the Google Groups "framework-one" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/framework-one/9cEm5maYlkY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to framework-on...@googlegroups.com.
So when I call main.default in main/test.cfm, it won't look for default() in the controller and execute it?
You are not “calling” main.default in main/test.cfm. buildURL() just builds a URL from an action name – it doesn’t execute the action (that would be chaos since every link on your page would be trying to execute code!).
Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood