I have a function named as OnSubmit
in two CFCs
,
one is BASE.cfc and other is PageUsed.cfc
. the function is different in base.cfc
and pageused.cfc
, but the name is name and arguments are same.
there is a third CFC named as UserObject.cfc invoked by passing a method name as Basic which returns the PageUsed.cfc
object and method is called OnSubmit
,
it should basically call the Onsubmit
function in the pageUsed
but it is calling the Base.cfc
OnSubmit
Function
what is going wrong
any idea?
Do i need to use SUPER, but super is used for some other purpose as i read
Components often extend other components and you do this explicitly in the component declaration.
In your case if you are doing
<component name="pageused" extends="base">
then in the pageused comonent you may have.Calling onSubmit like
pageUsed.onSubmit()
will run that function. If you want to run the onSubmit inside the base you could add the following to pageused.What is confusing about your question is this part:
I get there is a userObject.cfc but can you share the code of where that is because it appears that that part is probably not working how you think it is. Especially confusing is you are passing a name "basic" but returning "pageUsed". Why wouldn't it return basic?