<cffunction name="dspFunction" access="public" returntype="void" output="false">
<cfset var rc = event.getCollection() />
<cfset rc.xehInfo = "ehFunction.doFunction" />
<cfset rc.emp_name = "John" />
<cfset Event.setView("ehFunction/vwEmpInfo") />
</cffunction>
-----------View------------
<cfoutput>
<form id="form1" name="form1" action="#cgi.SCRIPT_NAME#" method="post">
<input name="event" type="hidden" id="event" value="#Event.getValue("xehInfo")#" />
<input type="hidden" name="Emp_Name" id="Emp_Name" value="#rc.EMP_NAME#">
</form>
</cfoutput>
--------doFunction-------
<cffunction name="doFunction" access="public" returntype="any" output="false">
<cfset var rc = event.getCollection() />
<cfset p_emp_name = Trim(rc.Emp_Name) />
</cffunction>
How do i remove the hidden variables and make sure the "do" handler has the rc variables(that are set in "dsp") available ??
Thanks
Chintu
--------- Original Message ---------
Subject: [coldbox:26397] [ColdBox 3.5] Hidden Variables in RC
From: "Chintu" <hari....@gmail.com>
Date: 5/9/17 8:17 pm
To: "ColdBox Platform" <col...@googlegroups.com>
HelloI am a new entrant to the ColdBox world. I happened to take over an application to maintain it and posed with the following requirement. "Remove all Hidden variables from the views". How would i do that and maintain the current functionality. Below is the sample snippet of the code cycle.--------dspFunction-------
<cffunctionname="dspFunction"access="public"returntype="void"output="false">
<cfset var rc = event.getCollection() />
<cfset rc.xehInfo = "ehFunction.doFunction"/>
<cfset rc.emp_name = "John" />
<cfset Event.setView("ehFunction/vwEmpInfo") />
</cffunction>
-----------View------------
<cfoutput>
<formid="form1"name="form1"action="#cgi.SCRIPT_NAME#"method="post">
<inputname="event"type="hidden"id="event"value="#Event.getValue("xehInfo")#"/>
<inputtype="hidden"name="Emp_Name"id="Emp_Name"value="#rc.EMP_NAME#">
</form>
</cfoutput>
--------doFunction-------
<cffunctionname="doFunction"access="public"returntype="any"output="false">
<cfset var rc = event.getCollection() />
<cfset p_emp_name = Trim(rc.Emp_Name) />
</cffunction>
How do i remove the hidden variables and make sure the "do" handler has the rc variables(that are set in "dsp") available ??
Thanks
Chintu
--
--
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
For News, visit http://blog.coldbox.org
For Documentation, visit http://wiki.coldbox.org
For Bug Reports, visit https://ortussolutions.atlassian.net/browse/COLDBOX
---
You received this message because you are subscribed to the Google Groups "ColdBox Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldbox+u...@googlegroups.com.
To post to this group, send email to col...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/90008a5c-9f02-44e7-8388-6e979d804bfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--------- Original Message ---------
To view this discussion on the web visit https://groups.google.com/d/msgid/coldbox/b7396932-9d76-477d-9ce2-0ba4f1ac3b40%40googlegroups.com.