Flex and coldfusion login
Can someone tell me how I can create a popup login system
using a coldfusion mx 7 backend. thank you.
Check credentials then remove pop up? How can I remove the
Popup login box after successful login? please help me...
private function handleLoginSucess(eventObj:Event):void {
//Get the member object from the LoginForm component
PopUpManager.removePopUp(this)
LoginForm.mxml
public function
resultGetMemberByUserNameAndPassword(event:ResultEvent):void {
//used for debugging - shows details about result
//returned by the CFC method
//Alert.show( ObjectUtil.toString(event.result) );
/*result returned is a Member object
cast the result returned to a Member class
and assign it to our Member object*/
__member = event.result as Member ;
//remove text in the login input fields
username.text="";
password.text="";
// Define event object, initialize it, then dispatch it.
dispatchEvent(new Event("loginSuccess"));
PopUpManager.removePopUp(this)
} //end function getMemberByUserNameAndPassword
private function processLogin():void {
//change state back to the default so the errorLogin state
doesn't appear again
currentState = '';
//Alert.show("Processing Login...");
MemberService.getMemberByUserNameAndPassword(username.text,
password.text);
}//end function processLogin
}
Similar Messages
-
How do I save a file to a server using flex and coldfusion?
How do I save a file to a server using flex and coldfusion?
On the CF side I might need to use this:
<cffile action="UPLOAD" filefield="Filedata"
destination="#expandpath('..\somepath)#"
nameconflict="overwrite">
And on the flex side I might need to use something like this:
var sendVars:URLVariables = new URLVariables();
sendVars.action = "upload";
var request:URLRequest = new URLRequest();
request.data = sendVars;
request.url = _strUploadScript;
request.method = URLRequestMethod.POST;
_refUploadFile = new FileReference();
_refUploadFile = _arrUploadFiles[_numCurrentUpload].data;
_refUploadFile.addEventListener(ProgressEvent.PROGRESS,
onUploadProgress);
_refUploadFile.addEventListener(Event.COMPLETE,
onUploadComplete);
_refUploadFile.addEventListener(IOErrorEvent.IO_ERROR,
onUploadIoError);
_refUploadFile.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
onUploadSecurityError);
_refUploadFile.upload(request, "file", false);
I just don't know how to put it all together in Coldfusion.try this...
http://cf-creations.co.uk/blog/index.cfm/2008/9/20/Flex--File-Upload-Form--Part-One--Build ing-The-Initial-Form -
Anyone know how to gernerate CRUD applications with flex and coldfusion?
Anyone know how to gernerate CRUD applications with flex and
coldfusion? I am working with a remote coldsfusion installation
with MS SQL and I don't have RDS.You might investigate "squidhead". It is CF based. I'm not
sure if it has any Flex related features.
http://squidhead.riaforge.org/ -
Dynamic value objects in flex and coldfusion 9
I'm writing a program for a company that does registrations for conventions and trade-shows. The problem I'm having is that each different client wants to store different data for each show. Most of the data is the same (attendee's name, address, etc...), but each show has some customizations that it wants to have... So each database for each show is going to be different...
Right now, the only way I know how to transfer data from Flex to ColdFusion is via a Value Object. (Well, the only good way to do it, that is.) My problem comes when a client wants a particular database customized. I have MANY questions about this...
1) How do I tell my Value Object what fields we've added to or changed in the database without re-writing the entire VO (in both the .AS and .CFC files) and re-compiling my program? In other words, I need a dynamic VO that changes automatcially with the database.
2) If there is a way to dynamically create a VO in Flex (and from a few blog posts I've seen, it seems there is a way), how do I tell CF9 what the structure of that dynamically-created VO is? Without re-writing a bunch of .CFC files every time I add or change a field in the database, that is...
3) How do I reference the dynamically-created fields in my Flex program? Right now, for example, I can define a variable called attendeeInfo as type attendeeInfoVO, and then reference things like attendeeInfo.first_name, attendeeInfo.last_name, etc... How do I reference a field programmatcially when I don't know what it's going to be called beforehand?
4) How do I make my program display/modify those dynamically-created fields? Right now, using the attendeeInfo example above, I can create a TextInput with an id="firstNameInput" and just say firstNameInput.text = "{attendeeInfo.first_name}". That won't work when I have no clue how many dynamically-created fields there are, or even what kind of data they're going to store... How do I deal with this?
5) Is there something other than VOs that would fit this situation better? Am I limiting myself by using VOs in the first place? Is it just plain impossible to do this with VOs? And if so, what are my alternatives? I need a structured object that can be passed around with a single reference -- I absolutely DO NOT want to pass a bunch of references to a bunch of different variables -- that's why I used VOs from the very beginning.
6) Can I simply PAY someone at Adobe for one-on-one help here? Do they have experts that you can "buy" for a few hours? What's the charge for that, if such a thing is available? Or, is this problem well-explained somewhere on the Web, and I just haven't found it yet?
I'm very confused here, and it seems like I might have to re-write a ton of code, which I'm not looking forward to... Ugh... I appreciate any help you can give me...
Thanks,
Laurence MacNeill
Mableton, Georgia, USAThis blog post is pretty close to what I want:
http://justinjmoses.wordpress.com/2008/10/10/flex-dynamic-bindable-value-objects/
So there are the dynamic value objects I was looking for. But the blog-poster is using LINQ and .Net 3.5. I'm using ColdFusion9.
So, how do I get ColdFusion9 to deal with that? How do you get CF9 to recognize the fact that you've changed the VO, and deal with it appropriately?
Thanks,
L. -
Flex and Coldfusion error handling
Hello! I was wondering if someone could point me in the right direction regarding error handling in a Flex app thats using an HTTPSERVICE RPC to a Coldfusion component.
If a user is entering form data in Flex and clicks submit... the data is sent via the HTTPSERVICE send method as XML to the CFC. But what if there is a Coldfusion SQL insert statement error? Say a user enters a character in a number field (now i know the best thing to do would be to have actionscript ensure that the values entered are numbers but lets keep that aside just for this example). How could I alert the user to let them know the CFC encountered a SQL error? Or better yet... alert them that everything went "A" ok and their data was successfully submitted.
I originally thought to put CFTRY and CFCATCH around the CFC code. I could do that fine, but had trouble passing back a message string so that FLEX could use it in an Alert.Show window.
Thanks!
-BosDogHey Mike,
Sorry after I posted I thought "this may be a question for CF guys as well".
I definitely use and love RemoteObjects. Its great for binding to datagrids and to run SQL to return data from the server back to Flex. I've struggled with successfully passing variables from Flex to CF using RemoteObject though. Say a dataform with 5 text fields & 2 combo box dropdowns.
I think you may have forgotten to post the link to the article for me to read... i didnt see it in your last post?
Thanks! -
Hi everyone,
Can someone tell me how I can enable and disable a button on
my flex application based on access level using coldfusion mx 7.
Please help me, thanks
Cliffyjust add a field in your db for the "access level" like
1,2,3,etc then get that value from the select * from login where
user=var and pass=var, that should give you back the level then you
can use it however you want once you are returning it. -
Flex and ColdFusion and session facade?
I want to deploy a flex application on an existing ColdFusion
server. This server is already in production and uses a root
Application.cfc to set session variables as well as authenticate
the user to AD with getAuthUser. When I deploy my flex application,
it fails because of the OnRequestStart cfcomponent within
Application.cfc. I am wondering if this would be proper use of
session facade? How do I best encapsulate session variables from
the root Application.cfc within my new flex application? Basically
I will need to follow the same authentication and cfset session
guidelines that all of my other CF applications use, and my flex
app needs to have theses session variables available to it, but I
am not sure the best approach. Any insight is welcome.Did you enable session management in the Application.cfc or
Application.cfm? -
Flex and ColdFusion web services
I have a simple CFC created that encompasses a function that
has a query. I want to be able to use the web service in my Flex
app, but I am having issues with getting the information from the
CFC.
My function is simple:
<cffunction name="listBySubject" access="remote"
returntype="query" output="false" hint="I grab the newest
stories">
<cfargument name="subject" type="string"
required="yes">
<cfquery name="list" datasource="#myDataSource#">
SELECT linktext, story, photo
FROM pressreleases
WHERE rss_feed = <cfqueryparam
value="#arguments.subject#" />
OR rss_feed2 = <cfqueryparam value="#arguments.subject#"
/>
ORDER BY releaseDate DESC
</cfquery>
<cfreturn list>
</cffunction>
How can I modify that to use in a Flex app's
<mx:WebService>? Do I have to use cfsavecontent and return
XML or can I keep it a query and use it with an ArrayCollection?
Something like:
<cffunction name="listBySubject" access="remote"
returntype="xml" output="false" hint="I grab the newest
stories">
<cfargument name="subject" type="string"
required="yes">
<cfquery name="list" datasource="prmc-media">
SELECT linktext, story, photo
FROM pressreleases
WHERE rss_feed = <cfqueryparam
value="#arguments.subject#" />
OR rss_feed2 = <cfqueryparam value="#arguments.subject#"
/>
ORDER BY releaseDate DESC
</cfquery>
<cfsavecontent variable="storyList">
<magStories>
<cfoutput query="list">
<magStory id="#ISBN#">
<linkURL>#XMLFormat(linkURL)#</booktitle>
<story>#XMLFormat(story)#</teaser>
<photo>#XMLFormat(photo)#</price>
</magStory>
</cfoutput>
</magStories>
</cfsavecontent>
<cfreturn storyList>
</cffunction>
Locally I can use RemoteObject all day with the way it is
normally, but since UofMichigan has BlueDragon, I am forced to
convert my apps to WebServices.Hi,
Here is how to do the web services in coldfsuion.
http://www.quackit.com/coldfusion/tutorial/coldfusion_web_services.cfm
No in flex you call the webservices like:
<mx:WebService id="webService"
wsdl="
http://www.flash-mx.com/ws/months.cfc?wsdl">
<mx:operation name="getMonths"
resultFormat="object"
result="getMonths_result(event);"
fault="getMonths_fault(event);" />
</mx:WebService>
http://blog.flexexamples.com/2008/04/14/calling-a-simple-web-service-from-flex-using-the-w ebservice-class/
I hope this give you the idea.
Rgds
JFB -
How to uoload file with Flex and Coldfusion?
Hi,
I try some application but they can not work well.
Please give me a hit for upload files.
Thanks
MarkSee these FB help topics:
Working with file upload and download
Example: Uploading and downloading files
Class FileReference -
Cfc error when using Flex and RemoteObject (cross post)
I have Flex 3.0.214193 and CF 8,0,0,176276 and Oracle
10.2.0.3.
I've been search for several days for an answer to this one.
There is very little out there about this type of error, but then
there is very little about any problems with Flex and ColdFusion.
In Flex, I have two comment fields. the .cfc has two update
functions that update the comments, because they are in two
different tables. The first update works like a champ. The second
one consistantly shows this error in the CF application log: The
NEWENGREMARK parameter to the updateEng function is required but
was not passed in. I've used the Alert.Show to verify that Flex
does have a value in that variable when it calls the .cfc. I've
even tried passing the first variable that worked in the first
update, and even a litteral value. Everything yields the same
cryptic error message. I must be looking at the wrong thing.
The only things I've found on the web about this, say the
variables should have a scope (is that a scope in Flex or in the
.cfc) and the column names should be in upper case (because it's
Oracle).
Here's the .cfc code (is that where the error is, or is it in
Flex?). The UpdateDescription function works, but the UpdateEng
doesn't.
Thanks for any help, or spelling errors you can point out.
ScottIan,
I also heard about the case thing. So I tried everything in
upper case and lower case - same thing. In my experimenting, I
tried adding the newENGRemark parameter to the descriptionUpdate
function call, I didn't do anything with it is the .cfc just
declared it as required. In that case the parameter exists and
everything is fine. But in the call to the UpdateEng, it doesn't
exist.
I changed the .cfc so that the newENGRemark was not required
or had a default. In both cases the .cfc just skipped to the next
parameter and said it didn't exist. But I was passing a litteral,
it wasn't even a variable.
I created a .cfm page that did a cfinvoke on the .cfc, and
passed it two litterals. That worked fine. So that makes it look
like some sort of syntax error in the Flex. So I deleted the call
to the UpdateENG, copied the UpdateDescription call (because it
works), changed just the minimum to make it work, but it didn't
work.
I think I am going to restructure the database so that I can
do what I need to with just one update function, that seems to
work.
It still doesn't make any sense.
Scott (Flex code is attached) -
SQL Server 2005 and ColdFusion 7
Hi all,
I am using SQL Server 2005 and ColdFusion 7 (standalone) on
XP 64 Bit. I was using the exact setup a couple of weeks ago, but
had to reinstall my O/S due to hardware problems so am back to the
beginning. I remember having a nightmare setting datasources up in
the past, but did manage to find a solution.
I have tried the following:
SQL has TCP/IP Enabled
SQL is set to Mixed Authentication
SQL has a login set to the same as my Windows Username and
password
My database has a user (dbo) by the same name as the login
set in SQL
When I add a datasource in the administrator I enter the
windows username and password (I have tried without either as
well), the server name as localhost and the port as the default
1433.
I always get the following error:
Connection verification failed for data source: DATABASENAME
java.sql.SQLException: [Macromedia][SQLServer JDBC
Driver]Error establishing socket. Connection refused: connect
The root cause was that: java.sql.SQLException:
[Macromedia][SQLServer JDBC Driver]Error establishing socket.
Connection refused: connect
Can someone offer any advice? This is driving me proper nuts.
TIA,
Paulwhen i did it, i had to update my jdbc driver
http://msdn.microsoft.com/data/ref/jdbc/ -
Flex and php file uploader cross browser problems
Hi, I have a problem in flex and php file uploader. It was
working fine in Internet Explorer, but nothing would work in
Firefox and in other browsers. Firefox and other browsers was not
sending the session with the file upload and was producing a login
error. On IE the session cookie is picked up and the upload request
uses the authenticated session, no login error. I'm newbie in flex.
Please help me. Thanks in advance!
Here's my code:
bgupload.mxmlHello, I am Gamaliel Arredondo, i have solved this problem, the error is in the code, you have a mistake in your code, check it out.
The way to run the flex applications, in my case, i installed xampp, in the htdoc directory i put the folder with the files of the application and all is working very well, only when the apache is running because if it is stoped the application show error, please review your code and if you have problems you can contact me by e-mail ([email protected]) i also fought with that problem but i could find the solution, i hope to help you. -
Getting started with flex and Eclipse 3.1?
Hi all,
Im a java Eclipse RCP developer and I wanted to work on some small apps using flex.
I have been searching around on the web for instructions on how to get everything set up, but most of them seem to skip a few steps.
I am using Eclipse ganymede (3.1), and have downloaded the flex sdk. Is there a plugin or something for flex that creates the proper perspectives in eclipse? Or what exactly do I need to do?
Also, I see that flex uses mxml, if I want to use flex and java as opposed to flex and php or coldfusion (the only examples I saw) is that possible? I guess Im slightly confused as to what exactly I am writing this app in... java? Actionscript? Php? ??
Basically my goal is this:
Use eclipse 3.1 (not flex builder)
Write an RIA that can also use AIR
Connect to a MySQL database on the backend
I have very little experience (or need) for J2EE, but maybe I should use it?
Can anyone point me to a good tutorial that will get me going to achieve my goal? Or tell me what exactly I need to install, and how to put it together?
Thank you!You need Flex Builder plugin version.
Trial version here:
http://www.adobe.com/cfusion/entitlement/index.cfm?e=flexbuilder3 -
Flex preventing ColdFusion server from logging exceptions!
Hello all,
Whenever I invoke a CFC from Flex, if the CFC throws an
exception, that exception is not logged in the ColdFusion server
logs. I built an html page that invokes the same page, and when the
exception is thrown it is indeed logged on the server.
Why is Flex preventing ColdFusion from logging the
exceptions!?I've never realized that but you can add a cflog tag to your
CFC or debug the error taking a look at the stacktrace withing FB
debugger. -
Hi I do not want iTunes to open up automatically when I turn on my macbook pro. I tried going to System Preferences>Users and Groups>Login Items and then I took iTunes off the list but it still opens up automatically when I turn on my laptop. What should I do?
Hi r,
Make sure you close iTunes before shutdown. And you're quite welcome.
Maybe you are looking for
-
Bom dia Estou implementando ECC 6.0 e estou com problema referente ao cálculo de impostos para os processos de compras. Ao criar o pedido de compra e incluir o iva ele não está calculando o imposto já realizei alguns procedimentos de revisão desde cr
-
I'd like to enjoy ONE iTunes library on my laptop, which isn't big enough to store all my content, so I'd like my single iTunes library to have a LOCAL drive portion for my music, and then - when I'm at home, have my iTunes library be able to ALSO in
-
Does anyone now, a txn in ECC 6.0 that does the same as ome0 in 4.6? Thanx in advance
-
ITunes reinstalled on win 7x64 but still cannot enable bonjour services for home sharing any ideas
i am trying to reenable home sharing - but bonjour services will not reenable in services although it is stating it has - tried to uninstall and reinstall all apple products/services but still no joy in preferences - the Bonjour Services has bee ndi
-
Looked in Prefs, but cannot find a way to set the default open to be images and NOT smart objects.