all groups > macromedia flash flash remoting > april 2006 >
You're in the

macromedia flash flash remoting

group:

Remoting (CFMX SSAS) Global Variable


Remoting (CFMX SSAS) Global Variable Andy Saman
4/4/2006 12:59:43 AM
macromedia flash flash remoting: Coldfusion MX?s Remoting SSAS Documentation is scarce on the subject. I have
not made any headway on this question. It may be something someone knows out
there?

This is all the information I could find:
Macromedia: Global and request scope objects
http://livedocs.macromedia.com/coldfusion/7/htmldocs/00001494.htm#1005771

I have tried the following:

function testFunction(){
application.m_Test = ?New String?;
return application.m_Test; //returns an error?!
}


?this doesn?t work. It throws:
Java class "jrun.servlet.JRunServletContext" has no public instance field or
method named "m_Test"

From my testing it seems that the application variable does exist but perhaps
it is not an Object datatype. So the question is, how do we properly create a
global variable (not on the request level, but the application level)?
Re: Remoting (CFMX SSAS) Global Variable Andy Saman
4/4/2006 6:59:30 PM
Ok, after some research and help from a good friend with Java experience, it
seems that the answer is to use the
http://java.sun.com/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/Serv
letContext.html.

So the proper syntax for an application variable would be:

function testFunction(){
application.setAttribute("m_Test, ?New String?)
return application.getAttribute("m_Test"); // returns "New String"
}

AddThis Social Bookmark Button