Question
Form Hidden Structure Data
I have a form and need to pass a structure as a hidden item.
I convert the structure using cfwddx I assign the converted structure to the value of a hidden item
When the cfm is called, it is unable to de-serialize the converted structure. I get the following error:
WDDX packet parse error at line 1, column -1. Document root element is missing..
I dump the Form variable and only see <wddxPacket version= as the converted structure.
Here is my code:
<cfif recnum_Found>
<cfquery name="Get_Scenario_Status" datasource = "#dashboards_db#">
select * from dashboard_project_status
where SRec = #Form.SRec#
</cfquery>
<cfelse>
<cfset Get_Scenario_Status = StructNew()>
<cfset Get_Scenario_Status.Or_Ack_chk = 0>
<cfset Get_Scenario_Status.Or_Ack_dt = "">
<cfset Get_Scenario_Status.Or_Ack_int = "">
...
</cfif>
...
<cfwddx action = cfml2wddx input = #Get_Scenario_Status# output = ES_wddx>
<form action="/temp/FUPSI.cfm" method="post">
<cfif IsDefined("Get_Scenario_Status.SRec")>
<input type="hidden" name="Existing_Scenario_wddx" value=<cfoutput>#ES_wddx#</cfoutput>>
...
<input type="hidden" name="recnum" value=<cfoutput>#recnum#</cfoutput>>
...
<input type="hidden" name="pbname" value=<cfoutput>#pbname#</cfoutput>>
...
The /tmp/FUPSI.cfm contains:
...
<cfdump var=#Form#>
<cfif IsDefined ("Form.Existing_Scenario_wddx")>
<cfwddx action = wddx2cfml input = Form.Existing_Scenario_wddx output = Existing_Scenario>
</cfif>
...
BTW, the value=<cfoutput>#ES_wddx#</cfoutput>
Actually spills the contents of ES_wddx to the screen and not to the hidden variable.
Can anyone shed some light what is going wrong? What I should be doing,? etc.?
Thanks,
Mike
I convert the structure using cfwddx I assign the converted structure to the value of a hidden item
When the cfm is called, it is unable to de-serialize the converted structure. I get the following error:
WDDX packet parse error at line 1, column -1. Document root element is missing..
I dump the Form variable and only see <wddxPacket version= as the converted structure.
Here is my code:
<cfif recnum_Found>
<cfquery name="Get_Scenario_Status" datasource = "#dashboards_db#">
select * from dashboard_project_status
where SRec = #Form.SRec#
</cfquery>
<cfelse>
<cfset Get_Scenario_Status = StructNew()>
<cfset Get_Scenario_Status.Or_Ack_chk = 0>
<cfset Get_Scenario_Status.Or_Ack_dt = "">
<cfset Get_Scenario_Status.Or_Ack_int = "">
...
</cfif>
...
<cfwddx action = cfml2wddx input = #Get_Scenario_Status# output = ES_wddx>
<form action="/temp/FUPSI.cfm" method="post">
<cfif IsDefined("Get_Scenario_Status.SRec")>
<input type="hidden" name="Existing_Scenario_wddx" value=<cfoutput>#ES_wddx#</cfoutput>>
...
<input type="hidden" name="recnum" value=<cfoutput>#recnum#</cfoutput>>
...
<input type="hidden" name="pbname" value=<cfoutput>#pbname#</cfoutput>>
...
The /tmp/FUPSI.cfm contains:
...
<cfdump var=#Form#>
<cfif IsDefined ("Form.Existing_Scenario_wddx")>
<cfwddx action = wddx2cfml input = Form.Existing_Scenario_wddx output = Existing_Scenario>
</cfif>
...
BTW, the value=<cfoutput>#ES_wddx#</cfoutput>
Actually spills the contents of ES_wddx to the screen and not to the hidden variable.
Can anyone shed some light what is going wrong? What I should be doing,? etc.?
Thanks,
Mike
