Manipulating coldfusion structures in flex
Hi,
I am beginner with flex. I was trying a sample login application using flex and coldfusion. I was able to connect to coldfusion, and was able to show an alert message when the user successfully logins. I was just returning a numeric value of 1 if the login is successful. But I want to store the details of the logged in user like first name, last name, and display using flex. I am storing the values in a coldfusion structure with return type struct. Can anyone please suggest me how this can be done in flex?
Thanks.
You have to install the extensions. Start here:
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=cfwizards_2.html
Similar Messages
-
Will BC eventually include Coldfusion and/or Flex?
My understanding is that BC web sites are .NET based. Will BC sites eventually include Coldfusion and/or Flex servers?
Having spent many hours learning and building rich Internet applications using Coldfusion and Flex, hard to believe an Adobe-hosted web site system (BC) would be solely .NET based.Hi Ahande2!
Unfortunately not in the near future and at this stage.
The BC Sytstem is a SAAS (Software as a Service) and this system is a .net based system.
You have NO access to server side code so you can not run any PHP, Java, Coldfusion, .net code on your sites.
If you need any custom functionality etc you can use the ever expanding API of the system.
http://kb.worldsecuresystems.com/635/bc_635.html?bc-partner
Kind regards,
-Sidney -
Manipulating XML file using flex 2.0
Hi,
how to add contents in to xml file using flex 2.0, ie i
actually wants to write data in to a xml file, so that data to be
appended at the end of the file.
KumarYou can't! Well, at least Flex cannot do this. All Flex can
do is send this data -- any data -- to the server and it's up to
you how you want to append this data to a file on the server.
You see, flex can't write to local files. If you looking for
client side file manipulation, take a look at Flex's desktop
brother call AIR!
ATTA -
ColdFusion Event Gateway Flex CF 8
I am doing this exercises in the FlexBuilder SDK .
Use Coldfusion Event Gateway Adapter exercise
When I get to
Select Event Gateways > Gateway Instances.
Enter Flex2CF2 as the Gateway ID.
Select Flex Messaging - Flex as the Gateway Type.
There is no Flex Messaging-Flex option
The closest two are
DataManagement Notifies Data Management Services of data
changes coldfusion.eventgateway.flex.FlexDataManagementGateway
DataServicesMessaging Handles Data Services Messaging
messages coldfusion.eventgateway.flex.FlexMessagingGateway
I try the example @
http://localhost:8700/samples/dataservice/myapp/flexemail2cf.mxml
The flex server is running fine but generates an RMI error in
the cmd console
flex.messaging.MessageException: Unable to find ColdFusion
gateway 'Flex2CF2 in RMI registry on host localhost
the gateway may not be running.
The gateway shows as running in the coldfusion adminstrator.
Please helpI think Flex messaging event gateway capability first was
available in CF 7. -
Setting up a coldfusion project in Flex
This is my first time using flex to connect to coldfusion.
I've got the following configuration:
1) Development XP with Flex 3/Adobe CS3
2) Linux webserver running coldfusion 8/MySQL
Up until this point, I have been doing my development on the
XP box and sending my code to the linux server through RDS.
I've got RDS configured on the Flex 3 environment and that
seems to be working ok.
However, when I tried to do file->new>flex project and
set the application server type to Coldfusion I run into problems.
On the second page I have standalone or deployed to J2EE
server.
The next line is "Use default location for local Coldfusion
server" which I deselect (I'm not sure what the default location
really is though...) and set the location to the path
/opt/coldfusion8 which is mapped via samba to z:\coldfusion
Next is the "use built-in coldfusion server". Does this mean
that there is a coldfusion server installed as part of the flex 3
environment?? Anyway, I deselected this option and used the path
z:\wwwroot\WEB-INF\flex but it still asks for the flex-config.xml
which is in that directory and I can browse to it just fine. I'm
not sure what they are asking for on the root URL, I assume where
the actual code will be stored which I have yet another mapping for
that one which is y:\testcf.
I browsed through the forum and found the following article
which spurred me to set up samba for the flex-config.xml file.
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid =1359075&highlight_key=y&keyword1=coldfusion
Anyone have any insight on what might be the issue?
Thanks.I just built a windows IIS/coldfusion 8 server and had no
issues building the connection. Is the linux unsupported in flex?
It shouldn't be if it is... -
Coldfusion/LCDS/Mysql + Flex
Hi all !!
I just have a project that use LiveCycle a lot... I begin
from the scratch with integrated ColdFusion LiveCycle,
so i've tried the example in devnet :
http://www.adobe.com/devnet/coldfusion/articles/data_app.html
and everything seems to work with the Coldfusion embedded databases
( I 've just noticed that for some fields when i wanted to upgrade
that fields i get un 'contructor' error, issue that wasn't
resolved, even by his author.
Now my problem is that i use a proper mysql database and when
i launch the same application i get a blank page without anyresult
in the datagrid and no error messages from flex, coldfusion or
mysql...
Is it a known issue or have i to configure Mysql in other way
in Coldfusion ??
Any helps will be appreciated
FrancoisI have tried out exactly this same example; but in my
configuration, the assembler CFCs are not found ... I use an Apache
web server instead of ColdFusion's builtin web server. Have You
made this example running with an EXTERNAL web server ? -
Converting coldfusion reports to flex- Help needed
Hello All,
I have a coldfusion form which has input fields , when the user submits the input fields a report is generated . Now , what i need is to generate the report in flex which takes the input from the coldfusion input file..
Can somebody please help ASAP..
Thanks in advance.Thanks! for the prompt reply Mike .. I will start working on one of these options you listed..
I need to complete the generation of these reports in couple of days , need myself get going..
Is there an email id where i can reach , if i have more questions.. -
ORM in Adobe ColdFusion 9 for flex developers
What advantage does the
ORM in Adobe ColdFusion 9
Have for flex developers as Flash builder 4 does so much of that for us nowadaysWhat is nice about it is the AIR support, imho, so that you can do object-oriented database management with a SQLite database on the client without having to have a server. The actual ORM swc that comes with CF9 is placed in the Flex library and then no more having to write inordinately complex queries to accomplish simple things; you simply update objects' properties like you would with a typical object in FLEX. In addition, if you're using the ORM framework and want to build an application that allows users to easily update a remote database with data worked on offline, it's built in. As you probably know, there are several ORM frameworks out there already, but this appears to be the one Adobe is going with so it's worth a shot with the hope of long-term support, as opposed to some of the others which are not supported or rather stale.
-
I have two questions about setting up ColdFusion to access a remote CFC from FLEX (Flash Builder 4.5). I host several domains on my ColdFusion 8 server with IIS 6. I would like to set things up so that I can hit a CFC that is not on the same domain as my "main" coldfusion server (ColdFusion .CFM files run fine from this domain). I can't seem to do it though.
If I adjust my service control endpoint so that it USES my main coldfusion domain, it works:
_serviceControl.endpoint = "http://www.myMainColdFusionDomain.com/flex2gateway/"
but if I try a different domain, it does not work:
_serviceControl.endpoint = "http://www.notMyMainColdFusionDomain.com.com/flex2gateway/
Also, I am having trouble with putting my CFC in a subdirectory and still getting it to work. In other words, building from the above working URL, I can't seem to just add a subdirectory to the URL--it doesn't work:
_serviceControl.endpoint = "http://www.myMainColdFusionDomain.com/subDirectory/flex2gateway/"
I am sorry if what I am asking seems very basic, I am just learning.
Thank you.Ok, I think worked this out for myself.
First, I adjusted my default website in IIS so that it pointed to the directory of the domain I wanted to use, that cleared up the domain issue--not really the way I thought it would be done, but it works...
Next for my directory question, I used a dot notation to indicate there is a subdirectory, and plugged it into my super class as follows:
_serviceControl.source = "subdirectory.myCFCsName"; -
ColdFusion RDS and Flex Builder 2
Hello everyone.
I try for 3 days to get this running but I keep getting the
same error:
"The RDS server was successfully contacted, but your security
credentials were invalid."
The documentation says that if you are using ColdFusion MX
7.0 or earlier, you would get this message.
But I am using the ColdFusion MX 7.0.2 Developer Edition,
Running under IIS6 on a Windows 2003 server Standard.
Please note that the ColdFusion and Flex Builder 2 are not on
the same computer and it is not possible for me to install CF on
the local computer.
If I try the Dreamweaver RDS it works fine. So I know there
is nothing wrong with the password, the Host Name or port 80.
Can someone please help me?
Thanks.
Samanyone??
-
I'm looping an array of records (from a fixed length feed)
and creating a structure for each required field. Then for every
loop, I'm passing this structure to a function to check if certain
required field in the structure's element is left empty.
The structure should look something like this:
<cfloop from="1" to="#ArrayLen(MyFile)#" index="i">
<cfset aEachLine
=StructNew()>
<cfset aEachLine["LastName"]="#Mid(MyFile
,17,40)#">
<cfset aEachLine["FirstName"]="#Mid(MyFile
,57,20)#">
<cfset aEachLine["Address"]="#Mid(MyFile
,140,38)#">
<cfset aEachLine["City"]="#Mid(MyFile
,254,19)#">
<cfset aEachLine["State"]="#Mid(MyFile
,273,2)#">
<cfset aEachLine["Country"]="#Mid(MyFile
,284,4)#">
In this example I'm assuming that my structure is this short
<CFSET CheckStructValue=CheckThisStruc(aEachLine)>
</cfloop>
How do I check if any of those struct. value is
empty?alecken,
I don't think looping is the only way but suggested this
approach because, I think, you can more easily write code that
determines which key in a struct is empty (if any) and then report
back to the user the issue (or do something else such as inserting
default values, etc.).
That said, since the purpose of StructFindValue is to locate
any key that has the value supplied, it should work. I just wrote
and tested the following code and it worked:
<cfscript>
myStruct = StructNew();
myStruct.key1 = "Key 1 Value";
myStruct.key2 = "Key 2 Value";
myStruct.key3 = "";
myFind = StructFindValue(myStruct,"");
</cfscript>
<cfdump var="#myFind#">
The resulting output of an array of structures showed me that
key 3 was empty.
While this works to locate empty keys, I would still need to
write code that determines which key was empty and then what to do
from there. I just find it easier to loop over the struct and act
accordingly on each key it finds that is empty as it loops over the
struct. But that's just me!
There are some structure functions on cflib.org that might
help but in a cursory look over the site, I did not see anything
off hand. -
Accessing Array of Structures from Coldfusion
I am having a problem accessing an array of structures from
Coldfusion within my flex application. Here is how I make my Array:
(GetRegions is a type Query and Type is a string variable)
<cfset ReturnArray = ArrayNew(1)>
<cfset ReturnArray[1] = StructNew()>
<cfset ReturnArray[1].Query = GetRegions>
<cfset ReturnArray[2] = Type>
Within flex I am trying to access the results in the
following way:
private function dataHandler(event:ResultEvent):void{
Query_Filter = new ArrayCollection(event.result[0].QUERY as
Array);
myString = event.result[1] as String;
Can anybody help me with this. I want a way to return a query
and a string back from coldfusion.
Thanks for the help,
JeffSo now I changed my code to the following in CF:
<cfset Type = "MyString">
<cfset ReturnArray = ArrayNew(1)>
<cfset ReturnArray[1] = StructNew()>
<!--- set up query GetRegions --->
<cfset ReturnArray[1] = GetRegions>
<cfset ReturnArray[2] = Type>
<!--- Return Array --->
<cfreturn ReturnArray>
Now in flex I have the following dataHandler Function:
Alert.show("hello: "+ObjectUtil.toString(event.result[0]));
Query_Filter = new ArrayCollection(event.result as Array);
Now I set up a List box with Query_Filter as the dataprovider
but the results aren't showing correctly. The first item in the
list box is displayed as [object, Object], [object, Object] and the
second item is my String.
Does anybody know how to break up the query to a variable and
the string to its own variable in the dataHandler function.
Thanks for any and all help -
How do I get flex remoting to work with Coldfusion 11
Hi,
Coldfusion 11 (Developer)
Flex 3
Existing Flash Application works with Coldfusion 8
Flex Integration is turned on.
Running latest update
CentOS 6.1 with latest updates
I have done the following:
http://127.0.01/flashservices/gateway ---> Page Not found
http://127.0.01/flashservices/gateway/ ---> Page Not found
http://forums.adobe.com/message/5621721#5621721
Confusion Blog » Apache + Debian + Coldfusion 10 + flex2gateway = Error 404
https://groups.google.com/forum/#!topic/railo/6j2i6gl8Ac4
\config\wsconfig\1\uriworkermap.properties file to include:
/flashservices/gateway/* = cfusion
/flashservices/gateway = cfusion
I have modified the mod_jk.conf like so:
# Select the timestamp log format
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
# Fix para Flex2gateway
<IfModule jk_module>
JkMount /*.cfm ajp13
JkMount /*.cfc ajp13
JkMount /*.do ajp13
JkMount /*.jsp ajp13
JkMount /*.cfchart ajp13
JkMount /*.cfres ajp13
JkMount /*.cfm/* ajp13
JkMount /*.cfml/* ajp13
JkMountCopy all
</IfModule>
AddHandler jakarta-servlet .cfm .cfml .cfc .cfr .cfswf
Alias /CFIDE "/opt/coldfusion10/cfusion/wwwroot/CFIDE"
I uncommented the "start flex 2" section in web.xml
Nothing has worked.
I have searched Google and Adobe.
I was hoping that Adobe would have the "Flex Integration Check Box" working
by now. It only been around since ColdFusion 8 and basically does nothing.
Adobe could post a tutorizl on how to get this working.
Job Security for "Tech Support".
Any ideas.
BrianDo you have internet when wired to the router?
What exactly is the problem? What error messages do you get?
What are the current settings on the WRT? -
Hi
I have an application which requires interaction with both coldfusion and java.I have taken the configuration files from the blazeDS turnkey project and added it to my application.My application server is coldfusion deployed in a weblogic.I was able to call coldfusion from my flex but whenever i try making java calls i get the following error
[RPC Fault faultString="No destination 'testClass' exists in service flex.messaging.services.RemotingService" faultCode="Server.Processing" faultDetail="null"]
services-config file is as follows
<?xml version="1.0" encoding="UTF-8"?>
<services-config>
<services>
<service-include file-path="remoting-config.xml" />
<!--<service-include file-path="proxy-config.xml" />
<service-include file-path="messaging-config.xml" />-->
</services>
<security>
<login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
<!-- Uncomment the correct app server
<login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
<login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
<login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
-->
<!--
<security-constraint id="basic-read-access">
<auth-method>Basic</auth-method>
<roles>
<role>guests</role>
<role>accountants</role>
<role>employees</role>
<role>managers</role>
</roles>
</security-constraint>
-->
</security>
<channels>
<!-- CF Based Endpoints -->
<channel-definition id="my-cfamf" class="mx.messaging.channels.AMFChannel">
<endpoint uri="http://localhost:7002/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
<channel-definition id="cf-polling-amf" class="mx.messaging.channels.AMFChannel">
<endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/cfamfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>8</polling-interval-seconds>
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
<channel-definition id="my-cfamf-secure" class="mx.messaging.channels.SecureAMFChannel">
<endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/cfamfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
<serialization>
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
<!-- Java Based Endpoints -->
<channel-definition id="java-amf" class="mx.messaging.channels.AMFChannel">
<endpoint uri="http://localhost:7002/flex2gateway/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
</channel-definition>
<channel-definition id="java-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
<endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
</channel-definition>
<channel-definition id="java-polling-amf" class="mx.messaging.channels.AMFChannel">
<endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>true</polling-enabled>
<polling-interval-seconds>8</polling-interval-seconds>
</properties>
</channel-definition>
<!--
<channel-definition id="java-http" class="mx.messaging.channels.HTTPChannel">
<endpoint uri="http://{server.name}:{server.port}{context.root}/flex2gateway/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
</channel-definition>
<channel-definition id="java-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
<endpoint uri="https://{server.name}:{server.port}{context.root}/flex2gateway/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
</channel-definition>
-->
</channels>
<logging>
<target class="flex.messaging.log.ConsoleTarget" level="Error">
<properties>
<prefix>[BlazeDS] </prefix>
<includeDate>false</includeDate>
<includeTime>false</includeTime>
<includeLevel>false</includeLevel>
<includeCategory>false</includeCategory>
</properties>
<filters>
<pattern>Endpoint.*</pattern>
<pattern>Service.*</pattern>
<pattern>Configuration</pattern>
<pattern>Message.*</pattern>
</filters>
</target>
</logging>
<system>
<!-- <manageable>false</manageable>-->
<!--
<redeploy>
<enabled>true</enabled>
<watch-interval>20</watch-interval>
<watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
<watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
<touch-file>{context.root}/WEB-INF/web.xml</touch-file>
</redeploy>
-->
</system>
</services-config>
remote-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service"
class="flex.messaging.services.RemotingService"
messageTypes="flex.messaging.messages.RemotingMessage">
<adapters>
<adapter-definition id="cf-object" class="coldfusion.flash.messaging.ColdFusionAdapter" default="true"/>
<adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter"/>
</adapters>
<default-channels>
<channel ref="my-cfamf"/>
</default-channels>
<destination id="ColdFusion">
<channels>
<channel ref="my-cfamf"/>
</channels>
<properties>
<source>*</source>
<!-- define the resolution rules and access level of the cfc being invoked -->
<access>
<!-- Use the ColdFusion mappings to find CFCs, by default only CFC files under your webroot can be found. -->
<use-mappings>false</use-mappings>
<!-- allow "public and remote" or just "remote" methods to be invoked -->
<method-access-level>remote</method-access-level>
</access>
<property-case>
<!-- cfc property names -->
<force-cfc-lowercase>false</force-cfc-lowercase>
<!-- Query column names -->
<force-query-lowercase>false</force-query-lowercase>
<!-- struct keys -->
<force-struct-lowercase>false</force-struct-lowercase>
</property-case>
</properties>
</destination>
<destination id="testClass">
<properties>
<source>TestClass</source>
</properties>
<adapter ref="java-object" />
<channels>
<channel ref="java-amf"/>
</channels>
</destination>
<destination id="testClass2">
<properties>
<source>TestClass2</source>
</properties>
<adapter ref="java-object"/>
<channels>
<channel ref="java-amf"/>
</channels>
</destination>
</service>
Can anyone please tell me where i m going wrong.Is that because i m using flex2gateway for java calls?.I used it since it was how it has been configured in the turnkey project for coldfusion.I have replicated the file as it was there and since it is using flex2gateway even for javaEndpoints i felt we could use the same.
regards
SiddThanks for the reply. Yes, I did compile all the Java and it
works OK with a simple Java program. It just will not work in a
Flex application.
The java classes are:
RRA:
package blah.myPackage;
import java.util.List;
import java.util.Collection;
import flex.data.DataSyncException;
import flex.data.assemblers.AbstractAssembler;
class RRA extends AbstractAssembler
public Collection fill( List fillParameters )
RRS service = new RRS();
return service.getSome();
RRS:
package blah.myPackage;
import java.util.ArrayList;
import java.util.List;
import java.sql.*;
import flex.EORS.*;
class RRS
public List getSome()
ArrayList list = new ArrayList();
String str = "bob";
RR rr = new RR(str);
list.add(rr);
return list;
RR:
package blah.myPackage;
class RR
private String name;
public RR() { }
public RR(String name)
this.name = name;
public String getName()
return this.name;
public void setName(String name)
this.name = name;
I started with something that retrieved data from a database
but watered it down just to try and get some kind of communication
between Flex and Java. -
Need to encrypt string in ColdFusion and Decrypt in Flex
My company is developing a standalone, offline Flex/AIR application. When users of the Flex/AIR app. want to activate the application, we will send them an activation file that contains an encrypted string. The string will hold the unique set-up data for the specific copy of the Flex/AIR app. The activation file will need to be generated on our central system which is written in ColdFusion. The Flex/AIR application must read the file and decrypt the string.
Are there any encryption/decryption options that are compatible with ColdFusion 8 and Flex 4?
Thanks.
P.S. The Flex/AIR app. runs offline, so I am not referring to encryption of communications between a ColdFusion server and Flex.srikanth n wrote:
> Can anybody help me to resolve this issue.
>
> Thanks in advance.
>
>
My first thought is CF's list functions. You can declare any
character(s) you want to be a list delimiter. In you example
I would
use '-' and 'x' as the delimiter. A couple of examples.
<cfset phoneString = '123-456-7890 x1234'>
<cfset delimList = '-x '>
<cfoutput>
Areacode: #listFirst(phoneString,delimList)#<br/>
Exchange: #listGetAt(phoneString,2,delimList)#<br/>
Number: #listGetAt(phoneString,3,delimList)#<br/>
Extension: #listLast(phoneString,delimList)#
</cfoutput>
Maybe you are looking for
-
How do I Copy files from one directory to another?
I know how to move files using the renameTo() method of File class, but is there a simple way to copy files, without the need of reading the input stream form one file and writing to a new one?
-
Dear All, My Probelm is with Down Payment clearing while MIRO Entry. Actually after Posting of MIRO , Down Payment is not getting clearing. Checked in FBL1N. Allentrie are in OPen Status. I am Describing my scenario in detail and attached file with a
-
R12.1.2/11.1.0.7 PO Import extremely Slow
Hi All We are struggling with performance on a 100,000 PO import using POXPOPDOI (Standard Purchase Order Import program) on R12.1.2 and 11.1.0.7 (HP-UX 16GB 2 x Intel(R) Itanium 2 9100 series processors (1.67 GHz, 18 MB) B.11.31. I know it's a lot o
-
I am attempting to use an FLVPlayback component, but the parameters tab is missing from my property inspector in AS3! Is it possible that I haveI done something to make it disappear, or is this a sign that I need to re-install Flash (AS3). Many thank
-
Hey. trying to drag and drop a text field. So I have created a text field, and saved it as a swf. I then load it in using xml and the loader class. When I go to pick it up, i get the error TypeError: Error #1034: Type Coercion failed: cannot conv