CFC and RemoteObject

I currently have an application that calls a CFC via RemoteObject, and results are the filling of a datagrid control. How can I pass an argument to the CFC and then reload the new data. Basically, I need to be able to modify the WHERE clause in the query of my unit based on the user action.

No spachehog your method name must remain unchanged, you send the arguments when you call the Number, so let's say that your application calls the Office receiver in a button, the code will look like this with a parameter binding.

Tags: Flex

Similar Questions

  • CFCS with RemoteObject Pathing

    Hello
    What is the way to corrrect path access CFCs with RemoteObject? I'm so frickin frustrated I have no hair left.
    Look at the post in this forum I believe I'm not the only one. However, no Adobe can post a simple answer.
    No matter how I see my fully qualified parent cfc, I get the message to standard error that it cannot find the component.

    I use the last grazing available on Adobe site CF 7.02 and autonomous FB2. My flex working directory is the default value.

    Can you please explain in plain simple English the correct way to way a cfc with FB2 and < mx:RemoteObject / >

    aaaaarrrrrggggggg!

    Thank you

    Peter,

    2 things you have posted above should be defined to get this working for a typical Web Server installation.

    1.) open the services - config.xml in C:\CFusionMX7\wwwroot\WEB-INF\flex\ file
    find and change the value of

    http://{server.name}:{server.port}{context.root}/flex2gateway/"class="flex.messaging.endpoints.AMFEndpoint"/ >
    TO
    http://localhost/flex2gateway/"class="flex.messaging.endpoints.AMFEndpoint"/ >
    Port number is optional, 80 is default as usual.

    (2.) in FlexB right click your project folder, and then click Properties > flex compiler
    and paste this line into the area of additional args.

    -services "C:\CFusionMX7\wwwroot\WEB-INF\flex\services-config.xml" - local en_US.

    That's all!

    However, I believe that there are bugs in FB2 to watch. When you change the properties and click on apply. The flex build path likes to reset the output folder of
    c:\cfusionmx7\wwwroot\bin which will then cause your page does not and you get a 404 error in the browser. You will need to make sure that reset you the path to your projects output folder again.

    These issues with Remoting are the reasons why all the FLEX examples show that how in the cfroot rather than in your webroot.

    Thanks for your help Peter. See you soon!

  • Application.CFC and the directory mapping

    Hello

    We have a request that we would like to migrate to use Application.cfm to Application.cfc. It is a management application that is implemented on various websites (hosting us) with an "app directory" which is defined as a virtual site directory, with a few variables specific to the site (mostly just a couple of unique customer ID) located in an XML file at the root of each site definition offshore. In other words:

    www.site1.com is customer web app and /configfolder/appvars.xml

    www.site2.org is the same web application for client B and /configfolder/appvars.xml

    The actual application is a virtual directory, say:

    www.site1.com/Mgmt/

    www.site2.org/Mgmt/

    The /mgmt/ folder contains all the real application code - the only thing the root directories do is to hold the handle of the client-specific variables.

    "Historically, what we have done is to have an Application.cfm file in the app folder make a /mgmt/ < cfinclude template ="... / Application.cfm "> so that the same code runs for all sites, but tire of the credentials of the unique site of the folder parent site." But Application.cfm is a bit long in the tooth.

    The problem is that the server does not appear to 'find' the Application.cfc in the parent folder and I'm not sure, there is an equivalent ' cfinclude the file of a directory to the high "(sauf si vous pouvez cfinclude un CFC, dont je ne pense pas que vous pouvez le faire?)."extends"won't be not cut either because we would define a mapping to the top and know what specific Application.cfc" , we will expand when the only thing we know is that the data that we want to be in / configfolder /.

    The only solution I can think of is to use a single Application.cfc and put it in / mgmt /, transfer our customer-specific variables in the XML file, that we read in via cffile to a CF page that can be included in the Application.cfc (if we do not need to know the absolute directory name, as we do now) and then put things like Application.name dynamically , but I do not know if this is kosher. I would have preferred that each site has its own Application.cfc (perhaps by dint of him being a virtual directory?), but when you go to connect to www.site1.com/mgmt/, it does not use www.site1.com/Application.cfc. I have other traditional sites where Application.cfc 'filter' to subdirectories, but there it is in the root folder, you log in to the root folder, and when you navigate to a subdirectory, CF seems to be aware that you are always in the same application.

    I apologize if I did not explain this well and I'm pleased to say whatever it is - would appreciate advice on how to better implement Application.cfc in a scenario of multiple-sites-on-a-codebase.

    Ah, if it's a virtual folder you will have problems. The ApplicationProxy is "the way" it's done, but (as you guessed it) CF looks at the file level and is not aware of any IIS mappings.

    One reason they cannot not just in physical directories? Even using something as a junction of Windows is that they are physically located in a different place?

  • Difference between Application .cfc and .cfm?

    Title says it all. I'm a little confused about the difference between Application.cfc and .cfm.

    I understand a little more about the .cfc, where you define the onRequestStart methods, etc.
    Yet, in one example, that I am following, they use .cfm and the tag < cfapplication >. The two seem to have called, but should I only use a single file? Or?

    Also, since both can be used what is the order by ColdFusion or is ignored if either is present?

    application. CFC gives you more control when the code is running. In an application.cfm file, all code in this file is processed at the beginning of each page request. With application.cfc you can assign code snippets to the appropriate method.

  • Offset and RemoteObject

    Here's the situation: I have a line chart and a DataGrid control, which take data from a SQL database. They do it with a .cfc file called as a RemoteObject. By clicking on the chart are changed, the data provider for the chart and the DataGrid into a new table in the database (actually a subset of this table). All right.

    Trying to get together with a larger SQL database implementation, however, I encountered a problem. When I click on the chart, nothing happens. It worked before, it's the same code, so I go through and make sure that it accesses the database correctly. This is the case.

    Some still fiddling and it turns out that if I click on the chart once, nada... by clicking on it a second time causes the data to pass. It is very good for the DataGrid control, but if I change the data provider for the chart as well, the table is empty and I can't click on it again to 'fix' it.

    Example:
    do not change the graph)
    1) click on the graphic. DataGrid is empty.
    2) click the chart again. DataGrid fills in with the appropriate values.
    b change of diagram)
    1) click on the graphic. DataGrid and LineChart will empty.
    2) ????

    How can I fix it? I have to add a progress bar, maybe? I tried to wait for the change, but nothing seems to change even in this case.

    Hehe... good, it turns out that the problem lies between the Chair and the keyboard.

    It turns out that you can not use integers as the categoryField of an axis, which I did.

  • The THIS Application.cfc and ranges of VARIABLES

    Traditionally this field stores the variables that are used outside the element and stores VARIABLES, well, variable, which are private to the component, right?

    I ask, because in my application.cfc BIFs (like onApplicationStart(), onRequestStart(), etc.), make calls to other components, and there are some values that are initially stored in the application.cfc that must be shared with these components (but I was told that I shouldn't do just these components inherit from the application.cfc)

    What I * WS * this has been calling these methods of a component and passing variables I * WAS * storing in the VARIABLES field as follows:

    <cfset componentObject.methodName(
         firstArg = VARIABLES.var1,
         secondArg = VARIABLES.var2
    ) />
    

    Thing, is that I found, these variables are often needed by a large number of functions throughout the application.cfc.  Should I be storing these values in the PRESENT application domain instead?  Someone told me she is sloppy to send simply all of THIS / VARIABLES of structure as an argument that is not yet defined in the function being called.

    I chose the scope of variables as this scope allows applications using my cfc to change the values of variables in their object.  I have rarely, if ever see a necessity to enable this.

    I suggest the way the values as arguments because my main use of the EFA is to produce reusable code.  In our configuration, (intranet with reusable code available for all applications), it is not sensible for a cfc directly using cfc another variables.  It might work, but it just seems wrong to me.

  • Application.CFC and CSS

    I just started using CSS for the design of my pages, and I'm running a problem with maybe the page footer. My main page is divided into 2 sections (using div tags) the one on the left and the other on the right with a little space between the two.

    my page footer, set in my CFC application now between the two div sneeks instead of stay down (as was the case before I used CSS). What I am doing wrong? How can I get my footer application.cfc defined in the appropriate section (footer div) on my main page?

    Code on the page Structure:

    < body >

    < div class = "resultsDetailHeader" > < / div >

    < div class = "resultsDetailPicSection" > < / div >

    < div class = "resultsDetailDescriptionSection" > < / div >

    < div class = "resultsDetailFooter" > < / div >

    < / body >

    Without seeing the code for the full page and the CSS, it of a guess, but try to add to your CSS footer

    Clear: both;

    See if that helps

    Gary

  • Best practices for the CFC and CFFUNCTION

    I'm curious as to what must be the best place for cffunctions.  Be in the Application.cfc file if they need to be called from various locations throughout a site.

    Or is it a better idea to put the cffunctions on one page and use cfinclude to put the page in pages where functions can be used?

    Or is there a better way to deal with them?

    I have a bunch of small savers of time code

    You can still use an inclusion, of course. You should think about CFC when certain functions share themes in common, when functions become complex, or when the number of functions becomes important.

    Maybe they should all go in a CFC as UDF. CFC.

    Yes, they could go on a CFC, but not necessarily all in a CFC. You should consolidate functions only if they express the behavior of a particular concept. For example, you could do functions that manipulate strings, such as getRandomString, part of StringManipulation.cfc.

    I think I can call one of the several functions in a CFC.

    You can call any number of functions a CFM page or function in an another CFC.

    I did not understand if a CFC is a process, or can be a collection of processes.

    A function through an instance of a component call, as follows, is a process


    However, there are ways to create two or more of these processes to run at the same time.

    I'm not too clear on where put it while it is accessible by all pages of a site.

    As Dan said, you can put inside or outside of the wwwroot folder. The important thing is to distribute your FSTC and CFC in folders so that your application will have a logical, easy to follow structure.

  • AIR of CFCS with RemoteObject

    I have problems of access to a CFC on my local server to ColdFusion from an AIR application.  I get an error that I can not connect to http://localhost:8501 / flex2gateway /

    I know that my CF8 server runs.  I've already activated Flash remoting in the administration console see

    Here's my MXML application file, located in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\Test2\src:

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:WindowedApplication ' http://www.Adobe.com/2006/MXML "layout ="absolute"creationComplete =" init () "> "
    < mx:Script >
    <! [CDATA]
    Import mx.rpc.events.FaultEvent;
    Import mx.rpc.AsyncToken;
    Import mx.controls.Alert;
    Import mx.rpc.events.ResultEvent;

    private function init (): void
    {
    var token: AsyncToken = service.getdata ();
    token.addResponder (new mx.rpc.Responder (resultHandler, faultHandler));
    }

    private void resultHandler(result:ResultEvent):void
    {
    Alert.Show (result. Result.ToString ());
    }

    private void faultHandler(fault:FaultEvent):void
    {
    Alert.Show (Fault.Fault.ToString ());
    }
    []] >
    < / mx:Script >

    < mx:RemoteObject id = 'service '.
    " endpoint =" http://localhost:8501 / flex2gateway / "
    destination = "ColdFusion".
    source = "test1.messageService" / >

    < / mx:WindowedApplication >

    Here's my CFC which is C:\ColdFusion8\wwwroot\Test1\messageService.cfc

    < cfproperty >
    < name cffunction = "getdata" access = "remote" returntype = "string" >
    < cfreturn "it's the return message" >
    < / cffunction >
    < / cfproperty >

    "' Delete the last / endPoint ="http://localhost:8501 / flex2gateway"

  • CFC and the path of the component

    Hello
    I know I must have missed something fundamental here, but I'll be b * d if I can find the answer.
    I searched so I hope someone can help it for days to research.

    Local development on Dreamweaver CS3 SWC component path is: -.
    'Sentinelsystems.actual.includes.Steves.CFCNAME '.
    Everything works perfectly, the world s a nice place.

    Now when you load the entire site to a remote server in the path above obviously won't work.
    The path because on the server remote must be fair: -.
    "moderates. Steves.CFCNAME ".

    This translates the error that CF is not my CFC

    Now, I know that it is a problem I can not find the answer.
    Oh by the way I don't have server access remote coldfusion so the fix must be in the code or my development environment.

    Pointers would be greatly appreciated
    See you soon
    Steve text text

    It is unlikely that your path will begin with a. ((dot) so I would check double that)

    insofar as your local path, you would install in fact just a mapping named "includes", stressed

    C:\ColdFusion8\wwwroot\Sentinelsystems\actual\includes

    so now, you need to reference a C:\ColdFusion8\wwwroot\Sentinelsystems\actual\includes\Steves CFC

    as includes.steves.

  • Several remoteObject call several CFC

    Hello

    I can't figure out how to get multiple CFC data in the same page using < mx:remoteObject / >
    and get the two datagrids to show data to the loading of the page. If someone could put the example code that would be great.
    I "ve google and google but can't find an answer.

    Here is my code work, but I think I'm close.

    ---------------------------------------------------------------------
    <? XML version = "1.0" encoding = "utf-8"? >
    "" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "vertical".
    initialize = "Employees" >

    < mx:Script >
    <! [CDATA]

    Import mx.collections.ArrayCollection;
    Import mx.rpc.events.ResultEvent;

    [Bindable] private var emplist:ArrayCollection;
    [Bindable] private var deptlist:ArrayCollection;
    private void dataHandler(event:ResultEvent):void
    {
    EMPLIST = new collection ArrayCollection (event.result as Array);
    deptlist = new collection ArrayCollection (event.result as Array);
    }


    []] >
    < / mx:Script >

    < mx:RemoteObject
    destination = "ColdFusion".
    ID = 'employees '.
    source = 'flexprojects. StaffDirectory.cfc.employeesGateway ".
    result = "dataHandler (Event)" showBusyCursor = "true" "
    / >

    < mx:RemoteObject
    destination = "ColdFusion".
    ID = "departments."
    source = 'flexprojects. StaffDirectory.cfc.DeparmentsGateway ".
    result = "dataHandler (Event)" "
    showBusyCursor = "true".
    / >

    < mx:DataGrid dataProvider = "{emplist}" >
    < mx:columns >
    < mx:DataGridColumn dataField = "first name" headerText = "First name" editable = "true" / >
    < mx:DataGridColumn dataField = "lastname" headerText = "Last Name" editable = "true" / >
    < / mx:columns >
    < / mx:DataGrid >


    < mx:DataGrid dataProvider = "{emplist}" / >

    < / mx:Application >
    ------------------------------------------------------------------------------------------

    Thank you
    Gerd

    GERD,

    Try using the creationComplete attribute in the Application tag. Call a function that calls both of your CFC. and try to use two separate result management functions.

    http://www.Adobe.com/2006/mxml"layout ="vertical ".
    creationComplete = "init ()" > "


    Import mx.collections.ArrayCollection;
    Import mx.rpc.events.ResultEvent;

    [Bindable]
    private var emplist:ArrayCollection;
    [Bindable]
    private var deptlist:ArrayCollection;

    public void init (): void {}
    Employees.functionNameInCFC ();
    Departments.functionNameInCFC ();
    }

    private void empDataHandler(event:ResultEvent):void {}
    EMPLIST = new collection ArrayCollection (event.result as Array);
    }

    private void depDataHandler(event:ResultEvent):void {}
    deptlist = new collection ArrayCollection (event.result as Array);
    }
    ]]>

    <>
    destination = "ColdFusion".
    ID = 'employees '.
    source = 'flexprojects. StaffDirectory.cfc.employeesGateway ".
    result = "empDataHandler (Event)" showBusyCursor = "true" "
    />
    <>
    destination = "ColdFusion".
    ID = "departments."
    source = 'flexprojects. StaffDirectory.cfc.DeparmentsGateway ".
    result = "depDataHandler (Event)" "
    showBusyCursor = "true".
    />


    I hope this helps!

    James

  • Flex and application.cfc

    Hi all

    I'm under flex 3.5 and coldfusion 8.

    If I add my application.cfc in my flex my flex application file have an error to the appellant of CFCs.

    [Error CPP faultString = "coldfusion.runtime.AbortException" faultCode ="Server.Processing" faultDetail = "null"]
    to mx.rpc::AbstractInvoker / http://www.Adobe.com/2006/Flex/MX/internal:FaultHandler ([C:\autobuild\3.5.0\frameworks\p rojects\rpc\src\mx\rpc\AbstractInvoker.as:290])
    at mx.rpc::Responder/fault() [C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\Responder .as:58]
    at mx.rpc::AsyncRequest/fault() [C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:103]
    to NetConnectionMessageResponder / statusHandler ([C:\autobuild\3.5.0\frameworks\projects\rpc\ src\mx\messaging\channels\NetConnectionChannel.as:581])
    at mx.messaging::MessageResponder/status() [C:\autobuild\3.5.0\frameworks\projects\rpc\src\mx \messaging\MessageResponder.as:222]

    What do I have to configure in my application.cfc to make this work?

    Thank you

    Johnny

    This question. I insert a file blank application.cfc in my folder of CFC and all works.

    Rgds

    Johnny

  • Sharing of CFCS with Flex projects

    I am building a large application that runs our company to replace the old CF/Flash app that I built myself over the past 6 years.
    I use Flex and Cold Fusion CFCS to build the application from scratch.
    This application will consist of 100 lots of smaller applications that handle:
    User management, inventory, specifications, contracts, invoices, missing reports and damage, racing truck etc.

    First of all, I built our ordering system, and then I built the system of inventory.
    I built as separate Flex projects and saw that they used a lot of the same CFC (that I created in each project) and that down the line, I have to change many CFCS and Actionscript (models) if valuables projects I made any changes to the tables of database they called.

    I want to create a set of objects of value of CFCS and Actionscript can be used by any project I'm doing on this site.

    I create these CFCS and files as with "Create CFC" Wizard of Cold Fusion.

    I have seen that I have to change the way I worked in separate projects.

    I thought to do a Flex project with many applications in it, but it seems that it fits well over time and could become a mess.

    It seems to me that in order to make a library Flex project that stops my .as models files and I might add that the library to each project, but I don't think I can call CFCS in this way.

    I could make and publish a Flex project that does nothing but keep the EFA and point my call of remote object to this project but I would not be able to call the .as files, unless I've referenced this project and this solution began to feel like one of my hacks classics that would be a bad choice over time

    Any advice on the errors of global architecture that I do and how I should build to put these assets available to all of my projects/scheme?

    If you want to use the same as classes in several projects, you certainly want to use a Flex library. Your ActionScript classes will be back in a SWC that you can use in the libraryPath of any another Flex project.

    I create and maintain CFCS separately of Flex projects. The reason is that you need to treat them as if you bought them from a third party and want to keeping them on a separate development cycle. For example, A project moves to version 1.5 and needs a change to one of the CFC. You don't want to have to deal with project B who always uses the version 1.0. If you were to buy these CFCS starting from somewhere, how would you be excited? Use it as a guideline.

    Your commune THAT classes that are the counterparts of CFC probably not say much without CFC. So I would include in this library Flex an interface class (RemoteObject) with CFCS that the EFA is independent. Once again, if you need to add or change an AS file in response to a change in the CFC, you have better version control keep these together. Yet once, treat it as a third-party product.

    If your library Flex (in the FORM of classes + RemoteObject calls) now becomes your API for your applications.

    One final note: your projects seems ideal for Flex 2.0.1 Modules. I wrote them a quick presentation on my blog and you can read more about them in the Flex livedocs under creating modular Applications..

    Good luck!

  • Problem with remoteObject...


    Hi, I'm HelloWorld_ro and HelloWorld_ws apps. I can get the ws app to work, however, when I try the app remoteObject, I get the following error thrown:

    (mx.rpc::Fault) #0
    errorID = 0
    faultCode = "Client.Error.MessageSend".
    faultDetail = "error Channel.Connect.Failed NetConnection.Call.Failed: HTTP: failed".
    faultString = "send failed".
    message = "faultCode:Client.Error.MessageSend faultString: error faultDetail:'Channel.Connect.Failed"Send failed"NetConnection.Call.Failed: HTTP: failed '."
    name = "Error".
    rootCause = (Object) #1
    Code = "NetConnection.Call.Failed".
    Description = "HTTP: failed".
    Details = "" http://websrvr01/flex2gateway/ " "
    Level = "error".

    I am running CFMX 7.02 on Tomcat 5.5 and see the following in the log:

    [Flex] 14:34:20.359 [INFO] [Configuration] starting Adobe Flex Data Services Express 2
    [Flex] 14:34:20.359 [INFO] [Configuration] Adobe Flex Data Services Build: 142467
    [Flex] 14:34:20.421 [INFO] [Configuration] my Endpoint-cfamf created with security: no
    to the URI: http://{server.name}:{server.port}{context.root}/flex2gateway/

    I compile the application with: - services "C:\webapps\cfusion\WEB-INF\flex\services-config.xml" - local en_US

    my services-config. XML looks like this:

    <? XML version = "1.0" encoding = "UTF-8"? >
    <>services-config

    < services >
    < id = "coldfusion-flashremoting-service" service
    Class = "Flex.Messaging.services.RemotingService"
    messageTypes = "flex.messaging.messages.RemotingMessage' >"

    < adapter >
    < adapter-definition id = "CF-object" class = "coldfusion.flash.messaging.ColdFusionAdapter" default = "true" / > "
    < / adapters >

    < destination id = "ColdFusion" >
    <>channels
    < Channel Ref = "my-cfamf" / >
    < / channels >
    Properties of <>
    < source > * < / source >
    <!-define the access level of the invoked--> cfc and resolution rules
    < access >
    <!-use ColdFusion mappings for CFCS, by default, only the SWC files under your webroot can be found. ->
    false < use-mappings > < / use-mappings >
    <!-'public and remote' or just 'remotely' methods to be called->
    < method access level > distance < / access method-level >
    < / access >

    < property cases >
    <! - the property names of CFCs - >
    < force-cfc-tiny > false < / force-cfc-lowercase >
    <! - query column names - >
    < force-query-tiny > false < / force-query-lowercase >
    <! - the struct keys - >
    < force-struct-tiny > false < / force-struct-lowercase >
    < / property cases >
    < / properties >
    < / destination >

    < / service >
    < / services >

    <>channels
    < channel-definition id = "my-cfamf" class = "mx.messaging.channels.AMFChannel" >
    "" < endpoint uri = ' http://{server.name}:{server.port}{context.root}/flex2gateway/ ' class="flex.messaging.endpoints.AMFEndpoint"/ >
    Properties of <>
    > extension of the poll < false < / mark-enabled >
    < serialization >
    false < instantiate-types > < / instantiate types >
    < / serialization >
    < / properties >
    < / channel-definition >
    < / channels >

    < record >
    < class = "flex.messaging.log.ConsoleTarget target" level = "All" > "
    Properties of <>
    [Flex] < prefix > < / prefix >
    < includeDate > false < / includeDate >
    < includeTime > true < / includeTime >
    < includeLevel > true < / includeLevel >
    < includeCategory > true < / includeCategory >
    < / properties >
    <!--
    possible values:
    DataService.General
    DataService.Transaction
    DataService.Hibernate
    DataService.coldfusion
    Message.*
    Message.General
    Message.Data. *.
    Message.Data. (-name of the operation)
    where the name of the operation is one of create, extra, get, update, remove, batch,
    page, County, get_or_create, create_and_sequence, multi_batch, processed, get_sequence_id,.
    association_add, association_remove, fillids, refresh_fill, update_collection
    Message.Command. *.
    Message.Command. (-name of the operation)
    where the operation name is a subscribe, unsubscribe, poll, poll_interval, client_sync,.
    server_ping, client_ping, cluster_request, login, logout
    Message.RPC
    Message.ColdFusion
    Service. *
    Service.Cluster
    Service.HTTP
    Service.Message
    Service.Remoting
    Endpoint.*
    Endpoint.General
    Endpoint.Deserialization
    Endpoint.AMF
    Endpoint.HTTP
    Endpoint.RTMP
    Security
    MessageSelector
    Configuration
    Resources
    ->

    < filter >
    < model > Endpoint.* < / pattern >
    < model > service. * < / pattern >
    < model > Configuration < / pattern >
    < model > Message.* < / pattern >
    < / Filters >
    < / target >
    < / recording >

    <>System
    < / system >

    < / services-config >


    "Any idea why I get: Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: failed '?

    Thanks in advance

    I discovered that I have to add - context-root /cfusion the additional compiler arguments.

    See http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=583&threadid = 1210639

  • What happens if RemoteObject call returns a recordset empty?

    I'm working on a plan to send a request to a cfc and return a query. The following model gives me what I want, when I come back at least 1 card.

    RemoteObject < = (Get some recordset) = > query calls CFC tbl db < = (recordcount > 1) = > event handler throws the query as an arrayCollection collection.

    But, when the cfc returns a recordcount = 0 the arraycollection collection has nothing in it to evaluate.

    In CF I use < cfif not recordset.recordcount is 0 > This

    How can I set this up in a flex project?

    Thank you.

    If you return a query with a recordCount 0, chances are flex will receive a null value or a value empty, so in your handler in Flex, you can implement an if statement in your manager who determines the action to take depending on what the cfc returns... for example:

    ----------------------------------------------------

    private void cfcReceiver(event:ResultEvent):void
    {
    If (event.result! = null & event.result! = ")
    {
    _arrayCollectionName = event.result as ArrayCollection collection;
    }
    on the other
    {
    do something else
    }
    }

    ----------------------------------------------------

    I hope this helps.

    -Tony

Maybe you are looking for

  • get the message "could not initialize the browser security component" offers solutions does not

    I get a message "could not initialize the browser security component" more a screen empty. 5 solutions offered in aid, only to create a new profile help, but this helps only for this session! So, I'll have to create a new profile each time I start Fi

  • DeskJet 3520: How to replace the printhead for Deskjet 3520

    After 5400 pages, I got the 0xc19a0042 error on my printer. I changed the ink without best result. But when I opened the printer and cartridge and printerhead support touch, I often can print a few prints before the error will appear again. It cannot

  • [BUG] [OS: 6.0.1] [Model: Z5/C] No keyboard by default when the default keyboard is uninstalled

    Hello I've been playing with the keyboard and other keyboards for compact and have encountered a small bug. Probably not this joint because I doubt anyone would have done what I'm doing, but it's quite possible to happen for other users and easily re

  • Help with live messenger blackBerry Smartphones

    I just got this blackberry for my birthday and it doesn't have msn messenger top and it says for att that it available but I can't find to download anywhere and since I don't have webservice my phone I can't use my phone links to get it and I can't f

  • CS6 and Mobile Apps

    Greetings.All my work is done on Production Premium CS6 on my desk. I will soon get a Pro for the Ipad. I read that you can start a project in say Illustrator draw App and then send it to CC where you could open in Illustrator and end it there. Same