tags:

views:

49

answers:

2

using coldfuion 9
I used structdelete(session,"Elementemployee.id") in one of my .cfm display files.Also in my application.cfc it defined as is

<cfset tArray[1][2] = "#session.employee_id#">

and the error is

 `Elementemployee.id is undefined in SESSION.` 

Is there a way that i can reset it without following the method shown below

 Navigate to the page Server Settings => Memory Variablesin the Coldfusion Administrator. Uncheck the option Use J2EE session variables and check the options Enable Application Variables and Enable Session Variables. Click the button to submit the changes.
+1  A: 

I'm not sure what your intent is. If you delete it, you are explicitly making it undefined.

Maybe you mean to set it to zero or the empty string, as in one of these?

<cfset session.employee_id = 0>
<cfset session.employee_id = ''>

Does that help?

Ben Doom
+1  A: 

Not quite sure what you're asking, but if you're trying to delete session.elementEmployee.id, try this:

<cfset StructDelete(session.elementEmployee, "id") />
Hooray Im Helping