Flex and Coldfusion
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
Cliffy
just 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.
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! -
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 -
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
} -
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) -
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. -
Purchase Order Dashboard using Adobe Flex and AIR
Hi ,
I have written a AIR apps for displaying the Purchase Order using OPen source Flex and AIR making Web Service calls to our SAP R3 6.20 Backend System . If anybody would be interested in taking a look at it and expanding the apps please free to post at those forum with the your email ID . I can send the AIR apps along with the source code .
Thnks
VI have uploaded the zip file containing my code . If anybody is interested can download from this link .
http://www.mediafire.com/?8mfesdczsuv
Vinod -
Problem in creating client side PDF with image using flex and AlivePD
I need a favor I am creating client side PDF with image using flex and AlivePDF for a web based application. Images have been generated on that pdf but it is creating problem for large size images as half of the image disappeared from that pdf.I am taking the image inside a canvas . How do i control my images so that they come fit on that pdf file for any image size that i take.
Thanks in advance
AtishayI am having a similar and more serious problem. It takes a
long time to execute, but even attaching a small image balloons the
pdf to 6MB plus. After a few images it gets up to 20MB. These are
100k jpeg files being attached. The resulting PDF is too large to
email or process effectively. Does anyone know how to reduce
size/processing? -
Hi
We are having this requirement , we want to develop a
application using flex for adobe AIR runtime which will communicate
with java in the desktop, we are not having any servers here, so
flex application want to communicate with java classes with out the
help of any server so I can't use httpservice, webservice or
remoting .
I like to know the ways to communicate from flex 3.0(Adobe
AIR) to java files (java takes care of splitting PowerPoint
files and converting it into serious of jpeg files, and
creating ppt files from the objects returned from flex ).
Is there any other way to communicate form between flex and
java in the desktop ??? please give inputs
ThiruHi,
you could use XMLSocket or Socket classes depending on the
type of communication you want to stablish.
I have been testing this for a while although not for a
project.
However my impression is that you need to install the AIR app
which is self-extracted and installed, but in second hand, you have
to install the Java app, that acts as a server, and it must be
executed every time your AIR app is, and the other way around.
Untill now I haven't got any idea on doing this without too
much work, but you can take a look at the Merapi project.
Manu
Maybe you are looking for
-
I have recently upgraded my iMac Intel G5 iSight (iMac5,1) to OS 10.6.8 and now the internal mic does not work with skype or facebook. I can here static when playing back clips. Do I need to update firmware or reload old system parts. I have zapped P
-
Purchase order and Inbound delivery
Hi gurus, Im trying to create an inbound delivery with reference to purchase order. In the configuration i've created a new delivery type similar to EL and said Yes to all the copy controls that system asks. When im creating the inbound delivery with
-
Hi, I am having three tables Payment (Parent) Header (Child) Items (Grand Child) one payment can have multiple header and the header can have multiple item in it. P H H -- level 1 I I I I -- level 2 e.g one payment is having 2 headers and each header
-
Hi, I launched imp to importe a table, actually enough rows are imported but in commande box of win2000pro where I issued imp commande , it does not go on and stopped on import table xxxx how can I stop import ? Just ctrl+c, or kill, or something els
-
Having trouble compressing/burning 16:9 HD HELP!!!
Hello, I have a sequence that I'm trying to export using compressor, to import into DVD SP and burn. The footage was primarily shot on 16mm and P2. There was also some footage shot on one of those high-speed(nano-sec cams- about 1200fps). I'm pretty