Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
ProphecyVI #1
Object in structure, yet not...?
Running MX7 on Win2000 / Apache.
I have a structure in the session, but it won't let me access all the pieces.
Here is a dump of Session.Sylantro.CallFwd showing the object "forwarding":
[url]http://www.theprophet.net/dump.gif[/url]. However, trying to actually access the
forwarding variable (Session.Sylantro.callFwd.forwarding) results in "Element
SYLANTRO.CALLFWD.FORWARDING is undefined in SESSION."
I thought maybe it didn't like trying to access the non-native object, but it
accesses other ones just fine. It's this one and the "treatments" object it
won't let me access. Why?
ProphecyVI Guest
-
Class::Struct - want to access structure within structure
I want to access a structure within a structure. Below is what I had in mind. Please help. #!/perl/bin/perl use Class::Struct; struct Step... -
Add to Structure
I'm a structures newbie. I need to know how to 1) Determine if a structure already exists 2) If not, create it. If yes, add to it. I've got... -
ColdFusion Structure
How to search the following structure of arrays for a user-provided string and return the key and array position of the match, if any. ... -
Query to Structure?
Hi. I wanted to ask if someone knew how to do the following: I have a structure and a query. <cfset myStruct = StructNew()> <cfset... -
W3D structure...
Hi My big problem is that I have some deformations that are already defined by vertices index, and their moves... But these deformations are... -
smokin_joe #2
Re: Object in structure, yet not...?
Did you try placing <CFDUMP VAR="SessionName"><cfabort> at various places in
your code to see the state/values of the variables at the time of the error...
its possible that the value that you are looking for was not defined in the
session structure.
smokin_joe Guest
-
smokin_joe #3
Re: Object in structure, yet not...?
sorry the correct code is... <cfdump var="#SESSION#">
smokin_joe Guest
-
PaulH #4
Re: Object in structure, yet not...?
trust cf, it's not in there as you named it. if your struct is called "SYLANTRO" then accessing methods in that object might be Session.Sylantro.forwarding.yourMethodNameGoesHere ()
PaulH Guest
-
ProphecyVI #5
Re: Object in structure, yet not...?
Yea, I can't access any methods or fields either, they all throw the same
error, but the <cfdump> shows it, and most of the other elements in the
structure ARE accessible - just these two CF can't handle. Here's some better
detail.
The calling screen. (All this is actually done in a couple of custom tags and
a CFC, but presented this way for simplification.)
<cfscript>
Values = StructNew();
// set up all the values, skipping this for brevity
strResponse = SendGatewayMessage("Sylantro Instance", Values);
</cfscript>
The Java gateway code, again greatly simplified:
public String outgoingMessage(coldfusion.eventgateway.CFEvent cfmsg) {
Hashtable theData = new Hashtable();
skvo = new
SubscriberKeyVO(subscription.getTenantName(),subsc ription.getExtensionNumber());
svo = sm.findSubscriber(clog, skvo);
// ColdFusion sees this complex, non-native
object perfectly
theData.put("svo", svo);
CBusinessFidVO callFwdData = (CBusinessFidVO)
fidm.getFeatureInstanceData(clog, "SUB", svo.getSubscriberKey(),
Feature.FEAT_CBIZ);
//ColdFusion shows this object in any cfdump of
its parent, but refuses to dump this object itself or access it any way,
throwing a coldfusion.runtime.UndefinedElementException
theData.put("forwarding", callFwdData);
cfcFunction = "onIncomingMessage";
CFEvent event = new CFEvent(strgatewayID);
dataOut.put("wtn", strGlobalWTN);
event.setCfcMethod(cfcFunction);
event.setData(dataOut);
event.setGatewayType("Sylantro");
event.setOriginatorID("");
for (int i = 0; i < listeners.length; i++) {
cflog.info("sending to " + listeners[i]);
event.setCfcPath(listeners[i]);
gatewayService.addEvent(event);
}
}
Back in the calling page (skipping the gateway's output CFC, it just puts the
output event into the server scope so the application can see it):
<cfset Session.Sylantro = Evaluate("Server.Sylantro.WTN" & tmpRef & ".getall")>
<cfdump var="#Session.Sylantro.callFwd#"> <!--- This works perfectly
fine, and shows the "forwarding" object --->
<cfdump var="#Session.Sylantro.callFwd.forwarding#"> <!--- This throws
undefinedElementException --->
<cfset myVar = Session.Sylantro.callFwd.forwarding.CallForwardNum ber>
<!--- so does this --->
<cfset myVar = Session.Sylantro.callFwd.forwarding.getCallForward Number()>
<!--- so does this --->
<cfset myVar = Session.Sylantro.callFwd.forwarding.STATE_CFBNA> <!---
so does this --->
ProphecyVI Guest



Reply With Quote

