TimDg
asked on
Context issues using CFFORM with CFC procedure calls
I may be out of luck, but it's worth asking:
I need to build a form with several required elements, but I use procedure calls to build these elements. For instance one procedure call should build several <cfinput> tags. But since all of the tags need to be on the same form, I can't start the cfform in the procedure call, creating a context error.
For example:
<cfform name="exam" method="post">
<cfoutput query="qGetQ">
<cfinvoke
component="app.assessment. cfc.#qGetQ .handler#"
method="getAssessmentView" >
<cfinvokeargument name="pID" value="#qGetQ.question_id# ">
<cfinvokeargument name="pNum" value="#qNum#">
</cfinvoke>
</cfoutput>
</cfform>
The problem is the procedure cannot see that I've started the <cfform> tag. Error message:
Context validation error for tag cfinput.
The tag must be nested inside a cfform tag.
Is it possible at all to let the procedure see that the tag has been made in the calling page. I checked and there is no Caller scope in a CFC procedures, and none of the other scopes seem to have any data related to the <cfform> tag.
Thanks for any input and suggestions
I need to build a form with several required elements, but I use procedure calls to build these elements. For instance one procedure call should build several <cfinput> tags. But since all of the tags need to be on the same form, I can't start the cfform in the procedure call, creating a context error.
For example:
<cfform name="exam" method="post">
<cfoutput query="qGetQ">
<cfinvoke
component="app.assessment.
method="getAssessmentView"
<cfinvokeargument name="pID" value="#qGetQ.question_id#
<cfinvokeargument name="pNum" value="#qNum#">
</cfinvoke>
</cfoutput>
</cfform>
The problem is the procedure cannot see that I've started the <cfform> tag. Error message:
Context validation error for tag cfinput.
The tag must be nested inside a cfform tag.
Is it possible at all to let the procedure see that the tag has been made in the calling page. I checked and there is no Caller scope in a CFC procedures, and none of the other scopes seem to have any data related to the <cfform> tag.
Thanks for any input and suggestions
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for your comments.