How to use Flex Builders Auto Generated CFCs

OK. Not only have I already gone to a 4 day flex training,
have an advanced coldfusion certification and work with 3 coworkers
who have done the same...none of us can figure out how in the heck
the flex builder's autogenerated cfc's are to be used. No big deal
on the fact that this might be something we simply are encountering
for the first time, but the complete and utter absence of a single
piece of example code or documentation stating how to use this code
correctly is very very very very irritating.
Can anybody, share with me anything about how these CFCs are
to be used correctly. For example. We are using the wizard to
generate an "Active Record CFC" set of cfc's for an example table
contain four fields. We have a data grid that is now populated by
the "getAllAsQuery" function....we would like to implement the
feature of making this dataGrid updateable. We know how to pass
data back and forth and yes we could write our own CFC to do
this...but having it autogenerated is a really neat option...but
the question remains....how does one use them!!!
Any help would be much appreciated. Thanks in advance!

Hi there, what's your name by the way?
What is a VO or DTO, and why would you use it?
This was copy from the Java world, so it's a very OOP principle, basically in the OOP world everything is a class that has methods and properties, and you represent everything with classes, a VO is just that a class that represents an entity in your app. You use it for a few reasons in my opinion:
It allows you to pass strongly typed data between different layers in your app.
It's more verbose, it's a good OOP practice, and also makes debugging and reading you code easier.
It allows easy data type conversion between CF and Flex.
You obviously know how to use the wizards, after you select your table and open the wizard you'll see three different CFC types, if you're using LCDS then select that type if you don't I'll recommend you to go with BEAN/DAO. In Flex Builder you can create a folder link to a system folder, so if you create a folder named MyCFCs and you set this virtual folder to be hold inside c:\ColdFusion8\wwwroot every file that you put in this folder will be place in c:\ColdFusion8\wwwroot so you don't have to manually copy those files.
In this wizard you'll see CFC folder in there you can select your virtual folder, you'll see below the CFC package name this is extremely important to be set right, what is the CFC package name? Basically it's the same folder structure where your CFCs will be located for instance let's say you're gonna place the files in this folder structure c:\ColdFusion8\wwwroot\com\myPersonalDomain\ so your CFC package name will be com.myPersonalDomain.
You'll probably also would like to enable the option: Create an ActionScript value object in addition to CFCs, the folder where you place this file have to mimic the CFCs folder structure so for an instance you'll have to save inside your src folder, inside a folder com, an finally inside a folder myPersonalDomain . src/com/myPersonalDomain, and the AS Package name should be the same as the CFC.
Once you're done and click finish, you'll see for files created, one of the the AS VO , and three CFCs.
yourDataTable.CFC
This is a CFC that creates the VO or DTO in CFC, it has the same properties definition that the AS version has, also the setters and getter for every property.
yourDataTableDAO.CFC
This CFC contains all the code that handles the database access it a could be an insert, update delete or just a read query.
yourDataTableGateway.CFC
This is a bridge between your Flex app and your CFCs, it contains a set of methods commonly use when you access a DB, this CFC invocates the methods in the yourDataTableDAO.cfc and returns an object or an array of objects of yourDataTable.CFC type to Flex.
In Flex what do you have to do in order to use VOs?
Add a reference to yourDataTable.as class
Create a remote object.
Create the event handler(s)
Make a call to the remote object.
<mx:Script>
     <![CDATA[
               import com.myPersonalDomain;
               import mx.controls.Alert;
             import mx.rpc.events.ResultEvent;
              private var myDummyVar:myDataTable;
          private function myEventHandler(e:ResultEvent):void{
               //do Something
               trace(event.result.toString());
     ]]>
</mx:Script>
<mx:RemoteObject id="myRO" destination="ColdFusion"
source="com.myPersonalDomain.myDataTableGateway">
     <mx:method name="getAll" result="myResultHandler(event)"
fault="Alert.show(event.fault.toString())" >
</mx:RemoteObject>
<mx:Button label="Call CF" click="myRO.getAll()" />
Well I hope this would help you, I'm kinda tired this has been by far the largest post I've written.

Similar Messages

  • How to use PPF customizing Auto GR after packing

    Our Goods Receive Business scenario is
    1. Filled Batch in EWM Inbound Delivery           
    2. Manual Pack product to Handling unit
    3. After packing, Automatic Good Receive
    4. Then create Warehouse Task automatically .
    Question
    We want to know how to use PPF customizing Auto GR after we Pack product to Handling unit?
    Can anyone help us to figure out that problem?
    Thank you
    Chang

    Hi Faical,
    I have set configuration as below, but it does'nt work.
    Can you help us to figure out the reason.
    We are appreciate your help!
    2. Manual Pack product to Handling unit
    3. After packing, Automatic Good Receive
    method: /SCWM/AU_GR_POST in processing details and for schedule condition:  /SCWM/WHR_FULL_PACKED. 
    time of processing : processing when save document
    3.After packing, Automatic Good Receive
    4. Then create Warehouse Task automatically
    method: /SCWM/AU_GR_POST in processing details and for schedule condition: /SCWM/TO_CREATE
    time of processing : immediate processing

  • How can I customize the auto-generated WSDL when using a PL/SQL webservice?

    My webservice returns a refcursor as an ArrayOfString. (I followed the sample code.) Instead of everything being returned in one large array, I need to create a correct record hierarchy, like <rec1><fld1></fld1></rec1>, etc.
    As far as I know, this grouping has to be done in a WSDL file. However, following this sample, the WSDL is auto-generated and overwritten with each launch of the webservice.
    Am I missing something, or are there other secrets/tips?
    thanks

    Very Nice:) Thanks!
    1. I added this to my HTM HEADER:
    <script language="JavaScript" type="text/javascript">
    function test_javaprompt () {
    var Hours = prompt("How Many Hours?");
    $x('P142_HOURS').value = Hours;
    doSubmit()
    </script>
    2. I Created an Item:
    P142_HOURS
    3. I Created a Button:
    TEST_JAVA
    a. In the Button area for, Optional URL Redirect, I selected- Target is a URL
    b. URL Target- javascript:test_javaprompt();
    When I press the Button then it does Exactly what I want it to do.
    Except....
    Ultimately, I do not want this javascript assigned to the button.
    I would like to run this javascript when the value of a DatePicker Item, (P142_DROPS_SUBMITTED) is changed.
    If you can help me with that then I'll be forever grateful:)
    -Gary

  • Using taskFlow in auto generated human task

    Hi,
    I have auto-generated ADF human task which have simple payload with InvoiceId attribute.
    In worklist app I see this attribute and in page source there is an input text with value set to #{bindings.InvoiceId.inputValue}.
    I would like to add my custom task flow, which takes invoiceId as a parameter. When I set this parameter to #{bindings.InvoiceId.inputValue} I obtain strange errors.
    How should I set this parameter to the payload value? (I am using JDev 11.1.1.5.).
    kind regards,
    Krzysztof Polak

    I would like to add my custom task flow, which takes invoiceId as a parameter.Does that mean you have dropped your own task flow as a ADF region into your auto generarated page and you are passing InvoiceId as input parameter to the regionBinding ?

  • How to use Flex tag library in jsp

    Hi All,
    We are planning to use flex in our J2EE application in order
    to show some charts. Our j2ee application is in JSP,Struts. I have
    searched on google about this and found that I can include flex 3
    tab library in the jsp in order to use mxml tag in the jsp. I have
    written a sample program in the jsp which uses flex.
    <%@ taglib uri="FlexTagLib" prefix="mm" %>
    <SCRIPT LANGUAGE="JavaScript">
    function showMessage() {
    message.value = "Use this application wisely";
    function hideMessage() {
    message.value = "";
    </SCRIPT>
    <mm:mxml border="5" onmouseover="showMessage();"
    onmouseout="hideMessage();">
    </mm:mxml>
    <TABLE>
    <TR>
    <TD><input type="text" name="message"
    size="50"></TD>
    </TR>
    </TABLE>
    I have added entry inweb.xml. See below,
    <taglib>
    <taglib-uri>FlexTagLib</taglib-uri>
    <taglib-location>/WEB-INF/tlds/flex-bootstrap.jar</taglib-location>
    </taglib>
    Following are the problems that I am currently facing.
    1) Could anybody let me know whether the entry of
    <taglib> tag is correct in the web.xml. Is it the correct
    jar(flex-bootstrap.jar) that I should include?
    2) If yes, from where to download it? or
    If no, what is correct jar that i should include and how?
    your response will be highly appriciated as this is the major
    requirement in our project?
    Thanks ,
    Chandan

    Hi,
    Pleas find details at the URL below.
    http://labs.adobe.com/wiki/index.php/Flex_2_Tag_Library_for_JSP
    Hope this helps.

  • CS3 missing components or How to use Flex 2 components in CS3

    Does anyone have a good resource for how to use Flex2
    components in CS3?
    I found an install that said it would install Flex2
    components in CS3, but all it added waas the UIMovieClip for
    packaging Flash MC in swc's for Flex.
    Right now I am specifically trying to solve the missing
    dateField component in CS3.
    But I would like to find out if anyone has found a good
    resource for alternatives to all missing components in CS3.
    I'm hoping the answer is not to build them from scratch.
    Thanks,
    Hunter

    Hi,
    Pleas find details at the URL below.
    http://labs.adobe.com/wiki/index.php/Flex_2_Tag_Library_for_JSP
    Hope this helps.

  • How to use $FLEX$ for DFF segment

    We have below requirement for “Add'l Salary Admin. Details” DFF.
    we have three segments:
    Current Additional Amount -first segment
    Additional Allowance Change % - second segment
    New Additional Allowance - third segment
    e.g.
    Now first segment has fixed value, Assume it is 2000 AED
    And in second segment if value is 3
    Then third segment should show the value: 2000 + 2000 * 3/100
    Third segment is dependent on segment1 and segment2.
    I think, we can achieve this by using $FLEX$
    But I need your guide line, how can we do that?

    below solution is only possible solution.
    Hi,
    Keeping the default SQL statement on its place, use table based value set for segment3 which contains all values from 0 to let say 1,000,000 (such that your calculated values falls in the range).
    Try it. It segment3 will now calculate on the basis of values of segment1 & 2.
    Regards
    Ayaz
    Thanks for everyone's input.

  • How to use $FLEX$ to pass FROM and TO param to another FROM and TO param

    Hello All,
    I have 2 parameters from customer and to customer, both these have same LOV,
    I have to add 2 more parameters from location and to location
    If i use $FLEX$.customer_LOV to pass to the from location LOV how can i use $FLEX$ to pass the TO customer LOV to TO Location LOV.
    As per my knowledge $FLEX$ can be passed from top to bottom in the list of parameters.
    Is there any other way to restrict.
    Regards,
    Sandeep V

    Hi,<br /> I am trying to configure BlazeDS with JBOSS Application Server.<br /> I have downloaded BlazeDS binary version - blazeds_bin_3-0-0-544.zip from Adobe. But in the installation steps, it says that copy blazeds.war, samples.war and console.war into <JBOSS_HOME>/server/default/deploy folder. But in this zip, it contains only blazeds.war file only. I have copied it to <JBOSS_HOME>/server/default/deploy folder.<br /><br />I have restarted JBoss. I didn't get any error. But when i give <br /> http://localhost:8080/blazeds ... i am always getting "Page not found 404" error.<br /><br />Please help me, if you have detailed steps to configure BlazeDS on JBoss.<br /><br />Thanks for your time.

  • How to use Flex with EJB3?

    Anybody know how to integrate Flex with Java?
    I have a EJB3 project with JPA etc...
    Have to use Eclipse with Flex plugin or can i use Flex Builder and Eclipse only for java classes? (preferring the second option)
    I'm getting crazy, because need this for my college work, too fast as possible.
    Please any explanation or sample.
    Thanks everyone.

    Matt you say, i do not need to write servlet, create wsdl...
    But if i dont do this, my Java Business Rules will be visible to client ?
    If yes...
    1- I need to write Servlet to use HTTP protocol to connect with Flex, then create wsdl of my EJB3.
    2- This wsdl will create client side of my application, then i create my Flex interface normally using HTTP Blaze DS ?

  • How to use application builder to generate installation disk without compiling the the support files?

    Hello,
    What I am trying to do is to use LV application builder generating an installation disk without compiling the support files. I mean:
    the support fils like the help files are located on a different directory , for example, installation disk is D drive, help file directory is: D:\Help\...,  not compiled in the installation Data set.
    So,  when the installation disk is running, it only copy this directory file into the destiny directory. Of course, we can write a different bat file to do this. However, beside this method, is there any way, like using LV application builder to do this without writing a batch file.  Any suggestion will be appreciated.

    For LabVIEW 7.1, this can be done in a few short steps. First, add your help file as a support file in the Application Builder. Then go to the Installer tab, choose to create an installer and click on the Files button at the bottom. From this dialog (shown below), you can specify the destination for each component in your install package. If you have added your help file as a support file, it will show up in the Files in Installation list. Click on your help file to highlight it. You can now choose where to install the file to by specifying an installation destination and a subdirectory. The default subdirectory is called data, but if you want to change that, just type in a new subdirectory name as I have done below:
    Hope this helps!
    Message Edited by Jarrod S. on 01-23-2006 10:17 AM
    Jarrod S.
    National Instruments
    Attachments:
    Support Files.JPG ‏31 KB

  • How to use Flex Components with Flash?

    Hi!!
    I found a lot of very useful components in the web, but they are all for  Flex, is it possible to use Flex Components with Flash IDE?
    Thanks !!!
    jenry
    PS: this is one of the components I need to use (a tree with checkbox  nodes)
    http://www.sephiroth.it/file_detail.php?pageNum_comments=30&id=151
    another one:
    http://www.darronschall.com/weblog/2006/09/a-flex-2-checked-tree-control-component.cfm

    Flex components are delivered as SWCs just like Flash components, but the
    SWC format is incompatible with the Flash IDE.
    Also, the default fl.. components in the Flash IDE are incompatible with
    Flex components.
    You should be able to load a Flex SWF into a Flash SWF as long as you aren't
    using fl.. components in the Flash SWF.  If the Flex SWF overlays things
    in your Flash SWF then it might block interaction, but otherwise it
    shouldn't.  I don't think the statement you quoted is true for all
    configurations.
    But loading a Flex SWF into a Flash SWF isn't going to help you use those
    Flex components from your Flash IDE.  Try Flash Builder 4 to build out the
    Flex portion of your application.  I haven't tried it myself, but it I think
    it is supposed to have better integration with Flash.

  • How to use Flex in JSP

    Hi ,
    I am new to Oracle BPM . I have created a sample Process flow with Two Participants and two roles .And Also i have created the ScreenFlow using Jsp's . Now my problem is we need to integrate Adobe flex inside Jsp's or is there a way we can directly use Flex mxml files for UI . Is there way to use Taglibs which supports Adobe Flex in Jsp ..?
    Thanks,
    KM
    Edited by: user7711237 on Sep 23, 2009 5:00 AM

    This is a very interesting question. Please pardon my limited knowledge of OBPM and Flex, but it sounds like there are a couple of options.
    1. PAPI - build an external web app with Flex front end and a server server-side component that uses PAPI (or PAPI WS) for integration with OBPM
    2. JSP - this is a lot more hacky (if at all possible) - build custom JSPs using the standard OBPM taglibs, etc., and Flex app. Then use Flex / JavaScript interaction to invoke submit the from on the JSPs.
    Here are a few links for #2
    http://www.switchonthecode.com/tutorials/flex-javascript-tutorial-simple-interaction
    http://www.vipercreations.com/tutorials/Adobe%20Flex/35/
    http://www.abdulqabiz.com/blog/archives/2005/04/28/calling-a-flex-function-from-javascript/
    It almost sounds like #1 might be a good long-term solution for complex UIs, while #2 would fit better for a smaller and more simple Flex UI that need to be developed quickly. Hope others might offer better suggestions.
    HTH.

  • How to use flex Component Kit to make a button

    Hi all.
    i have a little confuse about use Flex Component Kit to make a simple button.
    i try to use Flex button templte in FlashCs3 to make a button.
    the three frame i draw like this way:
    on:
    [url=http://xs.to][img]http://xs142.xs.to/xs142/09332/snap1958.jpg[/img][/url]
    over:
    [url=http://xs.to][img]http://xs142.xs.to/xs142/09332/snap3362.jpg[/img][/url]
    down:
    [url=http://xs.to][img]http://xs142.xs.to/xs142/09332/snap4122.jpg[/img][/url]
    but , when i mouse over the button , it seem turn to over frame one second.
    and then the colour turn to overFrame colour but the size is onFrame size.
    same happen when i click the button .
    somehow ,the colour turn to what i want, but the size still the same as onFrame , no matter over the button or click the button.
    can i make the button size different with normal button size?
    thankes.
    link:[url]http://up.izy8.cn//up1/1250033814.swf[/url]

    Hi,
    this is from the ADF Developers guide which is available on OTN:
    if (!password.equals(confirmPassword))
    FacesMessage fm = new FacesMessage();
    fm.setSummary("Confirm Password");
    fm.setDetail("You've entered an incorrect password. Please verify that you've
    entered a correct password!");
    FacesContext.getCurrentInstance().addMessage(null, fm);
    }Brenden

  • Advice on Learning how to use Flex Data Services

    Hi. I've been using flex for a while and I'm now at the stage
    where I'd like to be able to develop AIR apps. I wanted to do
    something simple to start with...eg. have an AIR app on a few
    friends desktops that lets users tick a box if they can make it to
    a poker game. Do I need to learn another language like PHP to do
    this or can it be done using just Flex? Other than the live docs
    and dev guide that come with flex are there other
    documentation/online info that can be recommended.
    Thanks!

    the LCDS sql assembler might be a good fit for you. it allows
    you to do sql crud from flex. there's not server side coding, just
    xml config.
    http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/help.html?content=dms_st andard_assemblers_2.html#334899

  • How to use an SWF file generated by Flex as a Stand Alone file

    Whenever we compile an MXML file, there is an SWF file
    generated. This file is not a standalone file and will not work on
    any other computer expect on the computer where there is a Project
    file created by the Flex builder.
    Why am I not able to use that SWF file as a stand alone file?
    If I want to use that SWF file alone as in the SWF generated
    by Flash what do I have to do?
    Regards,
    Rashmi

    The swf file will run from anywhere. What's it doing when you
    try to open it on another machine?
    The only thing I can think of is if you're getting a security
    violation in which case you would need to read about Flash Player
    trust files and security.
    -Mac

Maybe you are looking for