Ask Me

On this page we can discuss on topics, which I have not blogged on.  :)

335 Responses to “Ask Me”

  1. Chandu Says:

    Hi Sujith,

    I am new to Flex and ActionScript world, I am basicall a java programmer, I have read to some extent about Flex and used the examples on the adobe sites. I have tried BlazeDS as well. Though I was able to run the example in the tutorial, it was rather a simple example. I am trying to map a Java Object which is complex, and Object that has more objects inside it and those objects have some objects and so on.. to a certain level, how Can I map such complex types to action script objects. Can you please provide me with a working example if ppssoible.

    Your help will be greatly appreciated

    -Chandu

  2. Sujit Reddy G Says:

    Hi Chandu,
    Lets say you have an object Student which contains properties named Address, Courses and Profile. All the three properties are different objects of respective Class types. When you are passing a object of the type Student to the Flex application, it will contain objects of the type Address, Courses and Profile right? In order to get all these objects mapped to your AS objects, all you have to do is to create AS objects of the type Address, Courses and Profile and map them to the respective Java classes individually. This applies, even if you are passing the objects in a ArrayList from Java; You will receive them as ArrayCollection, with the objects converted into mapped AS object :)
    Hope this helps. If not let me know, i will try to give you a sample :)

  3. Chandu Says:

    Hi Sujith,

    Thanks for your prompt reply. I will try out your suggestions. But if you can provide me a sample if you get time, that will be great too.

    Thanks a Lot again.
    -Chandu

  4. Chandu Says:

    Hi Sujith,

    Can you please provide and example, say something like you mentioned.List of Students , I want to be able to have a page display list of students with their names courses they are taking etc, but this data should be retrieved from the Java Class,

    In this scenario, where does the Action Script fit. I mean my understanding is
    1) I will create a flex app i.e mxml file which will invoke the Java class like you described in one of your blog posts. But now to interpret the complex Object type returned by the java class I need Action Script objects to map to Java Objects,,…

    2) I will also write the java class and put the classes in the WEB-INF folder etc

    3) I will click a button to get the data from the page

    In the above scenario,,,
    a) where exactly will I need to create .as file mapping,
    b) which folder should the .as file reside in
    c) how will the client flex map know to render the data in a grid, table or text area etc

    The above are some areas I am still in dark.

    Your help will be greatly appreciated

    Regards
    -Chandu

  5. Sharathchandra Says:

    Hello sujith,

    I’m sharath, i think u remember today only i’m requesting u at the end of the elimination round in Hyderabad Boot Camp.Anyway things went wrong i didn’t had a chance to participate in the next round…Ok i have asked you the question about database but still i had a problem in connecting to it…Ok Let me ask this one I’m developing a Cricket Score analysis application using charts i succeded up to some extent…Actually my plan was to implement it in BootCamp..I completed most of the coding part but my problem is when i take the score for a team i’m using a ArrayCollection for both the teams…It sounds good for only one match score but i want to create a generic application where i want to take the match scores from the users what ever they like and store it in database.Can you please help me reagarding this one and onemore thing i’m a asp.net user.If u can provide me some code snippets it will be help ful to me.If you want i will send my application code..Please give me your Mail address. Thankyou…

  6. Sharathchandra Says:

    Hi i created a blog for me in wordpress.In that i posted my application.I want to enhance that applicaiton using .ASPX.How to do that help

    http://sharathchandra.wordpress.com/

  7. Praveen Says:

    Hi Sujith,

    Iam trying to use Flex with Weblogic(8.1.5) portal application. When i use HttpService to make call to the server, it returns the contents from the server, but it invalidates the existing session. Iam not able to access any other portlets.
    When i use remote object call it gives me SSL handshake error.
    How do i resolve this. Pls help me out

  8. Sujit Reddy G Says:

    Hi Sharath,

    Application looks great. You have to use some server side script to connect to the database from a Flex application. You have three options to interact with the database. You can create a .ASP page which will listen to your request and do the database operations. You can also expose the .NET functions as web services and access them from the Flex application. If you are looking for a RPC kind of solution, where in you want to invoke the functions in the .NET object from your Flex application, you can try WebORB. Below is the URL to the weborb site. You can even find code samples for all the above options i.e. web service/http service/RPC
    Hope this helps.
    http://www.themidnightcoders.com/weborb/dotnet/

  9. Sujit Reddy G Says:

    Hi Chandu,

    Your question was on how to map AS objects to Java objects. I have created a post on this, check this post on my blogs: mapping-action-script-objects-to-java-objects

    Your AS class should reside in your Flex application and the mapping to the Java class is done in the AS class.
    Rendering the data in a datagrid is completely a different problem. If you want to populate a datagrid with the ArrayCollection you can use the dataProvider property of the datagrid. In case of the text input or anything else, you have to retrieve the value from the object (returned by Java) and then set it to the appropriate property of the component. Please refer to the language reference of the respective components details.

    Hope this helps.

  10. Sharathchandra Says:

    Thank you for your reply sujit. I’ll try to use weborb. I want see those applications of HYDERABAD BootCamp winner can u please post them…

  11. Chandu Says:

    Hi Sujith,

    Thanks for the reply, in fact i was able to overcome the AS script mapping with Java , now I am trying to dynamically create a data grid using the script and populate it with data from the java remote object, but doesnt work , I have pasted the mxml code , do u think it is right way of doing things ???

    Please help.

    Regards
    -Chandu

    ////////////////////////////

    <![CDATA[
    import mx.events.FlexEvent;
    import mx.rpc.events.ResultEvent;
    import mx.binding.utils.BindingUtils;
    import mx.collections.ArrayCollection;
    import mx.controls.DataGrid;
    import mx.controls.dataGridClasses.DataGridColumn;
    import mx.containers.Panel;
    import mx.controls.listClasses.ListBase;
    import mx.rpc.remoting.mxml.RemoteObject;
    // A data provider created by using ActionScript
    //[//Bindable]
    //private var employeeList:ArrayCollection ;
    [Bindable]
    private var ro1:RemoteObject = new RemoteObject(“prctest”);

    //employeeList=ro.getEmployeeList1() as ArrayCollection;
    [Bindable]
    private var dg:DataGrid = new DataGrid;
    [Bindable]
    private var pn:Panel = new Panel;
    [Bindable]
    private var dgc:DataGridColumn;

    private function buildDG():void
    {
    var aColumnDef:Array = getColumnDefArray(); //returns a noraml array of objects that specify DtaGridColumn properties
    var oColumnDef:Object;
    var aColumnsNew:Array = dg.columns
    var iTotalDGWidth:int = 0;

    for (var i:int=0;i<aColumnDef.length;i++) { //loop over the column definition array
    oColumnDef = aColumnDef[i];
    dgc = new DataGridColumn(); //instantiate a new DataGridColumn
    dgc.dataField = oColumnDef.dataField;
    dgc.headerText = oColumnDef.headerText; //start setting the properties from the column def array
    dgc.width = 100;
    // iTotalDGWidth += dgc.width; //add up the column widths
    // dgc.editable = oColumnDef.editable;
    //dgc.sortable = oColumnDef.sortable
    dgc.visible = true;
    //dgc.wordWrap = oColumnDef.wordWrap;
    aColumnsNew.push(dgc) //push the new dataGridColumn onto the array
    }

    dg.id=”list”;

    dg.columns = aColumnsNew; //assign the array back to the dtaGrid
    dg.editable = false;
    dg.width = 400;
    //dp.dataProvider=;
    dg.dataProvider = ro1.getEmployeeList1.lastResult; //set the dataProvider

    this.pn.addChild(dg);
    this.addChild(pn);
    }

    //uses the first product node to define the columns
    private function getColumnDefArray():Array
    {
    //Alert.show(“colcount:” + xmlCatalog.toXMLString());
    var aColumns:Array = new Array();
    var oColumnDef:Object;
    var empName:EmployeeName;
    // for (var i:int=0;i

    ////////////////////////////

  12. Chandu Says:

    Hi Sujith,

    How Can I create dynamic data grid and populate it with data from a jave invoked remote object. In the code I pasted above, i was able to create the grid,,, but when I provide it with the dataprovider I get error and it does not work.. can you please help me

    - Regards
    -Chandu

  13. Sujit Reddy G Says:

    Hi Chandu,
    [Small correction]
    Please try changing this line
    ro1.getEmployeeList1.lastResult
    to
    ro1.getEmployeeList1.lastResult as ArrayCollection

    and also make sure the getEmployeeList1() method is invoked. :)
    Hope this helps.

  14. Sujit Reddy G Says:

    Hi Sharath,

    I will post the applications developed at the Flex Boot Camp in Hyderabad as soon as possible. We have requested the KMIT college staff to burn a CD and send it to us :)

  15. Mark Says:

    Hi Sujit,

    I’m playing around flex and blazeds for a while now and still pretty confused at it. I found your tutorials easy to follow but i still have a question.

    I can now send and receive messages through topics and using JMS-adapter. But my problem is the authentication of users, can i authenticate users through topics? can you help/guide me on login/authentication part? i don’t know what approach i will do to make this.

  16. Barry Says:

    It seems that the returned data in this case must be processed synchoronously via a result listener. Try the following to see if it works for you,

    private var ro1:RemoteObject = new RemoteObject(”prctest”);
    ro1.getEmployeeList1.addEventListener(“result”, buildDG);
    ro1.getEmployeeList1();

    private function buildDG(event:ResultEvent):void {
    //build your DG here….
    dg.dataProvider = event.result;
    }

    Note that event.result seems exists only in the event handler, so you won’t be able to assign it to a shared variable and use it in a different function.

  17. Neil Says:

    Hi Sujit
    We need some help. We have a Java Applet that captures images on a users desktop. How can we convert the image from a byte array to string to pass to FLEX. Is there a better way to pass the images from the Applet to Flex?

    Any ideas would be greatly appreciated. Also do you have time for any consulting on a project??

  18. John Says:

    Great site and useful content! Could you leave some opinion about my sites?
    My pages
    [url=http://ownsite.com/b/]My pages[/url]
    http://ownsite.com/p/ My pages

  19. Pravi Says:

    Hi Sujit,
    What a lovely blog!! So useful for us.
    I’m Praveena. We’ve a plan to develop one financial portal. I’m just thinking of using technologies like JBoss portal, Adobe Flex, BlazeDS.
    Can you pl give a overview how can i achieve this? Or where can i get architecture using the three technologies? Can I use Eclipse IDE for development?
    Pl let me.
    Thank you so much.

  20. Chandu Says:

    Hi Sujith

    I am able to work with BlazeDS , is it necessary the package structure for AS and Java classes match for mapping them,

    for ex:
    can I have a java object in package say com.abc.data.util

    and the mapped actionscript class in package com.abc.client.flex.util

    I have tried it and its not working, I have tried looking up the documentaion but nowhere it taks about package structure being the same

    Can you please tell me if the above is true.

    Regards
    -Chandu

  21. baji Says:

    Hey Sujit,

    your tutorials are good..
    I am using RemoteObject service call to get the data back from server into flex.

    Here is my problem:
    I am getting array of java objects into flex application, when i try to convert the java object to actionscript object in flex, am getting the error as “TypeError: Error #1034: Type Coercion failed: cannot convert Object@d68cd59 to com.mlfcst.actionscript.dto.CardEconVar.”

    Here is the code:
    ……………………….

    public function setEconVarDetails(event:ResultEvent):void
    {
    a_econVars= event.result as Array;
    var econVar:CardEconVar = new CardEconVar();
    econVar = CardEconVar(a_econVars[0]); —–> getting error here
    }

    Here is my AS file:
    ……………………….

    package com.mlfcst.actionscript.dto
    {
    [RemoteClass(alias=com.mlfcst.flex.dto.CardEconVar)]
    public class CardEconVar
    {

    public var cardEconVarId:int;
    private var groupId:int;
    }
    }

    Here is my java code:
    ……………………………..
    package com.mlfcst.flex.dto;

    import java.io.Serializable;
    public class CardEconVar implements Serializable {

    private int cardEconVarId;
    private int groupId;

    public CardEconVar() {
    }
    public int getCardEconVarId() {
    return this.cardEconVarId;
    }

    public void setCardEconVarId(int cardEconVarId) {
    this.cardEconVarId = cardEconVarId;
    }

    public int getGroupId() {
    return this.groupId;
    }

    public void setGroupId(int groupId) {
    this.groupId = groupId;
    }
    }

    your help would be greatly appreciated..

    Thanks,
    Baji.

  22. abhay Says:

    Hi Sujit

    i followed the steps which u given for blazeds but am not able to make it working, its giving error “page cannot display”,
    can u plz tell me how to make working the sample applications available in tomcat\webapps\samples

  23. Sujit Reddy G Says:

    Hi Chandu,

    The package structure of the AS class and the Java class which are mapped need NOT be same. Please check out if you are missing something else. Try checking your log files for errors :)

    Hope this helps.

  24. Sujit Reddy G Says:

    Hi Abhay,

    My guesses are check if the server is running, if the server is up and running, please see if you can find any errors in the server log files. If you cannot figure out whats going wrong, please feel free to mail me with your log files.

    Hope this helps.

  25. Sujit Reddy G Says:

    Hi baji,

    Please modified your code in setEconVarDetails() function to the below an then try.

    public function setEconVarDetails(event:ResultEvent):void
    {
    var a_econVars:ArrayCollection = event.result as ArrayCollection;
    var econVar:CardEconVar = new CardEconVar();
    econVar = a_econVars.getItemAt(0) as CardEconVar;
    }

    Hope this helps.

  26. Srinivas M Says:

    Hi

    my self , i am srinivas working as sr. software engineer( web,UI).

    i want to learn flex designing ( CSS,Themes, layouts..etc).

    any help from ur side? i am from hyderabad.

  27. chandu Says:

    Hi Sujith

    I am using BlazeDS to send data to my flex client. However is there API
    or a way to find out how many bytes of data the client received from there server
    if I make a remoteObject call.

    Basically I am trying to find out how many bytes of data is transffred over the wire through BlazeDS……

    Can you please explain the blazeDS serialization and how it works.

    For eg: I am sending a list of HashMaps. Each hashMap is a set of key pair values and corresponds to 1 row of data in DataGrid. The hashMap keys are columnNames
    and the values are the cell values..

    Say for eg If I am sending 3 hashmaps, Since the keys are columnNames, this information is duplicated as keys in all the 3 hashMaps. I know on java side Its using the reference. But once the data is serialized through BlazeDS is that maintained or not

    Any help will be greatly appreciated.

    Thanks
    -Chandu

  28. Sujit Reddy G Says:

    Hi Chandu,

    State should be maintained, please check out. I think the serialization works the same way as Java serialization.

  29. HARI.S Says:

    HI SUJITH
    I AM HARI..WORKING IN CDAC AS CONTRACT PROJECT ENGINEER..
    I AM CURRENTLY WORKING ON JAVA/J2EE PLATFORM…I WANTED TO STUDY
    FLEX + JAVA INTEGRATION PLZ HELP ME BY PROVIDING SOME GOOD TUTORIALS AND ADVICE…
    HARI.S

  30. Rajesh Sundar Says:

    -> About using different database urls with destinations in the hibernate assembler in LCDS.

    Hi Sujith,

    I have a question that I could not find any information in the web. I thought this might be familiar to you. I am having a flex app which uses data service destinations using hibernate assembler. But since all the destinations (whether runtime or xml for application scope) gets loaded on startup, I am unable to change hibernate configuration especially the database name based on the user logged in.

    For example. Consider a flex app with hibernate in backend.
    Company XYZ should use XYZ database
    Company ABC should use ABC database.

    Note: Both xyz and abc have same tables or data model.

    Also changing the Original hibernate configuration (using programmatic API like Configuration()) has no effect. Also note the data service destinations once created
    on server startup, cannot accept a new hibernatconfiguration as well, even if it would
    it will apply the same changes for both XYZ and ABC users.

    Any help on this would be appreciated. Thanks.

  31. Mohan Says:

    I am new to BlazeDS.I am using FlexBuilder3,mySQL and Java to develop a project. Initially I am getting all the records from the database through pushing mechanism. If any changes made, I am sending the whole record set again. Can you please guide me? How to use pushing mechanism with mysql database with BlazeDS….

    Thanks

  32. Jasper Says:

    Hi there,

    I have set up some ‘destinations’ in Blaze-DS, and am successfully using ‘Producers’/'Consumers’ from my flex application to connect to these destinations and exchange messages.

    Now, since my server is hosted, any one in the world, who knows what the destination name is can connect to this blaze-ds destination of mine(from a simple flex app), and send/recieve messages. Isn’t this true? How do i prevent unauthorized access?

    Looking forward to your help!

  33. Sujit Reddy G Says:

    Hi Hari,

    I mailed you the list of URLs.

    Hope that helped

  34. Sujit Reddy G Says:

    Hi Jasper,

    I mailed you details on securing destinations.

    Hope that helped.

  35. srinu Says:

    Hi Sujit,

    Recently I am doing a project, that needs to get read an xml file and display the content in Datagrid layout.
    Could you please tell me how to do it.

    If you have the answer , please forward it to my mail

    Thanks
    Srinu

  36. Crystal Says:

    Hi Sujit,
    I’m Crystal. I’m new to Flex and BlazeDS technology. So far all the implementation is alright. But I have some questions about the Messaging Service. Hope you can answer me or provide some useful links to me or give me some examples.
    Let say there are 2 different server. JMS client (producer) reside in Server A, and Flex client (consumer) reside in Server B. JMS is going to publish some data into BlazeDS destination and allow the Flex subscribe it. The questions are:
    a) The main question is the BlazeDS destination should reside in which Server??
    b) The BlazeDS destination can reside in Server A?? If yes, how is the Flex client going to subscribe the data in different Server?? Any idea and examples??
    c) Is it a must the BlazeDS destination should reside in Server B? If so, any idea/example that enable the JMS publish the data to different Server?

    Looking forward to your help. Thank you and advanced.

    =Crystal=

  37. Crystal Says:

    Oh ya, i also need some details about the destination security from you. Thanks for your help again.

    =Crystal=

  38. Sujit Reddy G Says:

    Hi Crystal,

    I Emailed details to your yahoo inbox.

    Hope that helped.

  39. Sujit Reddy G Says:

    Hi Srinu,

    Please find code samples at the URL below.

    http://livedocs.adobe.com/flex/3/html/data_access_2.html#193905

    Hope this helps :)

  40. Crystal Says:

    Hi Sujit,
    Thanks for your information.
    May I request some websites/links that related the idea u gave to me??
    Thanks again.

    Regards,
    Crystal

  41. Crystal Says:

    Hi Sujit,
    It’s me again. I really need some advise from you.
    Nowadays, “performance” becoming an important issue especially when develop a real-time application.
    I goes for BlazeDS Messaging also because of this.
    I wonder how fast/good is the performance when millions of data push to client side.

    Is it the performance is actually depends on network protocols?
    E.g. BlazeDS offers long polling & streaming. Is it “Streaming” faster than “polling” ??

    Where LCDS (commercial product) offers RTMP & socket-based protocol. So is it “RTMP” will faster than “Streaming” which offered by BlazeDS ??

    As a conclude here, is it LCDS Messaging better than BlazeDS Messaging when want to develop a mission-critical Real-Time application??

    Looking forward to your help. Thank you.

  42. Kesh Says:

    Hi i wanna create an app using flex and java but the thing is i cannot move to another page after clicking the logout button pls tell me how to do page navigation.

  43. Sujit Reddy G Says:

    Hi Kesh,

    Please have a look at view states in Flex. There is nothing like a page in Flex, you will have to think in terms of states or keep adding a removing components in a single state.

    Please find more details on view states at the URL below.

    http://livedocs.adobe.com/flex/3/html/using_states_1.html

    Hope this helps.

  44. kev Says:

    Hi Sujit,

    Can you apply the content in your blog post about Flex Message Service with BlazeDS to AIR apps? I only have access to a PHP backend and so have been trying with Weborb to no avail.

    cheers

  45. kev Says:

    Hi Sujit,

    Can you apply the content in your blog post about Flex Message Service with BlazeDS to AIR apps? I only have access to a PHP backend and so have been trying with Weborb to no avail.

    cheers

  46. Mohan Says:

    Hi Sujit,
    I cant able to zoom the chart in Flex for trending.
    Can u please provide the examples..
    Thanks in advance..

  47. kev Says:

    Whoops – apologies for that double entry there!

    I found this post “http://coenraets.org/blog/2007/03/real-time-market-data-using-apollo-and-flex-data-services/” by Christophe which explains that you must specify the actual server address & port in the services-config.xml file rather than leaving the ‘tokens’ in place to use DS with AIR apps.

    He says:

    “instead of:
    http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling

    use:
    http://localhost:8600/messagebroker/amfpolling

    I’m using BlazeDS on port 8400 and found this worked:
    http://localhost:8400/{context.root}/messagebroker/amfpolling

    And similar for Weborb except on port 80.

    changed this:
    “weborb.php”

    to this:
    “http://localhost:80/Weborb/weborb.php”

    Also of worthy note, I had to ‘clean’ my projects in Eclipse after making a change to the service-config.xml file before the change was reflected.

    Now down to securing the channels…

  48. Sujit Reddy G Says:

    Hi Kev,

    Yes, you got it right. In case of AIR application you need to give the complete URL :) and yes, you have to clean your project in Flex Builder.

    Check out this URL (might be useful :) ) http://sujitreddyg.wordpress.com/2008/07/03/creating-blazeds-channels-at-runtime/

    Feel free to ping me if you think I can help you :)

  49. kev Says:

    Hi Sujit,

    Thanks for your reply and for this great site :)

    I notice that you sent some information to another person regarding securing AMF channels – could you please forward to me also?

    I have read that the simplest way is to create a local user list to which you allow certain channels access. But I was wondering how hard it would be to query a database on the server for a list of users?

    (runtime channel creation is very useful too – thanks)

    cheers!

  50. Venkata Reddy Says:

    Hi Sujit,

    I am new to Flex and using the Flex Dashboard sample given at http://www.adobe.com/devnet/flex/samples/dashboard/dashboard.html

    I need to use my existing Applet(which does publish/subscribe with backend), to update data in the individual pods.

    Using Javascript am able to call the methods inside the Dashboard main mxml. From there am not knowing how to pass the data to the individual pods.

    Can you please help me on this ASAP.

    Regards.

  51. Ravi Says:

    Hi Sujit – Have a question similar to the one above.
    Could you look at the below link?
    Appreciate your thoughts.

    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=583&threadid=1389711&CFID=7412599&CFTOKEN=510e2596d22a30af-226CFA6D-B627-0127-C755DA12B63BBE7D&jsessionid=4830e9ff25e3eed6c3eb7d5e6e546d7f3e39

    Thanks

    Ravi

  52. Sujit Reddy G Says:

    Hi Kev,

    Please find more details on how to secure channels at this URL

    http://sujitreddyg.wordpress.com/2008/09/04/securing-blazeds-destinations-using-custom-tomcat-realm-authentication/

    Hope this helps. I am sorry I was stuck with work and so the delayed response :)

  53. Mikey Says:

    Hello all,

    I am new to BlazeDS and am working on a project that requires it. I came across your article and let me to take this opportunity to tell you that you put out a solid work. I am just wondering how can I do the following:

    I have my back-end written in Java, and in my Class I have an array of Strings that keeps updated. In my client side code, I invoke the getter method for this array. I would like to display those messages at the client side as soon the server knows this array got updated.

    I tried to listen and get the array data every XXXX amount of time. Unfortunately, this approach did not work. I got all the results at the very end (all at once).

    Please let me know of your ideas, and if you have sample code that would be very helpful.

    Thank you,

    Moussa

  54. kev Says:

    Hey Sujit,

    Thanks for the links about securing destinations – I’ve been busy on another project and finally have time to look at this again. I’ll post my results at attempting to get this working with AMFPHP/WebORB…

    cheers

  55. kpbird Says:

    hello Sujit,

    I am using OS X 1.5.
    I install flex builder in it and working fine
    now I want to display PDF file in my AIR application.
    my application has main 2 part.
    left side list of pdf file and right side is empty
    when user click on pdf file that pdf should open in right part.

    I try it with HTMLCapibility but it’s not working.
    is it problem of OS X or any other thing?

  56. Raaj Says:

    Hi Sujit,

    How to communicate two SWF files using Cross-Scripting method!

    raaja

  57. Sujit Reddy G Says:

    Hi Kpbird,

    Please try visiting the URL below. If you already did that and still its not working, please send out your code to sujitreddy.g@gmail.com I will try to fix that :)

    http://sujitreddyg.wordpress.com/2008/01/04/rendering-pdf-content-in-adobe-air-application/

    Hope this helps :)

  58. Sujit Reddy G Says:

    Hi Moussa,

    Remoting calls are batched. Try to send the code to sujitreddy.g@gmail.com I will try to fix it :)

  59. adireddy Says:

    hi sujit h r u,
    iam training on adobe flex i am facing one problem ,
    one remote object using lcds,iam trying to two days but iam not getting,
    plese send one sample program(java class,flex code) ,and how to configure in server plese send me folder struture,

  60. Terry Corbet Says:

    I see that you have comments about modularization in Flex and articles about using RSL in Flex, so I have a request. Point me to the ‘best practices’ for using those techniques with AIR. I have an AIR ‘container’ that has lots of Flex components that are modular AND rely on the Player to cache both the Flex framework and my own libraries. How — precisely — do you make those enhancements with AIR.

    No, I don’t want to be told that desktop applications don’t need to be small and compact — nonsense — no one wants to download a 5MB update if only a .5MB update is needed. How do we do this with AIR? Your thoughts would be much appreciated since you cannot find anyone in Adobe product management willing to talk about the apparent disconnect.

  61. Sujit Reddy G Says:

    Hi Adireddy,

    Please visit the URL below.

    http://sujitreddyg.wordpress.com/2008/01/14/invoking-java-methods-from-adobe-flex/

    Hope this helps.

  62. Bob Johnson Says:

    I tried your example about integrating Blazeds with Flex got all the way through but the application didn’t display your message: Destination “CreatingRpc” either does no9t exist or destination has no channels defined (and the application does not define any default channel).

    Got any ideas?

  63. Sujit Reddy G Says:

    Hi Bob,

    Couple of things you can try.

    1. Clean your project in Flex Builder
    2. Restart your server
    3. Clean the browser cache.
    4. Check if the destination exists :)

    Hope this helps.

  64. naveen Says:

    Hi sujith,
    i am new to flex,i read ur articles and i feelthey were very much helpful.Recently I had an interview and just want to share the questions and if anybody can answer that will
    be helpful.

    Unit testing and how did u approach?
    explain about cairngorm event?
    explain interface and abstract in java with examples?
    why did u use spring?
    how will u check for authorization?
    flex issues?
    why did u use LCDS

  65. Jinoy Says:

    Hi Sujith,

    I have gone through your blog “Sending messages from Java to BlazeDS destinations using MessageBroker”…The flex client is working fine both as producer and consumer, but the message sent from jsp is not appearing in flex client…Do I need any other configuration? I am using BlazeDS turnkey server…

  66. Lord Says:

    Hi Sujith,

    a very good site…

    i need a to retrieve java object from flex, but i don’t know how to start. Can you help me?
    I’ve heard about livecycle data service, blazeDS and remote object. Are these technologies the same or they are different??

    thanks a lot

  67. Jai Says:

    Hello -
    I am a designer turned developer who is moving from Flash to Flex and I have been asked to help someone plug their site into the photoshelter api (the basic documentation for this is at:http://pa.photoshelter.com/help/index/tech/bsapi). I have some limited experience in using Amfphp to make mysql queries through Flex, but am unsure whether, or how, I can access this kind of api – and can’t find any info. that clarifies things for me. Do I need to use a solution like Blaze DS and Java, or can I manage the session calls through amfphp? Can you give me any pointers on this? Thanks.

  68. Digital Doctor Says:

    Namaste:

    Would love to have an AIR app, that displays a PDF to cover the entire desktop area (until minimized).

    Would love for the live PDF to become the actual desktop canvas; but I don’t know if that is possible.

    Can some one speak on this.

    In Service of THE ONENESS,
    Rafiki “The Digital Doctor” Cai

  69. Vishnu Sanjit Says:

    Hey Sujit,
    This is Vishnu. Good to know you are from BITS PIlani,I’m from BITS Pilani too, passed out in 2007.

    So lately I’ve been trying to learn FLEX by myself. Was trying to build a twitter mashup using Chris Korhonen’s Creating Mashups with Adobe Flex and AIR. I’m not using the Flex Builder. I compiled my mxml file and transferred the generated swf file to the root of my HTTP server. I also included a crossdomain.xml file in the root since the RSS feeds it was trying to access doesn’t reside on my server.

    Despite this i keep getting an error:
    [Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"]

    Here is the code:

    twitter.mxml

    Tweet.mxml

    cross-domain.xml

    Where am i going wrong here?

  70. Sujit Reddy G Says:

    Hi Vishnu,

    Looks like the code got truncated.

    You will need the crossdomain.xml on the server from which you are accessing the data from and not on the server where the SWF file is hosted.

    Hope this helps.

  71. Sujit Reddy G Says:

    Hi Lord,

    URLs below should help you.

    http://sujitreddyg.wordpress.com/2008/01/31/blazeds-and-lcds-feature-difference/
    http://sujitreddyg.wordpress.com/2008/01/14/invoking-java-methods-from-adobe-flex/

    Hope this helps.

  72. Sujit Reddy G Says:

    Hi Jai,

    I don’t think you need to worry about AMFPHP for accessing the API you mentioned. Looks like they are sending their response as XML. All you need to do is to use HTTPService component and access the XML.

    Please find more details on how to use HTTPService at the URL below.

    http://livedocs.adobe.com/flex/3/html/data_access_2.html#193905

    Hope this helps.

  73. Jai Says:

    Thanks Sujit, that is a useful confirmation. However I remained rather confused about security. I have to access the photoshelter api via SSL. From what I gather, that seems to mean that I must use a proxy of some sort… Is that true? If I authenticate by sending username and password over HTTPService, don’t I make my archive at photoshelter very vulnerable?
    Would it still be worth it to be running the httpService through BlazeDS? Would it make any differences to speed? Again, thank you so much for your helpful advice.

  74. Jai Says:

    After further research, I now believe that I have to set “useProxy” to true and then configure my https service via BlazeDS – or a php proxy – in order to be able to communicate via https – and send necessary username and password authentication. (There seems to be very little clear documentation on using HTTPS with BlazeDS on the web…) So although I don’t need to use secure-amf, will it perhaps give me increased speed? Even though serialising from xml, and back into xml at the other end…

  75. baji Says:

    Hi Sujith,

    I have developed flex application with webservices..I would like to handle session time out using werbservices..i am not using remote objects…could you suggest me .?

  76. Diny Says:

    i would like know how to configure BlazeDS with websphere 6.0.. please reply me as soon as possible..

    My mail id is dinesh@visiontss.com

    thanks in advance…

  77. Souvik Says:

    Hi sujit,
    I have gone through the article “Sending messages from Java to BlazeDS destinations using MessageBroker”. I have implemented it and it is functioning well. Only the exception is that I am making use of LCDS instead of BlazeDS. Any way, your article provided a great help indeed.

    Now all I need to send message to few(not arbitrary)consumers. Suppose there are 10 consumers and I need to send message to 7 of them. How could it be decided from server side? Could it be made possible by modifying the code of MessageSender.java? Actually I need to decided it from server side prior to send push data. Please help.

  78. Sujit Reddy G Says:

    Hi Jai,

    You can go ahead and use HTTPService without BlazeDS. I don’t think it will be vulnerable to pass credentials using HTTPService over HTTPS.

    You will need BlazeDS if you cannot communicate with the service provider directly. That is the service provider is not having a crossdomain.xml on his server.

    AMF will definitely increase performance.

    URLs below might be useful. In the BlazeDS dev guide, try to read about channels and RPC services, especially proxy service.

    http://livedocs.adobe.com/flex/3/html/data_access_1.html
    http://livedocs.adobe.com/blazeds/1/blazeds_devguide/

    Hope this helps.

  79. kev Says:

    hey Sujit,

    I have a ‘design’ question for you…

    I’m building an inventory application using Flex, AMFPHP, MYSQL and the Cairngorm pattern. Take 3 tables as an example: Categories, Colours, Products.

    Categories:
    CategoryID 1
    CategoryName Pants

    Colours:
    ColourID 1
    ColourName Red

    Products:
    ProductID 1
    CategoryID 1
    ColourID 1
    ProductName Cargo Pants
    Price 20.00

    Now when I init the app, I send 3 events to gather all records from each table and populate 3 ArrayCollections in the ModelLocator. Great, this works fine.

    But I want to populate a Datagrid which contains the fields “CategoryName”, “ColourName”, “ProductName”, “Price”.

    I can think of 3 ways to do this:

    1) create a new ArrayCollection in my ModelLocator and populate this by calling a PHP service which does a joined SELECT statement – disadvantages, need to refresh this AC whenever I change the contents of any of the others, duplication of data being sent/received from the server, ?

    2) create a new ArrayCollection in my ModelLocator and populate by iterating through the 3 ACs in Actionscript each time any of them change – advantage, no excess data sent/received from server but potentially higher processor usage?

    3) don’t create a new ArrayCollection, but use ItemRenderers for each DatagridColumn which takes the appropriate ID field and returns the Name field – again, no excess network but potential high cpu everytime the DataGrid is refreshed

    Or is there another way that I cannot see!

    Maybe this is a simple design concept that people learn in Software Design 101 – but having missed that class, I’m playing catchup!

    Cheers!

  80. kalyan Says:

    Hi Sujith,

    I’m relatively new to flex, we are developing a multiplayer online game using flex client and blazeds.I want to know how scalable is the blazeds server and what are the measures i need to take two improve the scalabity of the blazeds server which i have configured into tomcat.

    Looking forward to hearing from at the earliest

    Thaks and regards
    Kalyan

  81. Sujit Reddy G Says:

    Hi Kalyan,

    Please check out the capacity planning guide at the URL below.

    http://www.adobe.com/products/livecycle/pdfs/95011594_lcds_planguide_wp_ue.pdf

    Hope this helps.

  82. Sujit Reddy G Says:

    Hi Kev,

    I would go with the first approach and paginate my data. If the data is huge, then the processing required to loop through the collections for each item is HUGE :)

    Hope this helps.

  83. Sujit Reddy G Says:

    Hi Souvik,

    Please try creating custom messaging adapter and filter your message there by setting selectors. Please find more details at the URLs below.

    http://sujitreddyg.wordpress.com/2008/03/10/creating-custom-messaging-adapters/
    http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/lcds/messaging_6.html

    Hope this helps.

  84. Sujit Reddy G Says:

    Hi Diny.

    Its similar to deploying it on any server. You have to
    1. Change web.xml
    2. copy BlazeDS jar files into WEB-INF/lib folder
    3. Place your configuration files (services-config.xml) in WEB-INF/flex folder

    Hope this helps :)

  85. kalyan Says:

    Hi Sujith,

    Thanks for the swift response.But my concern was to improve the scalability of open source blazeds but you were referring to LCDS which my org cannot afford.kindly suggest me keeping in view open source blazeds which is our priorityand about its scalability.looking forward to hearing from you

  86. Sujit Reddy G Says:

    Hi Kalyan,

    It all depends on the channel you are using. The capacity planning guide which I pointed to you previously has comparison for all channels. BlazeDS supports only Servlet based channels like AMFChannel, HTTPChannel, HTTPStreamingChannel and AMFStreamingChannel. Where as LCDS has these Servlet based channels as well as Java NIO based channels (which scale a lot) and RTMP channel. The code for both LCDS and BlazeDS is same for the channels supported in both the products.

    In the capacity planning guide, you can look at a section where they are comparing Servlet based channel with NIO based channels. Basically, Servlet based channels can handle only few hundreds of clients at one go as there are restrictions on number of threads a web server will run and each connection to a client will occupy one thread in the case of Servlet based channels.

    Hope this helps.

  87. bibin Says:

    hi Sujit,

    I have the following java nd as classses

    Java class –

    public class PatientVO
    {
    private AverageDays[] myAvrgDays;

    public AverageDaysPerPipelineVO[] getAvrgDays() {
    return myAvrgDays;
    }

    public void setAvrgDaysPerPiplnVos(
    AverageDays[] avrgDays) {
    this.myAvrgDays = (AverageDays[])avrgDays;
    }

    }

    AS class —

    [Bindable]
    [RemoteClass(alias="vo.PatientVO ")]

    public class PatientVO implements IValueObject
    {

    public var avrgDays : Array;
    }
    }

    Here it actually converts the java object to flex as object with no problems.

    But when i am passing the as object to java, it somehow nullifies the array (myAvrgDays) in the java object.

    This problem happens only when when i am using arrays.

    and works fine with array list

  88. bibin Says:

    hi sujit,

    one more query,

    I have a line graph with DateTimeAxis.

    By default if my dateUnits is in year and all the data points to be plotted fall into same year, the date time axis won’t show up the year.

    if the data points spread out to more than one year, then date time axis shows all the years.

    Is there a way to show the year on the date time axis, if there is only one year and all data points fall into this year only?

  89. bibin Says:

    hi sujit,
    i digged out the solution for myself. Set the property alignLabelsUnits=false, so that graph puts a label always at the beginning of axis

    Thanks

  90. bibin Says:

    hi sujit,

    the issue with action script array to java array was my local problem, happnd bcz of my mistake in the code.
    Thanks
    Bibin

  91. ravish Says:

    hi,

    i am trying to integrate LCDS 2.5 with JBoss 4.0.1 SP1. i followed the instructions given.When it tried to deploy the samples.war provided with LCDS, the server throws”ERROR [Engine] StandardContext[/samples]StandardWrapper.Throwable
    java.lang.NoSuchMethodError: flex.messaging.config.LoginCommandSettings.setServer(Ljava/lang/String;)V “.
    also,”ERROR [Engine] StandardContext[/samples]Servlet /samples threw load() exception
    javax.servlet.ServletException: Servlet.init() for servlet MessageBrokerServlet threw exception”. i dont have a clue. can you please help me out..?

    cheers,
    ravish

  92. Sujit Reddy G Says:

    Hi Ravish,

    Please visit this URL for installation instructions on JBoss server.

    http://help.adobe.com/en_US/livecycle/8.2/lcds_installation.html

    Hope this helps.

  93. Ragini Says:

    Hi,

    Problem in getting cookie object in JSP
    I want to get the cookie object in main.html(wrapper) that I have made JSP page,
    when it is loded and want to set value of cookie to flashvars so I can get it
    in preinitialize of application, But problem in getting the cookie object in JSP????

    Description : I have set the cookie on combo change for language using,
    HttpServletRequest request = FlexContext.getHttpRequest();
    HttpServletResponse response = FlexContext.getHttpResponse();

    But didnt get this cookie value in JSP,request = FlexContext.getHttpRequest() is null in JSP
    can u help me in solving this problem??

  94. Srinivas Says:

    Hi Sujit,

    I am Java developer and new to Flex envionrment.I have implemented some examples on Flex from Adobe website.I am tried to install LCDS on Weblogic 8.1 server but was unsuccesful in doing so.I tried the installion by following the procedure in http://help.adobe.com/en_US/livecycle /8.2/lcds_installation.html.If you can provide detail procedure regarding the installation it would be helpful.

    Thanks,
    Srinivas

  95. ravish Says:

    Thanks for your reply Sujith.

    I need your helping hand again.

    i am trying to define a StreamingAMFChannel in LCDS ES 2.5.1, it is not getting defined, and it shows channel is undefined. the same configuration is working just fine with BlazeDS. Just wondering is this version LCDS ES 2.5.1 supports StreamingAMFChannel…?

    cheers,
    ravish

  96. Sujit Reddy G Says:

    Hi Srinivas,

    Can you please explain what exactly is happening. Is the installation not being completed or you could not start the server?

  97. Sujit Reddy G Says:

    Hi Ravish,

    I think it was added to LCDS 2.6

    Hope this helps. :)

  98. Sujit Reddy G Says:

    Hi Ragini,

    I think FlexContext.getHttpRequest() is null in a JSP page because the MessageBrokerServlet is the one which sets the HTTPRequest object to the FlexContext
    As the request is not going thru MessageBrokerServlet I don’t think you will have the HTTPRequest object. Please try the normal J2EE way to get access to the cookie in your JSP page.

    Hope this helps.

  99. Tanmoy Says:

    Hi Sujith…
    Could you let me know about configuring BlazeDS with BEA weblogic workshop ? I would like to know the changes to be made in configuration.xml file with a small example.

    Tanmoy

  100. daniel Says:

    hi sujit,

    i am working on a project using weborb for .net and flex 3.
    i am retrieving an Array of strings from asp.net using weborb. the array has the right length; but all the values are blank. in weborb i have used the test-run feature to invoke this same call; and the array is returned with all the values. i have done the same from an aspx page. maybe it’s the way i am reading the array into actionscript? please help me (and other weborb for.net+flex users) with a tutorial on interaction between these two(and a solution for my problem too :) ) thank you in advance. daniel
    ps: if it makes a difference; the class is written in c#; and the class retrieves a static array and returns an array.(returned_array = static_array).

  101. Souvik Says:

    Please let me ask you a question.In our application, we are using a custom messaging adapter which uses a rtmp channel. Our intension is to get an acknowledgement in the server. In our case, let us assume a java class is the message producer(like MessageSender.java in your article “Sending messages from Java to BlazeDS destinations using MessageBroker”). If we would have sent message using Flex Producer component, we can optionally specify “acknowledge” and “fault” event handlers for a Producer component. How exactly this could be implemented when a java class is sending the message and this class is acting as a message Producer.

  102. Pravin Uttarwar Says:

    Hi Sujit,

    I am working on blazeds applications where i
    want to detect browser close event of on server side.
    I have tried using adaptors and session listeners,
    but nothing going right for me.

    i saw your blog and thought that you are the right person to
    solve the problem.

    So please let me know if there is any solution for
    the same.

    Regards,
    Pravin Uttarwar,

  103. Hi Sujith Says:

    Hi Sujith,

    We are trying to integrate Flex with a Single-sign on product (Siteminder). In our environment, the incoming request to the Flex application will get routed via Siteminder. Siteminder will authenticate the incoming request, then append few authorization details (user profile, like role, department, etc) in the Http header and redirect the request to the Flex application.

    Our requirement is to read the http header information, and take some business validation based on user profile. But we couldn’t able to find any direct functions, which helps us to read the http header information. When we browsed through Flex documentation, we found couple of functions for it (like URLLoader). But these functions require sending explict request to the server and reading the response header. But in our case, we are not sending any explicit request to Siteminder. Rather we are just trying to read the http header, when the user request hits the swf file.

    We have managed found a solution using JSP wrapper and Flashvar. But we don’t want to use a JSP wrapper in-between. Is there any other alternate way to read http header? Any suggestion would be greatly appreciated.

    Thanks,
    Kumar

  104. Raaja Says:

    Hi Sujith,

    Need barcode handling like generating label, reading barcode etc.,

    thanks and regards
    raaja

  105. Sujit Reddy G Says:

    Hi Raja,

    I didn’t understand :(

  106. Sujit Reddy G Says:

    Hi Pravin,

    Flex application running in Flash Player in browser will not dispatch any event when the browser is closing. You will have to use ExternalInterface for this. Pleaes find more details on how to achieve this at the URL below.

    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=12170&productId=2&loc=en_US

    Hope this helps.

  107. Sujit Reddy G Says:

    Hi Souvik,

    Do you want an acknowledgment on the server ? So, you want to make sure the message is being delivered. Did i understand it correctly ?

  108. Sujit Reddy G Says:

    Hi Daniel,

    Please visit the URL below for details on Remoting with WEBORB.

    http://www.themidnightcoders.com/products/weborb-for-net/developer-den.html

    Hope this helps.

  109. Sujit Reddy G Says:

    Hi Kumar,

    I don’t think you can do this with out a JSP wrapper :) You basically need a JSP/container/server which will accept a POST/GET from the SSO server. If you are worried about passing these values as Flash Vars, you can consider adding the values in a persistent storage on the server and generate an ID for the same. Now pass this ID to your Flex application and get the values SECURELY from Flex application using the ID from the persistent storage. :)

    Hope this helps.

  110. arunraj Says:

    hi…

    i am new flex,here i need to add some java jars and corejava files in my flex desktop application,but i donot know how to make this and use those *.java FILE IN MY FLEX PROJECT..PLZ HELP ME TO DO THAT.ur help is important

    thanks and regards
    arun

  111. Ajith Manmadhan Says:

    Hi,
    i am a coldfusion developer and a flex aspirant. i want to know how we can integrate flex with blazeds and coldfusion. i dont know much abt blazeds. Can we make a chat applicatin in coldfusion with blazeds support and integrate in a flex site? I have tried ur example with blazeds and java and was quite helpful. but the problem is how we can use blazeds along with coldfusion. is there anything we need to change in the CF admin for the blazeds to work along with CF.Is that possible? any tutorial links would be helpful..thnx..

  112. Romil Sinha Says:

    Hi Sujith,

    Nice articles. In your post “Session data management in Flex Remoting” you talk about calling static method FlexContext.getFlexSession() for Flex Remoting. But, I’m using Servlets. Normally you set objects in HTTP session. But Flex also has one session, and due to some reason 2 sessions are getting created. So I want to access the flex session instead of creating http session in servlet. I tried FlexContext.getFlexSession() but it doesn’t work. It returns null. Can you tell me how to achieve this?

    Thanks,
    Romil Sinha

  113. Rabiya Khan Says:

    Hi Sujit,

    I got your reference from Sambhav Gore in Bangalore.
    I have a few queries related to session management in BlazeDS.
    1. Once a session has been established, how do we ensure that the next request coming in is from a valid user.
    2. How does cache management work in Flex. Is it possible to maintain data at the client side for the specified amount of time?

    Thanks,
    Rabiya

  114. Sujit Reddy G Says:

    Hi Rabiya,

    1. What exactly do you mean by valid user ? if you meant the same user, then you can just check for some object stored in the session. Requests from same user will return one session object
    2. Flex is state full client, any instance of the objects created will remain as long as the user doesn’t reload the entire SWF. That is by refreshing the page loaded. If you want to store a object only for a specified amount of time, you can use a Timer and then remove the instance end of the period.

    Hope this helps.

  115. Sujit Reddy G Says:

    Hi Romil,

    In a Servlet you can get the FlexSession object. It is stored in HttpSession as an attribute. Please get attribute named “__flexSession” from the HttpSession. FlexContext.getSession() works when the request is received my the MessagebrokerServlet only.

    Hope that helps.

  116. Sujit Reddy G Says:

    Hi Ajith,

    You can integrate ColdFusion and BlazeDS. Please visit the URL below for more details.

    http://labs.adobe.com/wiki/index.php/BlazeDS:Release_Notes#Integrating_BlazeDS_with_a_ColdFusion_8_installation

    Hope this helps.

  117. Sujit Reddy G Says:

    Hi Arun.

    As of today you cannot do this with just AIR. You can try having a look at Merapi project, this will act as bridge between AIR and Java. Please find more details at the URL below.

    http://merapiproject.net/

    Hope this helps.

  118. Matt Says:

    Hi Sujit,

    Is it possible to deploy a flex application using remoting and lcds to a different server? ie remove the flex app from the java web app and deploy it on another server – like a web server?

    The reason I ask is that when running the sample apps on a fresh lcds 2.6 install using flex builder, there is no option to change the output directory. And when we run the samples the desitination cannot be found. So I assume that the flex app must be contained within the lcds web app?

    Is there any way around this? And is this the same situation with AIR apps (that they must be deployed to the lcds web app?

  119. Frank Says:

    Hi Sujit,

    I have a real urgent question:

    I want a LineChart to be drawn.
    I have these Timestamps [84, 1000, 34000, 34699, 439999] who are representing the x-Value of DataPoints along the X-Axis.

    Unfortunately the distance between 2 nexted datapoints along the x-Axis is always the same, that means that between the points with x-values 84 and 1000 is the same distance along the axis as between the points with x-values 34699 and 439999.
    But the distance between points with x-values of 34699 and 439999 should be much greater than between 84 and 1000.

    How can I customize the distance between data Points on a LineChart to solve my Problem?

    I really dont know right now and I did not find a solution yet.
    Would be very nice to get some hints.

    Greeting,

    Frank

  120. Sujit Reddy G Says:

    Hi Matt,

    You should be changing the end-point URLs of the channels you are using. Please find more details in the article below.

    http://sujitreddyg.wordpress.com/2008/07/03/creating-blazeds-channels-at-runtime/

    Please check out the comments also.

    Hope this helps.

  121. Bob Johnson Says:

    Sujit. Hope you can provide some help?

    I have a simple read/write project in Flex 3 using Blazeds to access a java class.

    The program runs fine within the Flex Builder environment. However, it does not run from the bin-release compiled version. It doesn’t seem to be talking to the Tomcat server.

    I am trying to write to a file name which is absolute: ie, c:\\….

    I have also tried using a UNC path to the file and it doesn’t work at all.

    Got any suggestions?

  122. Bob Johnson Says:

    A followup on the post 121.

    When the write option is selected an long error message appear that completely scrolls off the page. However, some of the path names try to point to a directory called messagebroker which does not exist. I don’t know what it is trying to reach?

    Thanks in advance

  123. Amarnath Says:

    Is there a way to override Responder.as class.
    My requirement is at one place i should be able catch all the faults occurred with the Remote/HTTP object invocation.

  124. Amarnath Says:

    How to block copy/paste for “TextInput” in Flex.

  125. Sujit Reddy G Says:

    Hi Bob,

    I didn’t get what your application is trying to do. Are you trying to write into a File on client system or is the File on the server?

  126. Sujit Reddy G Says:

    Hi Amarnath,

    Did you try just extending that class? Didn’t that work?

  127. Sujit Reddy G Says:

    Hi Amarnath,

    Please try the keydown event.

    Hope this helps.

  128. Bob Says:

    Reply to post 125:

    In development mode, I have a Tomcat server on my local computer which is inside blazeds. Inside the webapps is a java class as well as server-config files that have destinations for Flex. The client interface has been built with Adobe Flex 3 Builder. The java script has two functions: one that writes a line to a file and another that reads a file. The file name is specified in the Flex client.

  129. sameer Says:

    hi sujeet,

    We have an existing struts based application.I want to change the view (jsp to flex).I followed some examples and got stopped by one problem.response from struts is coming to jsp(where i build xml )and jsp to flex.how can i avoid this intermediate jsp. Please help me regard this.

    can u provide me a detailed example of using fx:stuts.I followed some examples in net none is more helpful to me

    sameer

  130. Dinesh Says:

    Hi Sujith,

    How to work with SSL enabled WebServices.
    If u have any samples or Tutorials. Can u please ping us.

  131. Sujit Reddy G Says:

    Hi Sameer,

    FxStruts solves this problem. Please find detailed example at this URL

    http://www.adobe.com/devnet/flex/articles/flex_struts.html

    Hope this helps.

  132. daniel Says:

    Hi Sujith,

    thanks for the link; i had seen the Developer guide;
    but the “Flex client API” section will be very useful. the problem was not to do with weborb (.net) or with flex receiving or working with the array. the array i was passing had blank entries in it when i later tested the array in a different way.

    thanks in any case and regards

  133. Chandu Says:

    Hi Sujith,
    Can I embed a .swf into another swf file and have them both communicate like pass params etc.. is there a way to do this ?

    Regards
    -Chandu

  134. Sujit Reddy G Says:

    Hi Chandu,

    Please try SWFLoader, ModuleLoader or LocalConnection.

    Hope this helps.

  135. Sujit Reddy G Says:

    Hi Daniel,

    Problem might because the properties in the object being passed are not public. Can you please check if the properties are public. If you debug your Flex application from Flex Builder, you can see message in the console if there is a problem setting properties of the object on the Flex side.

    Hope this helps.

  136. narayana Says:

    Hi my name ia M.V.Narayana. iam working in java and flex technology. Totally iam having 2+ experience .Any one can send me resume mvn.flex@gmail.com please.

    Thanks

  137. Greg Says:

    Dear Sujit,
    I am looking at adding BlazeDS to an existing Tomcat/JSP application for which we have a functioning web services Flex/AIR app. The app handles lots of images and I felt that AMF would be a good way to improve comms performance.

    However, I am a bit confused. How can I take all my existing JSP based API’s and port them to Blaze so I can use AMF. Today we use Cairngorm as the MVC and HTTP services to do the requisite get and post actions.

    I just need a little pointer in the right direction.

    Sincerely Greg

  138. Noel Says:

    hi Sujit,

    Topic: Querying a MYSQL database and generating pdf reports

  139. Joe Says:

    dear Sujit,
    I have a problem sending a list in jave that should fill a data grid.
    The data source of mine is a list of HashMaps, each HashMap contain a key/value that should represent the column name and its value.
    In all examples the data was taken from a database of some sort and created a designated beans with properties.
    Is it possible to create a simple list of HashMaps and send it remotely to be the DataProvider?
    Thanks a lot

    Jo

  140. Masood Sofi Says:

    hi sujit,

    can you please tell me how can I store data from my flex application directly on hard disk of my computer.like If i am writing a text file in my application then how can this be stored as text file on hard disk.

  141. prabhakar Says:

    Hi,

    I need to generate some objects at serverside based on some conditions and these objects will be pushed to client (not pull). Can you provide me any sample code snippet for this.

    Thanks,
    Prabhakar.

  142. prabhakar Says:

    Hi,

    I need to generate some objects at serverside based on some conditions and these objects will be pushed to flex client (not pull) using blazeDS messaging services. Can you provide me any sample code snippet for this.

    Thanks,
    Prabhakar.

  143. Sri Tej Says:

    Hi,

    This is Sri Tej, Adobe Student Representative for RIA.I met you on Feb 28th at Hyderabad.As you have seen the Multiplayer gaming environment, My next plan is to develop a Multi-player Game Which is also 3-D version using Flex. Can you Please Help me out in developing a 3-D environment some thing like a room or a person standing or such.. Do we have any tools to develop such 3-D environment using Flex..?

    Thanks,
    Sri Tej.

  144. Sujit Reddy G Says:

    Hi Joe,

    Yes, you can. You will get the HashMap instances as instances of Object.

    Hope this helps.

  145. Sujit Reddy G Says:

    Hi Masood,

    Please check out article at the URL below.

    http://sujitreddyg.wordpress.com/2008/11/04/filereference-in-flash-player-10/

    Hope this helps.

  146. Sujit Reddy G Says:

    Hi Prabhakar,

    Please find details at the URL below.

    http://sujitreddyg.wordpress.com/2008/08/14/sending-messages-from-java-to-blazeds-destinations-using-messagebroker/

    Hope this helps.

  147. Sujit Reddy G Says:

    Hi Sri Tej,

    Please visit URLs below for useful resources for 3D in Flash.

    http://opensource.adobe.com/wiki/display/flexsdk/3D+Effects+Support
    http://www.adobe.com/devnet/flash/3d_animation.html

    Hope this helps.

  148. SK Says:

    Hi Sujit,

    I’m new to flex.I have been trying to use ExternalInterface.addCallback in IE 7 to invoke ActionScript functions from javaScript.It does not work.IE does not show any error.It just skips the statement & executes the remaining statements.Can u please explain with an example.

    Thanks,
    SK

  149. shanker Says:

    hi sujit,
    can u send me sample example that explains complete flow of execution includes user enters details and request goes to controller and executes action then the values posted in database. And the response should come back to the flex.

    Add details and retrive details exapmle please.

  150. Mohamed Ghaly Says:

    Dear Sujith,

    I am new to the adobe air and i make an appliaction to be a container for pdf forms, the problem is i want to pass variables from the adobe air to the pdf (integrate AIR and PDF together) and in the same time i want when i save the data in the pdf file itself the pdf file disappear and throw me to the adobe air.

    please i need help in this urgent

  151. aK Says:

    Hi Sujit,

    I have a bar chart application.
    In one series its shows customer importance and in the other customer satisfaction is shown.
    My requirement is draw a rectangle at the end of the customer satisfaction bar series if the customer satisfaction is less than customer importance and show the difference in a label inside the rectangle.
    If the customer satisfaction is greater than customer importance then draw the rectangle within the bar series and show the positive value in the rectangle.
    Inorder to do this I have created a custom bar series named “SatisfactionGapBarSeries” extended from the Bar Series and custom box item render named “SatisfactionGapBoxItemRender”.
    In the updatedisplaylist of the SatisfactionGapBoxItemRender i have drawn rectangle according to my need but i am not able to add the label.
    How can i add a label into the drawn rectangle?
    Will you please help me?

    Regards

    aK
    Software Engineer
    Satmetrix
    TechnoPark
    Trivandrum

  152. namita Says:

    hai sujit,

    i m working on flex….i wanted to impliment ActiveMQ concept for one of my application…so can you plz send me some sample apllication wich is using activemq message broker….
    Thanks in advance

  153. Manan Says:

    Hi,Sujit..

    i must say nice blog n comments,i got nice knowledge regarding the modules..

    m developing chatting application..i’m having 3modules in my application,loginpage and registrationpage..n 3rd 1 is the application which does chatting..all is set,the only problem is when i click the SignIn button on my login page,i want to nevigate to the user’s home page,(i.e. 3rd module)..how can i get it??

    inshort,i’ve 4 mxml files..main app file n 3modules..i wanna nevigate from my 1st module to 3rd module wen i press a button in my 1st module..will custom events help??

  154. Manish Verma Says:

    I have a strange problem with Blaze DS. I am using Flex SDK 3.3 and BlazeDS 3.2 ( also tried 3.3)
    I have a A/S been mapped to a Java Bean on server side.I am able to retrieve a collection of such beans from server, and they are mapped properly. I am calling a method on my remote object which takes this bean as the only argument. But I am getting the following error
    [FaultEvent fault=[RPC Fault faultString="Cannot invoke method 'addEquipment'." faultCode="Server.ResourceUnavailable" faultDetail="The expected argument types are (com.gtech.esrs.rm.core.beans.MiscEquipment) but the supplied types were (flex.messaging.io.amf.ASObject) and converted to (null)."] messageId=”9E8C3D0A-D00A-B927-E2B4-A37CA5BDCF52″ type=”fault” bubbles=false cancelable=true eventPhase=2]

    The similar error is displayed in the server log, indicating somewhere the [RemoteClass] meta data is being lost during serialization.

    Could you please help.

    Thanks

  155. Sujit Reddy G Says:

    Hi SK,

    Please make sure you have everything properly setup as explained in the URL below. If your problem persists withe everything in place, code to reproduce the issue will help in understanding the problem.

    http://livedocs.adobe.com/flex/3/html/passingarguments_4.html

    Hope this helps.

  156. Sujit Reddy G Says:

    Hi aK,

    Instead of drawing a rectangle, try adding any of container/component.

    Hope this helps.

  157. Sujit Reddy G Says:

    Hi Namita,

    Please find samples at the URL below.

    http://coenraets.org/blog/2007/01/flex-test-drive-server-for-java-developers-tomcat-based/

    Hope that helps.

  158. Sujit Reddy G Says:

    Hi Manish,

    Resource unavailable is thrown when the Class is not found. Can you please confirm that the objects of the mapped class type are properly converted to appropriate AS class type. If the objects are properly converted and is creating problem when sending back, please share code to reproduce the issue. Please send to sujitreddy.g@gmai.com

    Hope this helps.

  159. kevin Says:

    hi Sujit,

    I’m trying to find a solution for debugging PHP service classes when used as the back end for Flex apps. I’d prefer not to fork out extra money for the Zend Studio at the moment and from what I read about PDTv2, it seems like all I need.

    While I can set break points on individual PHP files and step through the code, I can’t seem to trigger a break point in a PHP service class when invoked from a Flex app.

    Can you offer any help or advice?

    cheers

  160. kevin Says:

    Woohoo! Scratch that I got it working.

    I followed these instructions to install XDebug:
    http://debuggable.com/posts/setting-up-xdebug-on-mac-os-x-or-win32-linux:480f4dd6-0240-4a90-8fa1-4e41cbdd56cb

    I had to compile the xdebug.so plugin from the v2.04 source for it to install properly under MAMP – luckily someone posted this info in the comments below the post.

    Installed PDTv2 via Eclipse software updates:
    http://wiki.eclipse.org/PDT/Installation

    But then I could not get Firefox to connect to Eclipse – the issue seems to have been some faulty prefs in Eclipse. I just created a new workspace, created a new PHP project pointing to my Zend services directory and imported my Flex project.

    It’s probably sad how excited I am to have this working. No more looking at PHP error logs (well less anyway).

    cheers

  161. Iresh Says:

    Hi Sujit,

    I am a Flash developer for al long time now and I am trying Flex since 1.5 whenever I get time, I had developed a sample application in Flex2 with coldfusion as middle layer and the MSAccess db, it worked out to b well but went on getting complex as the size increased and I got stucked.

    I have gone through and somewhat understood the BlazeDS structure and worked around the examples too, since I cannot install FlexBuilder I am again stucked in compiling Flex3 files on command line comipler which will be deployed on preconfigured tomcat which comes with the BlazeDS Trunkey download whic is for free.

    The same thing is with Carngorm architecture I have gone throught the documentation and some what understood but could not implement due to the lack of any sample application which is with the CG framework and the actual sample application sourcecode, which will make it easy for me to understand the structure in details and help me develop the application on CG framework without any fear.

    I am seeking your help on following points:

    1. Any small sample cairngorm implemented application along with cairngorm framework used in it and the application source code, to understand the CG framework in actual use.

    2. What are the steps to compile the flex application on command line for BlazeDS, so that it takes the configuration from the service-config.xml or other service related xml rather than the default flex-congif.xml. [in short how to compile the flex application on command line using Flex SDK 3 not FlexBuilder to make it work on BlazeDS]

    It would be a great if you would help in these points.

    Thanks & Regards,

    Iresh SA

  162. poornimahc Says:

    this is my mxml code

    this my java code

    package com.codeofdoom;

    import java.util.ArrayList;
    import java.util.List;
    import java.util.Random;

    import flex.messaging.MessageBroker;
    import flex.messaging.messages.AsyncMessage;
    import flex.messaging.messages.Message;
    import flex.messaging.services.MessageService;
    import flex.messaging.services.ServiceAdapter;
    import flex.messaging.util.UUIDUtils;

    public class BlazeDsServiceAdapter extends ServiceAdapter
    {
    Random random;
    PersonGenerator thread;
    public BlazeDsServiceAdapter()
    {
    random = new Random();
    System.out.println(“Adapter initilized”);
    }

    public void start()
    {
    if(thread == null)
    {
    System.out.println(“Adapter started”);
    thread = new PersonGenerator();
    thread.start();
    }
    }

    public void stop()
    {
    System.out.println(“Adapter stopped”);
    thread.running = false;
    thread=null;
    }

    private List generatePersons()
    {

    List arr = new ArrayList();
    for (int x=0;x<5;x++)
    {
    Person p = new Person();
    p.setFirstName(“FirstPerson”+x);
    p.setLastName(“LastPerson”+x);
    p.setAge(random.nextInt(80));
    arr.add(p);
    }
    return arr;
    }

    public class PersonGenerator extends Thread
    {
    public boolean running = true;
    public void run()
    {
    String clientId = UUIDUtils.createUUID();
    MessageBroker msgBroker = MessageBroker.getMessageBroker(null);
    while (running)
    {
    AsyncMessage msg = new AsyncMessage();
    msg.setDestination(“BlazeDsServicePush”);
    msg.setClientId(clientId);
    List a = generatePersons();
    msg.setMessageId(UUIDUtils.createUUID());
    msg.setBody(a);
    msgBroker.routeMessageToService(msg,null);

    try
    {
    Thread.sleep(5000);
    }
    catch(InterruptedException e)
    {
    System.out.println(“Exception”);
    e.printStackTrace();
    }
    }

    }
    }
    @Override
    public Object invoke(Message message)
    {
    System.out.println(“message——–” + message);
    if(message.getBody().equals(“New”))
    {
    // System.out.println(“true”);
    System.out.println(“Adapter received new”);
    return generatePersons();
    }
    else
    {
    //System.out.println(“false”);
    System.out.println(“Adapter sending message”);
    AsyncMessage newMessage = (AsyncMessage)message;
    MessageService msgService = (MessageService)getDestination().getService();
    msgService.pushMessageToClients(newMessage, true);
    }
    return null;
    }
    }

    i want compare the msg in invoke method but it is not taking what i published in flex it taking some other data like this

    message——–Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = 2648E184-810D-494A-08CF-B8B0BAB10C99
    correlationId = null
    destination = BlazeDsServicePush
    messageId = 266A6A61-1D0C-4E49-01DC-C352B839495E
    timestamp = 0
    timeToLive = 0
    body = [com.codeofdoom.Person@1a1ff9, com.codeofdoom.Person@12943ac, com.codeofdoom.Person@19ed7e, com.codeofdoom.Person@3727c5, com.codeofdoom.Person@1140709]
    Adapter sending message
    message——–Flex Message (flex.messaging.messages.AsyncMessage)
    clientId = 2648E184-810D-494A-08CF-B8B0BAB10C99
    correlationId = null
    destination = BlazeDsServicePush
    messageId = 266A9A10-2509-4F0F-6609-00A73D3053A5
    timestamp = 0
    timeToLive = 0
    body = [com.codeofdoom.Person@1f95165, com.codeofdoom.Person@14ed577

    can suggest some way to overcome this

  163. Raj Says:

    Sujith,

    I am having Jboss as my application Server and using Flex for my front end . Essentially I am to convert one legacy application into a Flex one . I am running into the problem
    a lot . In the Java Code of the application lot of application specific Parameters are stored in Request Object and Session Object .is there a way by which I can access HttpSession , HttpRequest object in Flex .
    In java if i do session.setAttribute(“userName”,xxx);
    request.setAttrinute(“userName”,xxx)
    how will i do session.getAttribute in my mxml .

  164. Nikhil Says:

    Hi Sujit,
    First of all I have found your blog extremely helpful as I’m just starting off flex. As a part of my project, I am required to upload an image from the client to the server and I’m using a servlet to handle this request. You might have guessed I’m using Java at the business tier. I found a tutorial http://blog.flexexamples.com/2007/09/21/uploading-files-in-flex-using-the-filereference-class/ using the FileReference object and it seemed to be very clear. The JSP code present in the comment section of that blog doesn’t seem to work whenI try to use a similar code in the doGet() method of my servlet.

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    try{
    DiskFileItemFactory factory = new DiskFileItemFactory();
    ServletFileUpload upload = new ServletFileUpload(factory);
    List list = upload.parseRequest(request);
    for(FileItem items: list){
    File uploadedFile = new File(“H:/”+items.getName());
    items.write(uploadedFile);
    }
    }catch(Exception e){
    e.printStackTrace();
    return;
    }

    }

    This is just a test program but it doesn’t seem to be working. When i submit the file for uploading on the flex front end, it continuously says ‘waiting for localhost’ (I have verified the URL of the servlet and the one mentioned in the URLRequest). When I directly try running my servlet on the server, I get a classNotFoundException for FileItemFactory even though I have imported it.

    Do you know why this is happening or If i can do this in an easier way without using BlazeDS?

    Your suggestions would be valuable.

    regards,

    Nikhil

  165. Chandu Says:

    Hi Sujith,

    I would like to send XML data from a remoting service to my flex client. How Can I achieve that ? Can i send an XML string and how do I create XML using that string on the client side ?

    Any help will be appreciated.

    Regards
    -Chandu

  166. Sujit Reddy G Says:

    Hi Iresh,

    For configuring your services-config.xml to your Flex project you just have to add -services “\services-config.xml” to your compiler arguments

    Please find developer documentation for Cairngorm at this URL http://opensource.adobe.com/wiki/display/cairngorm/Developer+Documentation
    You will find sample at this URL http://www.adobe.com/devnet/flex/articles/introducing_cairngorm.html

    Hope this helps.

  167. Sujit Reddy G Says:

    Hi Raj,

    Instead of setting the objects in the session or the request, you can send those objects to Flex application from your Java classes. Please find details on how to invoke Java methods from Flex application at the URL below.

    http://sujitreddyg.wordpress.com/2008/01/14/invoking-java-methods-from-adobe-flex/

    Hope this helps.

  168. Raj Says:

    Thanks Sujith. Well I did anyalyze this option , but Since i am a newbie I always thought there must be a straight forward way to store session .
    The problem is I have a jsp page which calls a Controller
    login method on failure it redirects to a page and sucess it redirects to different page . It is not structs completely but still works on the similar concept of Structs .I use Java Page Flow.

    I had written the first login.jsp —-> login.mxml
    login.xmlml Parts of Code where I have issues.

    {userName.text}
    {password.text}

    private function validateForm(evt:MouseEvent):void {
    if(validated)
    –call registrationRequest.send();

    I have two functions handleResult and handleFault. This is where my main question is .

    This is my Controller method Login.do
    method login(
    @Jpf.Action(forwards = { @Jpf.Forward(name = “success”, path = “MainV2.jsp”), @Jpf.Forward(name=”retry”, path = “welcome.jsp”) })
    public Forward login(Controller.loginForm form) {
    Forward forward;
    call db validtor
    if(validated)
    return forward(sucess)
    else
    session.setAttrinute(“errorMessage”, “error message from db”);
    return forward(failure)
    }

    Now I dont know what is the problem , no matter what if there is no exception also , i get debug messages in the handle fault method of MXML . I dont hit the handle result case .

    I am not sure why ? How would i handle this if sucess redirect to different mxml , error show message from db .

    I would apprectiate if you point me to some example .

    2. Second question . I have two list boxes in my MXML . I want to add , add all , remove , remove all the values from the two list boxes . Is there any example for that too .

    Thanks

    }

  169. Sujit Reddy G Says:

    Hi Chandu,

    org.w3c.dom.Document objects from Java are converted to XML class type by default. You can also send String from Java and convert that to XML using XML(yourXmlString)

    Hope this helps.

  170. Sujit Reddy G Says:

    Hi Nikhil,

    Try doPost method in your Servlet.

    Hope this helps

  171. Sujit Reddy G Says:

    Hi Raj,

    You don’t have access to session or request on Flash. You will have to write code on your server which will get the data for you. How exactly is the flow? Are you using Struts?

  172. Raj Says:

    Thanks . Sujith , I am not using Struts . I use Java Page Flow, which is similar to Struts . Now that we don’t have session or request objects on the session, I have to change the whole JSP to Flash is alot of work.

  173. Mike Says:

    Hi Sujit Reddy, sorry but I don’t speak english. I have a question…
    it’s posible retrieve data from a database on MySQL to application in Flex with LCDS and Data Management Services, but without having a flex client that notify all other clients… ie, that LCDS verify the changes in the database it automatically, by example if you enter data in the database from the console of mysql, that Flex LCDS detect changes and update the view in client Flex with Data Management Service, not AMFPolling.

  174. Ashok Says:

    Hi Suji..
    This is Ashok.. Am download your gmail contact retrieve project.. your project only run in AIR.. but am convert into web browser .. am not able to retrieve gmail contacts.. please give IDEA for me..

  175. Ashok Says:

    Hi Suji..
    This is Ashok.. Am download your gmail contact retrieve project.. your project only run in AIR.. but am convert into web browser .. am not able to retrieve gmail contacts.. please give IDEA for me.. What can i do..

  176. selva Says:

    hi sujit,

    I face the below problem in module loading using module loader. Can u please suggest me where I might be wrong.
    Thanx in deed.

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.containers::Panel/layoutChrome()
    at mx.core::Container/updateDisplayList()
    at mx.containers::Panel/updateDisplayList()
    at mx.core::UIComponent/validateDisplayList()
    at mx.core::Container/validateDisplayList()
    at mx.managers::LayoutManager/validateDisplayList()
    at mx.managers::LayoutManager/doPhasedInstantiation()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()
    at mx.core::UIComponent/callLaterDispatcher()

  177. selva Says:

    Can you please say whats the key difference between these three classes

    1.SWFLoader
    2.ModuleLoader
    3.ModuleManager

    Thanks

  178. Vasu Reddy Says:

    hi Sujit,

    i am trying to create Flex portlets in RAD and configure it in WebSphere Portal Server 6.0.

    1) know how to create jsp portlet in Portal Server, to create Flex portlet is there a need of FlexPlugin in RAD as per these below PDF
    http://help.adobe.com/en_US/livecycle/8.2/portal_update_lcds261.pdf
    uses FlexTagLib in jsp.

    2) how to configure Flex Portlet in Portal Server with BlazeDS to invoke Java method using Remote Object…..this is much different than BlazeDS with tomcat.

    may be if BlazeDS is configured properly in PortalServer than Flex can invoke Java method same as in tomcat.

    please reply soon.

  179. Shilpa Says:

    Hi Sujit,
    could you tell me how to bind datepicker with datagrid in blazeds.

  180. Shilpa Says:

    Hi Sujit,
    could you tell me how to bind datefield with datagrid in blazeds.

  181. Chandu Says:

    Hi Sujith,

    Can provide a simple example of writing and dispatching custom events in AS3.

    Regards
    -Chandu

  182. Prakash Says:

    Hi Sujit, I need to send an ActionScript object to servlet and return the object in CSV format. Could you please share some sample code how to pass the AS object to servlet and how to receive the AS object in servlet?

  183. Ravi Gummadi Says:

    Hi Sujit,

    I vaguely remembering some real AVM level tutorial pdfs long back (Jan 2007). I was searching for them offlate and couldnt find them. They deal with the memory managmeent model of Flex and 3 frame execution of Flex application. Do you have any idea where they are found? And also I am looking at indepth discussion of Flex/Flash rendering mechanism and memory model (Threading and event based). Plz do let me know if you have come cross them.
    Thank you

    Regards
    Ravi

  184. celine Says:

    hi Sujit,

    I want to create and save a folder in my machine using a flex application, can i do this with SharedObjects?

    Thank you

  185. Jzy Says:

    Hi,
    I have a problem using BlazeDS. I have a big application in Flex using remoting with BlazeDS. That’s works fine but my messagebroker crashes sometimes when my application is running and after that, calls to BlazeDS don’t works anymore.
    It happens after many calls (sometimes 200, sometimes more than 1000…).
    I tried to use many channels instead of only one, no result.

    Is it a limitation of Blaze? Thanks.

  186. Sujit Reddy G Says:

    Hi Mike,

    Check out the article at the URL below.

    http://viconflex.blogspot.com/2007/12/dataservicetransaction-lcds.html

    Hope this helps.

  187. Sujit Reddy G Says:

    Hi Ashok,

    Yes, that might not work in web application cause, Google doesn’t have a crossdomain file defined.

    Hope this helps.

  188. Sujit Reddy G Says:

    Hi Selva,

    Looks like some property is null, can you please share code to reproduce this?

  189. Sujit Reddy G Says:

    Hi Vasu,

    Never tried this, but configuring BlazeDS properly and making sure your Flex based portlet is sending request to BlazeDS will get it working. Please check out the articles at the URLs below.

    http://sujitreddyg.wordpress.com/2009/04/07/setting-up-blazeds/
    http://sujitreddyg.wordpress.com/2008/07/03/creating-blazeds-channels-at-runtime/

    Hope this helps.

  190. Sujit Reddy G Says:

    Hi Shilpa,

    What exactly do you want to do? which property of DateField you want to bind to which property of DataGrid. Can you please explain.

  191. Mike Says:

    Hi Sujit, thanks that’s what I needed: D in fact was doing well, but the problem is not within the class by invoking the server. thanks :D

  192. Sujit Reddy G Says:

    Hi Chandu,

    var e:Event = new Event(“EventType”);
    dispatchEvent(e);

    Hope this helps.

  193. Sujit Reddy G Says:

    Hi Prakash,

    Please check out the URL below.

    http://sujitreddyg.wordpress.com/2008/01/14/invoking-java-methods-from-adobe-flex/

    Hope this helps.

  194. Sujit Reddy G Says:

    Hi Ravi,

    Please check out the URLs below.

    http://blogs.adobe.com/aharui/2007/03/garbage_collection_and_memory.html
    http://livedocs.adobe.com/flex/3/html/profiler_6.html

    Hope this helps.

  195. Sujit Reddy G Says:

    Hi Jzy,

    Sharing error messages from the Flex application or from the server logs will help in finding out what might be going wrong.

  196. Nidhi Says:

    Hi Sujit,

    I am trying to pass the elements of my dynamic list from Flex to JSP..
    Can you tell me how can that be done?

  197. Sujit Reddy G Says:

    Hi Nidhi,

    Please try sending them as comma separated values or key value pairs using HTTPService.

    Hope this helps.

  198. selva Says:

    hi sujit,

    Im using the resourceManager.loadResourceModule(resourceModuleURL); to load my messages property files in my main application . Also Im using modules in my application.
    In the modules Iam not using this below tag

    [ResourceBundle("messages")]

    But still my application is loading correctly the messages from the messages.properties file.If so Whats the purpose of this metadata tag.

    10x in deed. Can u please make clear that.

  199. Nidhi Says:

    Hi Sujit,

    Thanks.. That helped.. :)

  200. Nidhi Says:

    Hi Sujit,

    Is it possible to read from a DataGrid if it is empty? If yes, then how? .. I tried using many ways but it doesn’t run.

  201. Ragvendra Says:

    IE7 with https under cross domain throws the following error: Security error accessing url” faultCode=”Channel.Security.Error” . A link identified this issue as a IE bug that can be circumvented by using one of the following http header parameters:
    Cache-Control: no-store
    Cache-Control: no-store, must-revalidate
    Cache-Control: no-store, must-revalidate, max-age=0
    Cache-Control: must-revalidate
    Cache-Control: max-age=0

    Do you have any insight?

  202. Vasu Reddy Says:

    Hi Sujit,

    1) I had made portal project in RAD, by using simple “Hello” Flex application (i.e. used generated swf file ) able to view flex application properly in portal server.
    2) if i will use RemoteObject tag in Flex application, made MessageBrokerServlet entry in web.xml for rmi connection. In same project created java class and made corresponding entry in remote-config.xml.

    My Question
    1)By refering to swf file in jsp through WebSphere Portal Server it is possible to invoke JavaObject using RMI?, if both are deployed on same war file.
    2)while creating Flex project where should i point to i.e. Root folder, Root Url, Context Root. because i am using WebSphere Portal Server.

    In “creating Blaze channel at runtime”, i think it talk about without making entries in remoting-config.xml should be configured in Flex application.

    thanks in advance.

  203. Doug Says:

    Hi Sujit, this is a very useful website. Question:

    We are trying to slowly integrate Flex 3 into an existing web app. We plan on adding the Flex client into iFrames where appropriate. The problem that I’m addressing is how to integrate a mixed J2EE/Flex client into a single web app on the server. For the Blaze side we want to hit java classes via destinations.

    The web.xml file contains a which forwards to a .jsp login form (we’re using FORM auth-method). When the BlazeDS url-mapping is added to security-constraints any RemoteObject calls will hit this login-config servlet. That’s OK. We know it’s requesting the Blaze servlet and can try to respond accordingly (i.e. not returning the HTML logon form).

    I tried returning an AMF3 object back to the client (a string that said “noAuth”) but the Flex client had no clue and spewed a “BadVersion” error. I was hoping to have the client recognize some kinda specific String/error so that it could prompt the client to logon (say, in the event of a session timeout while in the Flex portion of our app). I also prefer to avoid creating my authentication via Blaze as both my J2EE client and Flex app are sharing the same session and thus the same timeouts and other settings.

    This seems like a good strategy but I just can’t figure-out how to make it apply. If this isn’t a good strategy do you have any suggestions given this issue? Certainly we can’t be the only Java shop trying to slowly migrate Flex into our web applications. Thanks.

    -Doug

  204. Chandu Says:

    Hi Sujith,

    My task is as follows ,

    a) I have an AdvancedDataGrid , I have to render icons and label coming from the server . icon data from server comes as byte array. So I created a an image render which has an HBox and to the HBox I added an Image class and a Label Object. I am able to see icon and text as expected,
    now when the user clicks on the cell, I wanted a ComboBox to drop down with choices which again should show the icon and text.

    b) so I created a new class extending ComboBox and I created another image renderer , which is the ItemRenderer for the ComboBox. The dataProvider is an Array of Strings, In the image render based on the “data” property I set the Image and Label in t he renderer

    c) now I set the itemEditor as the above custom ComboBox

    All the above works fine to a certain extent. However when ever I click the Cell the cell changes to a DropDown List and starts showing the “string” from the Array which was the data provider for the ComboBox. and when I click cell again the DropDown List opens and I see the Icons and Text, I want to avoid showing the “text” part when I just click the cell

    Hope I was able to explain clearly.. if you have an exmaple or a refernce to some material on how I can achieve this I will be gratefull

    Regards
    -Chandu

  205. Christophe Says:

    Hello,

    We are trying to build a high definition PDF (300 dpi, for book printing) from pages designed in a FLEX tool ( like scrapblog.com)

    The flash is included in a web site written in Java/J2EE, so the PDF generation will take place on the Java server (based on a description of the pages sent by the flex tool with BlazeDS

    We need 300 dpi definition and the ability to build the PDF without any template (since the user will be able to change the layout of the pages he wants to print : the description sent by the flash tool includes the location, orientation and source of all the elements in each page).

    From what we have seen up to now, the lack of a template can be difficult to handle with java libraries.

    Any idea how such a PDF can be built in Java ? Or lacking that, with other languages (such as PHP) which could be added on the server side.

    Thanks for your help.

  206. Sharath Says:

    Hi sujith,

    How to open a browser window from air application. for me its showing sandbox exception.

    SecurityError: Error #2121: Security sandbox violation: navigateToURL: app:/demo.swf cannot access about:blank. This may be worked around by calling Security.allowDomain.

    i need to open all http,https ….

    Thanks
    Sharath

  207. Sujit Reddy G Says:

    Hi Nidhi,

    access the dataProvider property of the DataGrid.

  208. Sujit Reddy G Says:

    Hi Ragvendra,

    I think this is a IE bug and this solution should help.

  209. Sujit Reddy G Says:

    Hi Vasu,

    You need not set the root folder, please visit the URLs below for more details.

    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=12209&productId=2&loc=en_US
    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=13810&productId=2&loc=en_US

    Hope this helps.

  210. Sujit Reddy G Says:

    Hi Doug,

    Please check this article http://sujitreddyg.wordpress.com/2008/09/04/securing-blazeds-destinations-using-custom-tomcat-realm-authentication/

    Hope this helps.

  211. Karunya Says:

    Hi Sujit,

    I have been trying to setup Custom wrapper in JSP for my flex application so I can get some header variables. But I am getting errors in passing the Flash Vars. Can you please recommend best way to do this.

    Thanks,
    Karunya

  212. dan Says:

    Hi Sujit ,

    Below is a very simple Flex app. containing the main screen with a Button (main.mxml) and a Form-based component , located under src/components .
    I would like to know how to use the Button to display the Form component when clicking on it ; the method that i added to the button is : click=”showForm()” .

    Thank you very much

    Main.mxml

    SearchForm.mxml

  213. dan Says:

    Hi Sujit,
    It seems my previous post is incomplete … I’ll try again .
    Thanks

    main.mxml
    ////////////////////////////

    …..
    mx:Button x=”246″ y=”242″ label=”Button” click=”showForm()”

    SearchForm:

    … etc
    ////////////////////////////

  214. Rajan Says:

    Hi Sujit,

    I want to appreciate the time you put into replying to the blogs queries. It is tremendous..
    I am using LCDS. In API docs, ServerConfig class xml property should hold all the detinations which are present in the services-config.xml file.

    In my services-config.xml file. i am doing something like below

    but when i access the Services.xml property on creationcomplete. i notice that some of my destinations are missing from the file remoting-config.xml. Due to which i am getting the error from the method

    private static function getDestinationConfig(destinationId:String):XML

    Can you please show me some pointers..

    thanks
    Rajan

  215. Rajan Says:

    Hi Sujit,

    I want to appreciate the time you put into replying to the blogs queries. It is tremendous..
    I am using LCDS. In API docs, ServerConfig class xml property should hold all the detinations which are present in the services-config.xml file.

    In my services-config.xml file. i am doing something like below

    services
    service-include file-path=”remoting-config.xml”
    service-include file-path=”proxy-config.xml”
    service-include file-path=”messaging-config.xml”
    services

    but when i access the Services.xml property on creationcomplete. i notice that some of my destinations are missing from the file remoting-config.xml. Due to which i am getting the error from the method

    private static function getDestinationConfig(destinationId:String):XML

    Can you please show me some pointers..

    thanks
    Rajan

  216. Dhanya Says:

    hi sujit.
    From mxml application remote object method working properly
    but RemoteObject error when calling from within a Module
    is it possible or not?
    can you give me some clarification reagrding this
    thanks
    Dhanya

  217. Mike Says:

    Hey Sujit,

    First of all, thanks in advance for any help you could bring to me. I really appreciate your time on this.
    Now, I’m working with Charts, right now I’m facing the problem, of the label on the chart. By request of my client, he is asking me to solve the issue that comes up when the label it’s too big, and the graphic (BarSerie) too short, so then the label appears as “…” ok, yes we do have the tooltip, but those graphics are also exported as PDF files, and the requiere to have the graphic information on the report, so I thought that might be a way to specify dinamically to the BarSerie the labelLocation property.
    My problem is that I’m not really a Flex programmer, I had been focused on Java but the client asked me to create this project as this interaction Flex + Java + Oracle. So…

    Do you thinks is there a way to create that dynamic position?

    Also, on the same project and as a plus of the strategy… And taking the advantage of your knowledge, I’m exporting to PDF and Excel, but right now I’m using a JSP page to call the interaction to the exportation. So the way I’m exporting to PDF is using AlivePDF, no problem there, because that API allows me to add images, so there I add the chart object. The problem comes up, when I’m trying to export an image to the Excel file.
    I just started to read about as3xls project on googlecode. But if you have some sample that I can use, would be wonderful!

    Once again, thanks and thanks and thanks in advance.
    I’ll be waiting on your answers!!
    Have a gr8 day!

    Mike

  218. Suman Says:

    Hi Sujit,

    I am new to blazeds, I have few concerns regarding multithreading in the context of remote objects. Currently, who takes care of the mutl threading issues (like those handled by tomcat servlet contaier),when the destination invokes the java object through the adapter for the given destination?

  219. Jayakumar Says:

    Hello Sujith,
    Hope you remember me . Could you please help me on export to excel functionality. How will i export a datagrid to an excel?

    Thanks,.
    Jayakumar Aravind

  220. kirat Says:

    Hello Sujith,

    I am facing problems in Adobe Air Version..I had AIR 1.0 ,I have updated it to 1.5.1 but still its installed in the folder 1.0.
    When i create a new Flex project it shows Adobe version 1.0 is used.
    My major concern is i want to use Text layout Framewok and it minimum requirement is 1.5.
    Please reply ASAP.

  221. Shyam Says:

    Hi Sujith,
    I am using Blazeds-Tomcat Integrated version.Whenever I run my flex application it creates a new session for Blazeds in Tomcat.The number of sessions for Blazeds is not increasing above 22 (seen in the Tomcat Manager).If I run my application for the 23rd time , my application says it is out of memory.
    Can u suggest a solution for increasing the number of sessions ?

    Thanks in advance and awaiting your reply at the earliest,

    Shyam Sundar.A

  222. Neeraj Says:

    Please send me link to download blazedsMonster

  223. Sujit Reddy G Says:

    Hi Neeraj,

    Please download from this URL http://sujitreddyg.wordpress.com/2009/05/07/blazemonster/

  224. Bindu Says:

    Hi Sujit,

    Iam new to Flex. Iam exploring Flex and Blaze DS capabilities. My requirement is like this.

    I have my Plain Java Object in Server A and flex application deployed in Server B. And I need to invoke Java Object running on Server A from flex client application which is deployed on Server B. Is this possible to do with BlazeDS web application.

  225. Hector Says:

    Please note that retrieving data from db via the same code works perfectly fine….

    Need some help!!! Yes, some stuff is missing, but i can added if need be to be assisted. clarity and making sure i didn’t overload the page was the reason for not including everything….

    thx in advance….

    My Error is:
    [RPC Fault faultString="Channel disconnected" faultCode="Client.Error.DeliveryInDoubt" faultDetail="Channel disconnected before an acknowledgement was received"]
    .
    .
    .
    Here is my Code:
    VO – PHP

    [/code]
    
    VO - AS3
    [code]package org.olg
    {
    [RemoteClass(alias="VOContact")]
    [Bindable]
    public class VOContact
    {
    public var $contactyear:uint;
    public var $contactmonth:String;
    public var $contactgender:String;
    public var $contactlanguage:String;
    public var $contactparticipation:String;
    public var $contactlastname:String;
    public var $contactfirstname:String;
    public var $contactaddress:String;
    public var $contactcity:String;
    public var $contactstate:String;
    public var $contactzipcode:String;
    public var $contacthomephone:String;
    public var $contactworkphone:String;
    public var $contactmobilephone:String;
    public var $contactemail:String;
    public var $ontactotheremail:String;
    public var $contactparish:String;
    }
    }

    Service:

    require_once(’VOContact.php’);
    public function putData($contact)
    {
    if ($contact == NULL)
    return NULL;
    //connect to the database.
    $mysql = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME, DATABASE_PASSWORD);
    mysql_select_db(DATABASE_NAME);
    //save changes
    $query = sprintf(”INSERT INTO contactstable	(contactyear,
    contactmonth,
    contactgender,
    contactlanguage,
    contactparticipation,
    contactlastName,
    contactfirstName,
    contactaddress,
    contactcity,
    contactstate,
    contactzipCode,
    contacthomePhone,
    contactmobilePhone,
    contactworkPhone,
    contactemail,
    contactotherEmail,
    contactparish) VALUES (
    ‘”.mysql_real_escape_string($contact[contactyear]).”‘,
    ‘”.mysql_real_escape_string($contact[contactmonth]).”‘,
    ‘”.mysql_real_escape_string($contact[contactgender]).”‘,
    ‘”.mysql_real_escape_string($contact[contactlanguage]).”‘,
    ‘”.mysql_real_escape_string($contact[contactparticipation]).”‘,
    ‘”.mysql_real_escape_string($contact[contactlastName]).”‘,
    ‘”.mysql_real_escape_string($contact[contactfirstName]).”‘,
    ‘”.mysql_real_escape_string($contact[contactaddress]).”‘,
    ‘”.mysql_real_escape_string($contact[contactcity]).”‘,
    ‘”.mysql_real_escape_string($contact[contactstate]).”‘,
    ‘”.mysql_real_escape_string($contact[contactzipCode]).”‘,
    ‘”.mysql_real_escape_string($contact[contacthomePhone]).”‘,
    ‘”.mysql_real_escape_string($contact[contactmobilePhone]).”‘,
    ‘”.mysql_real_escape_string($contact[contactworkPhone]).”‘,
    ‘”.mysql_real_escape_string($contact[contactemail]).”‘,
    ‘”.mysql_real_escape_string($contact[contactotherEmail]).”‘,
    ‘”.mysql_real_escape_string($contact[contactparish]).”‘
    “);
    $result = mysql_query($query);
    return NULL;
    }

    MXML:

    private var contact:Object = “”;
    private function groupContact():void
    {
    contact = {contactyear:yearTextInput.text,
    contactmonth:monthComboBox.selectedItem,
    contactgender:genderComboBox.selectedItem,
    contactlanguage:languageComboBox.selectedItem,
    contactparticipation:participationTypeComboBox.selectedItem,
    contactlastName:lastNameTextInput.text,
    contactfirstName:firstNameTextInput.text,
    contactaddress:addressTextArea.text,
    contactcity:cityTextArea.text,
    contactstate:stateComboBox.text,
    contactzipCode:zipCodeTextInput.text,
    contacthomePhone:homePhoneTextInput.text,
    contactmobilePhone:mobilePhoneTextInput.text,
    contactworkPhone:workPhoneTextInput.text,
    contactemail:emailTextInput.text,
    contactotherEmail:otherEmailTextInput.text,
    contactparish:parishTextInput.text};
    }
    [A DIFFERENT FUNCTIONS CALLS THIS FUNCTION]
    groupContact();
    
    private function putDataListner(event:ResultEvent):void
    {
    Alert.show(”The data was saved!”);
    }

    Ok.... so i have narrowed it down to this:

    1. my variable data does get recognized through the "tunnel", Flex debug says so
    2. I am able to insert "something" garbage into the db
    3. i need to find out what is the correct string for the insert syntax with flex, zendamf and php
    4. the data that the db gets is:
    depending on my db schema i get more or less characters

    .mysql_real_escape_string($cont

    What is the correct syntax for the $query = sprintf(" blah ?????

    public function putData($contact)
    		{
    			if ($contact == NULL)
    				return NULL;
    
    			//connect to the database.
    			$mysql = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME, DATABASE_PASSWORD);
    			mysql_select_db(DATABASE_NAME);
    
    			//save changes
    			$query = sprintf("INSERT INTO contactstable VALUES (NULL, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
    					'".mysql_real_escape_string($contact[contactyear])."',
    					'".mysql_real_escape_string($contact[contactmonth])."',
    					'".mysql_real_escape_string($contact[contactgender])."',
    					'".mysql_real_escape_string($contact[contactlanguage])."',
    					'".mysql_real_escape_string($contact[contactparticipation])."',
    					'".mysql_real_escape_string($contact[contactlastName])."',
    					'".mysql_real_escape_string($contact[contactfirstName])."',
    					'".mysql_real_escape_string($contact[contactaddress])."',
    					'".mysql_real_escape_string($contact[contactcity])."',
    					'".mysql_real_escape_string($contact[contactstate])."',
    					'".mysql_real_escape_string($contact[contactzipCode])."',
    					'".mysql_real_escape_string($contact[contacthomePhone])."',
    					'".mysql_real_escape_string($contact[contactmobilePhone])."',
    					'".mysql_real_escape_string($contact[contactworkPhone])."',
    					'".mysql_real_escape_string($contact[contactemail])."',
    					'".mysql_real_escape_string($contact[contactotherEmail])."',
    					'".mysql_real_escape_string($contact[contactparish])."'
    					);
    			$result = mysql_query($query);
    			return NULL;
    		}
  226. Ganesh Says:

    Hello Sir,

    I am new to flex technology. I am developing a web application using struts.
    I have some difficulty in using flex as front end.

    I am trying to use the menu bar. I am able to create the menu bar but i dont know how to show the corresponding page(not url) on click of item.

    Also please advise me, is it possible to hide the components such as panel and other components and they should be shown on particular event occurance.

    Please help me
    Thank you

  227. Ganesh Says:

    Hello Sir,

    small correction in the previous post.

    Hello Sir,

    I am new to flex technology. I am developing a web application using struts.
    I have some difficulty in using flex as front end.

    I am trying to use the menu bar. I am able to create the menu bar but i dont know how to show the corresponding page(not alert message) on click of item.

    Also please advise me, is it possible to hide the components such as panel and other components and they should be shown on particular event occurance.

    Please help me
    Thank you

  228. Mona Says:

    Hi Sujith,

    I found lot of useful posts in your blog. I am looking for some help in developing a Flex Project.
    Here’s my requirement:
    Dashboard needs to be displayed with the data from MySql database which gets updated every 10 min. That is..my dashboard charts have to be refreshed every 10 min. Please suggest me how to start this project. Any hints/sample code is highly appreciated.

    Thanks,
    Mona.

  229. Mona Says:

    contd..

    I am planning to use Java as backend and JBoss server to deploy my application. Step by step walk through will be very helpful. Looking forward for your reply.

    Thanks,
    Mona.

  230. Sujit Reddy G Says:

    Hi Ganesh,

    Please check the visible property of the Flex controls and modules in Flex.

  231. Sujit Reddy G Says:

    Hi Mona,

    Couple of options

    1. Data Management feature in LCDS has this and more implemented. If you can use LCDS, then go for it.
    2. Have a timer and send request to the server to get data the modified data
    3. Use one of the polling channels in BlazeDS Messaging service and get the modified data

    Useful articles
    http://sujitreddyg.wordpress.com/2008/01/14/invoking-java-methods-from-adobe-flex/
    http://sujitreddyg.wordpress.com/2008/01/17/messaging-using-flex-and-blaze-ds/

    Hope this helps.

  232. Prachi Says:

    Hi Sujit,

    How can i put blazeDs, My SQL and flex together.
    Is there any way?

    Please help

    Prachi

  233. Sujit Reddy G Says:

    Hi Prachi,

    You should have a Java class, which communicates with MySQL. Flex should communicate with Java class using Remoting in BlazeDS. Please check the articles in the URL below.

    http://sujitreddyg.wordpress.com/2008/01/14/invoking-java-methods-from-adobe-flex/
    http://sujitreddyg.wordpress.com/2009/04/07/setting-up-blazeds/

    Hope this helps.

  234. Mona Says:

    Hi Sujith,

    Thanks for the reply. I am unable to configure JBoss server as target runtime in Flex Builder.
    I am getting this error:
    Missing classpath entry \your_server_root\appservers\jboss\bin\run.jar

    I have seen a lot of posts similar to this error but could not find a solution.

    -Mona

  235. Mona Says:

    Sujith,

    A simple application demonstrating interaction between Flex, Java and MySQL would be very helpful. Please post if you have such applications.

    Thanks.

  236. Prachi Says:

    i have tried using java class for connecting blazeds to mySQL but still faing the problem,
    Can you pelase put together a simple app which demonstrates interaction between Flex, Java and MySQL . It will be really very helpful

  237. Phil Says:

    Will your Blazemonster utility work with LCDS as well? Thanks.

  238. Phil Says:

    Have you used Blazemonster with the Swiz framework? If so can you write a blog entry indicating how the two work together? This would seem to be a very time-saving combination but I’m not yet sure how it would work, being new to Flex.

  239. Mahesh Says:

    Sujit,
    Is there a way to display PDF in a Flex Web App like the PDFs displayed in acrobat.com… We don want to use iFrames. Pleae reply….

  240. Srinivas Reddy Says:

    Hi Sujit,

    In Flex , Is it possible to mashup other site components ie gagdets in my flex program (or in Accordion).
    It can be like news/ chat / currency codes/ Exchange rates etc).

    If possible point to me links available with example (flex examples).

    Thanks in Advance,

    Regards,
    Srini.

  241. Nilesh Says:

    HI Sujit,

    Have posted one query on usergroup. Can you quickily take a look and provide your input ?
    It is about using HTTPService to send POST request to https URL

    http://groups.google.co.in/group/flex_india/browse_thread/thread/bea66b8d34d3abe7

    Thanks ,
    Nilesh

  242. Kamal Says:

    Hi Sujit,

    Could explain me the clear picture of life Cycle methods of a application as well as child creation process with an examle???

  243. Kamal Says:

    Hi Sujit,

    Could explain me the clear picture of life Cycle methods of a application as well as child creation process with an example???

  244. Sujit Reddy G Says:

    Hi Phil,

    Yes it will work, please let me know if you face any problem.

    Thanks.

  245. Sujit Reddy G Says:

    Hi Mahesh,

    I don’t this is possible as of now.

    Hope this helps.

  246. Sujit Reddy G Says:

    Hi Srinivas,

    It is definitely possible, just consume the services you want using WebService or HTTPService components and display them in your Flex application.

    Hope this helps.

  247. tobi Says:

    Hi Sujit,

    I want to create a page with Adobe Flex where few user can login in a same session.
    For example to chat or to see each other via webcam.
    How can I realize this?
    The page is already working, but every user have an other session…

    Can you give me a hint?

    best regars

    tobi

  248. Idan Says:

    Hi Sujith,

    I am trying to run example using flex 4 and blazeds.
    I am receiving error when I press the button:

    [MessagingError message='Destination 'CreatingRpc' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']

    What is the source for this problem ?
    How can it be debug ?

    Thanks

  249. Rahul Says:

    Hi Sujit,

    I am using the Google Calendar API created by you. I am facing two problems while using that:
    1. Firstly if I try to delete an event I get this error:

    ArgumentError: Error #2008: Parameter method must be one of the accepted values.

    Debugging the error gave me some idea that it was coming at:
    urlRequest.method = “DELETE”;
    Any idea on how to rectify it?

    2. Second error is when I try to get events between a given date range. The problem is that the date gets converted to UTC format in ur API and if I try to get events for a single day, i get in result for 2 days.

    Would appreciate if you could help me out..

    Thanks

  250. chary Says:

    Hi Sujit!
    I wish you will answer my question.

    Iam doing project which use combine Flex, Stomp, ActiveMQ. How can I send message from Flex client to topic of ActiveMQ. I import as3-stomp before. What do I must import packages more?

    Thanks!

    – chary -

  251. Jose Says:

    Hello to all

  252. Jose Says:

    I’ AM PROGRAMING WITH ADOBE FLEX AND I’AM GETTING A MESSAGE, PLEASE HELP ME

  253. qnaguru Says:

    Hi Sujit…

    i keep getting this error in LCDS…

    “HttpSession to FlexSession map not created in message broker”

    I have clustered my LCDS Server(on TomcatB) with another Tomcat Server(TomcatA).

    What am i doing wrong…

    Thanks.

  254. Lalit Says:

    Hi Sujit,

    I want to integrate Flex and BlazeDS with my Struts framework using remote object.
    I am able to get the parameters from Flex client to my remote method as arguments.
    But I was earlier using forms to get these parameters and used that form object at many places to update my application.How can these be achieved in Flex ?
    It would be of great help if you could reply with a sample application integrating Struts with Flex and BlazeDS.

    Thanks in advance,
    Lalit.

  255. kanti Says:

    I want to integrate mathmleditor in flex application,
    i have seen the google code which uses javascript and html and mylib.swc. I tried the same code alongwith the swf file and loaded the same swf as a url

  256. Richard Says:

    Hi,

    I just want to ask if its possible to create xml file and save the data in my form in flex or air?

  257. Sachin Sharma Says:

    Hi Sujit,

    Please can you tell me how i can access Java methods from Adobe Air Appilcation?

  258. Prashanth Says:

    Hi Sujit,

    As per my understanding ,Flex is not supporting Map DataType(HashMap/Map). So i wrote the below class to use Map in my application.

    The problem i am facing with doing this is, I am not able to bind my map with the ‘currentState’ property of a “Canvas”. The Class which i have written extends the ArrayCollection but still i am facing issues with binding.

    My Map class which extends ArrayCollection:

    package com.util
    {
    import mx.collections.ArrayCollection;

    public class Map extends ArrayCollection
    {
    private var keyNames:Object = new Object();
    public function Map()
    {
    super();
    }
    public function put(key:String,value:Object):void
    {
    if(keyNames.hasOwnProperty(key))
    {
    setItemAt(value,keyNames[key]);
    }
    else
    {
    keyNames[key] = this.length;
    addItem(value);
    }
    }
    public function getValue(key:String):Object
    {
    return getItemAt(keyNames[key]);
    }
    }
    }

    My MXML:

    It would be of great help to me, if you could post a solution.

    Thanks

    Prashanth

  259. Vimal Says:

    Hi Sujit,
    Thanks for all the great postings.
    Could you please provide an example for Data Paging in Fash Builder4 with Java?

    Thanks

  260. Idan Says:

    Hi,

    I am trying to load a file that is locally on my computer.
    I am receiving the following error:
    SecurityError: Error #2148: SWF file http://localhost:8400/blazeds/MyApp-debug/MyApp.swf cannot access local resource file:///C://flex.txt. Only local-with-filesystem and trusted local SWF files may access local resources.
    at flash.net::URLStream/load()

    I try to add to add to the compiler the option of -use-network=false but it didn’t help.

    I am using flex 4.
    I also add the the file and directory to the trusted list.

    can you help with that ?

    Thanks

  261. Tobias Says:

    Dear Sujit,

    I have created a RIA using Flex 3 and WebORB PHP. It successfully runs on MAMP on Mac using the localhost. But how the heck do I deploy this to my hosted website? There’s nothing to be found on how to setup WebORB PHP on a hosted website. Could you give me some hints regarding this issue? Btw, I am using the Community Edition. I would be very glad.

  262. cham Says:

    Hi Sujit,

    I am using flex 3 and blazeds for web application development. I have following questions and any help is appreciated.
    1. Do we have to do any session handling in flex based web app?
    2. Can you please explain how to handle the server session expire event in client side and display login page?

    Thanks

  263. kanti Says:

    i have actionscript classes to parse mathml but i dont know how to access them using html and javascript. I want to send xml data and want to get parsed mathequation.please help.

  264. Pooja Gupta Says:

    Hi Sujit,

    I want to create a simple application which would require a database at the backend. I am using Flex Builder 3 to make the application. Can you please suggest a light backend database for this. Is it possible to use MS Access.

    Thanks in Advance.

    Pooja

  265. Rao Says:

    Hello Sujith,

    I need help from you on LCDS, I have installed LCDS ES2 Version 3 Beta and i have flex SDK 3.4.0 and using Flex Builder 3.

    My problem is same as the one posted by Laurie_Hall here

    While creating new flex project if i point the Root folder to <>/lcds-sample/ (I have appropriate destinations configured in data-management-config.xml) i am able to get the data from my owm backend. If i point the Root folder to <>// i am getting “No destination….” error eventhough i have proper destination configured.

    Thanks in Advance,
    Rao

  266. Rao Says:

    Hello Sujith,

    I need help from you on LCDS, I have installed LCDS ES2 Version 3 Beta and i have flex SDK 3.4.0 and using Flex Builder 3.

    My problem is same as the one posted by Laurie_Hall here

    While creating new flex project if i point the Root folder to -app root-/lcds-sample/ (I have appropriate destinations configured in data-management-config.xml) i am able to get the data from my owm backend. If i point the Root folder to -app root-/myapplication/ i am getting “No destination….” error eventhough i have proper destination configured.

    Thanks in Advance,
    Rao

  267. Ravi Says:

    Hi Sujit,

    I need help from you regarding server console printing. As I am using blazeds for remote call for server side java classes. Everything is working fine. I have deployed my application on JBOSS server. Whenever I use to call remote classes there are few thing that is getting printed on server console. I have checked in my application that if I am using any system.out.println inside java class. But that is also not the case. I want to stop printing of those information on server console. Please help me regarding this.

    Thanks in advance,
    Ravi

  268. Purnima Sriram Says:

    Hi ,
    Sujith,
    Iam having problem with my application. Iam connecting flex to struts to mysql. It is hanging in between after 3-4 records are added into the database. Iam not able to understand whether it is java problem or tomcat problem or flex problem pls do help me in this regard. waiting for your reply. You can send it to my personal mail id too.
    pls its urgent.

  269. Raja Says:

    Hi,Iam need information on FLEX HTTP request.
    I dont want to hard code URL in .
    So iam configuring in proxy-config.xml file.
    Iam unable to communicate with this file.Iam using Blaze ds.
    Let me know if u have any ideas

  270. Raja Says:

    MessagingError message=’Destination ‘ProxyRequest’ either does not exist or the destination has no channels defined (and the application does not define any default channels.)’]” faultCode=”InvokeFailed” faultDetail=”Couldn’t establish a connection to ‘ProxyRequest’

    Getting this error…

  271. Raja Says:

    Hi, Iam using Blazeds with Tomcat.
    Making a Http service request from Flex client

    I have configured destination in proxy-config.xml file.

    /{context.root}/test

    Error iam getting on submit is :[RPC Fault faultString="[MessagingError message='Destination 'ProxyRequest' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']” faultCode=”InvokeFailed” faultDetail=”Couldn’t establish a connection to ‘ProxyRequest’”]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:263]
    at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::invoke()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\http\mxml\HTTPService.as:249]
    at mx.rpc.http::HTTPService/send()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\http\HTTPService.as:767]
    at mx.rpc.http.mxml::HTTPService/send()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\http\mxml\HTTPService.as:232]
    at FlexHttpServiceDemo/___FlexHttpServiceDemo_Button1_click()[E:\home\isms\eclipseWorkSpace\FlexHttpServiceDemo\src\FlexHttpServiceDemo.mxml:24]

  272. Sujit Reddy G Says:

    Hi Tobi,

    You can try Messaging service BlazeDS/LCDS or try one of the below

    http://labs.adobe.com/technologies/afcs/
    http://labs.adobe.com/technologies/stratus/

    Hope this helps.

  273. Sujit Reddy G Says:

    Hi ishai,

    This might because either the destination doesn’t have any channel defined or Flex application is not recompiled after configuring the channel. You can check the channel used by the RemoteObject by just putting a break point and watching the RemoteObject instance variable.

    Hope this helps.

  274. Sujit Reddy G Says:

    Hi Rahul,

    Which Flex SDK are you using ?

  275. Sujit Reddy G Says:

    Hi Jose,

    Whats the message you are getting ?

  276. Sujit Reddy G Says:

    Hi Lalit,

    Please check the articles below.

    http://www.adobe.com/devnet/flex/articles/flex_struts.html
    http://www.adobe.com/devnet/flex/articles/struts.html

    Hope this helps.

  277. Sujit Reddy G Says:

    Hi Richard,

    Yes, definitely. Please see if this article helps http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/

  278. Sujit Reddy G Says:

    Hi Sachin,

    Please check this article http://sujitreddyg.wordpress.com/2008/01/14/invoking-java-methods-from-adobe-flex/

    Hope this helps.

  279. Sujit Reddy G Says:

    Hi Prashanth,

    Did you send out same question to Vyshak ? If yes, I replied to your email.

    Hope that helped.

  280. Sujit Reddy G Says:

    Hi Vimal,

    I will try posting that. But its same as PHP except that the code on the server is written in Java. Please try and see if you can get that working.

  281. Sujit Reddy G Says:

    Hi ishai,

    Please change the output folder/ launch URL to launch it from local system rather than from the server. swf loaded from a server cannot access local file system.

  282. Sujit Reddy G Says:

    Hi Tobias,

    You should be changing the endpoint URLs in your services-config.xml file to point to your hosted website and the Flex application has to be recompiled with the updated services-config.xml configuration file. That change should be sufficient to deploy.

    Hope this helps.

  283. Sujit Reddy G Says:

    Hi Cham,

    You can find details on how to manage session using Remoting at this URL http://sujitreddyg.wordpress.com/2008/05/16/session-data-management-in-flex-remoting/

    Incase of session expiring, you should be writing code which will check if the session has expired and let your Flex application know about that. You can also handle the same on the client. Please find details at this URL http://www.adobe.com/cfusion/communityengine/index.cfm?event=showDetails&postId=322&productId=2&loc=en_US

    Hope this helps

  284. Sujit Reddy G Says:

    Hi Kanti,

    Please check if this helps http://www.adobe.com/devnet/flex/videos/fab/

  285. Sujit Reddy G Says:

    Hi Pooja,

    You can use database of your choice as long as there are driver to communicate with the database. I would use chose MySQL over MS Access :)

    Hope this helps.

  286. Sujit Reddy G Says:

    Hi Rao,

    Can you please share the data-management-config.xml and the web.xml. If you can also share the Flash Builder error logs that will help. Thanks.

  287. Sujit Reddy G Says:

    Hi Ravi,

    Please change the log settings in services-config.xml

    Hope this helps.

  288. Sujit Reddy G Says:

    Hi Raja,

    Where is this proxy-config.xml file ?

  289. Sujit Reddy G Says:

    Hi Raja,

    Please make sure you have recompiled your Flex application after changing proxy-config.xml file. Safe side, run clean command on your Flex project.

    Hope this helps.

  290. Raja Says:

    I have been battling with this problem for the last few days so could really do with some help :)
    I have a Flex3 app using Blazeds to recieve messages being pushed from a Web App on a Tomcat server – the app on the server is working fine and can see things working as I expect. I consistently get the error message “The Destination ["alarm-event-feed"]either does not exist or the destination has no channels defined” when I try to run the Flex3 app.
    I’ve attached the config files from the Tomcat server – can anyone help??

    Iam using flex http service with use proxy=true,destination = “destination”…

  291. Raja Says:

    http://bugs.adobe.com/jira/browse/BLZ-10

  292. Vijay Says:

    Hi Sujit,

    I have gone through ur “Building Flex application for BlazeDS Remoting destinations using Flash Builder 4″. i have created destinations but still i am not able to see any destinations list in BlazeDS wizard(in DCD). i am able to access the destination using RemoteObject Call. Can u plz help me out

    And While connecting BlazeDS it is asking me tomcat Username and password if i give wrong password also it is allowing me to enter inside is there any prob in tomcat

    Thanks
    Vijay Kumar J

  293. Suman Says:

    Hi,
    Iam working on Flex Spring Integration.
    In flex iam using Http Service.
    Please let me know the configuration for Application-config.xml file in Spring to work on FLEX-Spring Integration.

  294. Suresh Says:

    Hi i am able to use php to access my locally created db and view the datas, but i have sql there in usa and now wanted to view the datas i.e bind the datas and see it.

    I am able to connect in xl using connect database and give the database name which looks like this
    usaicf.usa.website.com\sql2005
    have username and password and know the table name

    if i use the usaicf.usa.website.com\sql2005 in xl i am getting the query datas but if i do the same in flexbuilder4 it throws a error which says it could not connect no such host is known.. but the same is connected through xcel please help me…

    its through vpn network..

  295. David Saad Says:

    We are looking at utsourcing the development of some RIA components. Can you recommend some of the top players in RIA and Flex development in India?

    Thank you

    David

  296. Kaushal Says:

    Hi,
    I am using the MessageBroker code to send a message from Java to the client. It works perfectly fine when the application and blazeds server run from the same tomcat instance but if i change the blazeds server the message sent from java is not received by the client. Any help would be fine.

    Thanks

  297. Sujit Reddy G Says:

    Hi Vijay,

    Can you please send me the remoting-config.xml file, screen shot of the of the destinations displaying window in FB4 and the FB4 error log. Regarding destination being accessible even if you enter wrong user name password, are you using custom or basic authentication? Also please make sure your authentication logic is fine.

    Hope this helps.

  298. Sujit Reddy G Says:

    Hi Suman,

    Please check out article at this URL http://static.springsource.org/spring-flex/docs/1.0.x/reference/html/ch02.html

    Hope this helps.

  299. Sujit Reddy G Says:

    Hi Suresh,

    Please check article at this URL http://sujitreddyg.wordpress.com/2009/06/01/building-a-database-based-app-using-flex-and-php-with-flash-builder-4/

    Hope this helps.

  300. Sujit Reddy G Says:

    Hi David,

    Please see if this link helps. If you cannot find any kindly let me know.

  301. Sujit Reddy G Says:

    Hi Kaushal,

    As long as your Java class sending the message and the BlazeDS are on the same tomcat instance this should be working. Can you please check if normal messaging using Flex application as the message producer is working fine.

  302. Idan Says:

    Hi,

    Is it possible to have flex web application on server located in one place and have proxy servers located in different location(countries) so when user enter my url server he will get the data (if exists) from the local server and if not exists the local server will be update from the main server.
    In any case the main server is update with changes the client should be updated.

    If that possible how can I do that ?

    Thanks

  303. Vijay Says:

    Hi Sujit
    I have some questions can u plz answers them ThankQ in advance

    1) When we are using RemoteObject then request will be sent in Binary format and while using HttpService or WebService request will be in xml format is it correct?.

    2) Is there any encryption and decryption method of request and response ?

    3) what is difference b/w Polling and Streaming in BlazeDS? is there any other type available?

    4) what concept comes under FDMS and Messaging Service.

    DataPush like producer, consumer and DataService comes under FDMS then what is Messaging Service?

    5) RPC Service is nothing but HttpService , WebService and RemoteObject is it true?

    I know how to use them but i what to know what happens internally.

    Plz help me out, i am getting conflict about this Questions.

  304. Vijay Says:

    Hi Sujit

    I have some question can u plz answers them

    1) Is there any Encryption and Decryption technology will sending request/response from Server.

    2) RPC calls means RemoteObject, HttpService and WebService is it true?

    3) Genearlly they are FDMS and Messaging Service.

    FDMS is used for Serialization b/w Server and Client and b/w clients like Producer, consmer and DataService is i am write? then what are Messaging Service?

    4) if we are Using RemoteObject then request is send in format of AMF(Binary) and while using HTTPService or WebService request is send in xml format is i am Write?.

    Accourding BlazeDS AMF Channel send request in AMF (Binary) and HTTP Channel in XML is i am Write?.

    Plz Help me out in this conflict

    Thanks
    Vijay Kumar J

  305. Kaushal Says:

    Hi Sujit,
    Flex application being the producer works perfectly fine with blazeds on a different server. Flex to Flex communication also works perfectly fine but java sending out the message, java does send out the message but we are unable to find where it is going or which client is receiving….

  306. Vikash Sharma Says:

    Hi Sujit,

    I am working on Flex with Coldfusion. I am trying to get knowledge on LCDS/Blazeds. I have few doubts in my mind. It would be nice if u can help me please.

    1. I have used Flex Remoteobject to call Coldfusion CFC to Read/Update/Delete process on MS SQL Server DB for our application. I was not using LCDS. But now i am using LCDS and its charts says that LCDS has RemoteObject. What is the difference between the first RemoteObject and LCDS RemoteObject ?

    2. Is Messaging Service in LCDS and BlazeDs is Same ? Is BlazeDs is a subSet of LCDS ?

    3. I am trying a simple chat application with Producer/Consumer approach. But it is throwing error.

    “Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 405: url: ‘http://localhost/messagebroker/amfpolling”

    Content of messaging-config.xml



    0

    1000
    false

    Please help!!!!

    Vikash
    Thanks,
    Vikash

  307. Ryan Lanman Says:

    Hi Sujit,

    I am interested in using your BlazeMonster tool for its Java to AS capability. However, I can’t seem to find any license information about it. Can you please publish a page with license information about your projects? I love what you have done and the tool works great, but unfortunately I cannot proceed without knowing what type of license the project is under. Thanks!

    -Ryan

  308. Nikhil George Says:

    Hello Sujit, I attended the first day of your Flex boot camp at MA College of Engg,Kothamangalam,Kerala. I liked the FlashAhead web site vert much. But one thing I would like to know is about Search Engine Optimization (SEO) of Flex sites. Coz when I view the site source, it shows just an swf embedded and I think it don’t help from the SEO perspective. So can we do SEO with flex??

  309. Nikhil George Says:

    Also see this http://gog.is/flashahead+adobe

  310. Miguel Pinto Says:

    Hi,

    I’m playing around with the zend framework (zf) and flash builder 4 (fb4), and I’m a bit lost, i read about the new features in the fb4 for connecting with data, so i configure a new zf project, with a virtual host (www.zf-fb4.test).
    I followed the structure recommended on the zf site having the library 1 level behind the public_html folder, create some controlers, default, admin, and service, the default launch the flex app, the admin is serving HTML and javascript, and the services is my messageBroker, where i start the Zend_Amf_Server.

    The problems came when i try setup the data services in fb4. i cant get to the services controller.

    In the URL i specify http://www.zf-fb4.test/services/amf
    where services is the name of the controller and amf is the Action where i start the Zend_amf_server, and use the addDirectory() function to specify the “services” folder under /application/services.
    but i cant get it to load the services in fb4.

    In the file field on fb4 data services wizard i select the index.php on public_html sence it reroutes the requests to the services controler, and amf action.

    But it doesn’t work, my objective is to use the all zf as a server platform, and flash(flex) on the client side for the front-end, and zf and xhtml+ajax on the backend.

    how can i do this? Can you give me some lights?

    Thanks

  311. cham Says:

    Hi sujit,

    Thank you very much for your reply for my earlier post.I’m using flex 3, java, blazeds and spring framework for web application development.

    I’m handling session expire event in java side and flex side in following way.

    I’m setting a sessionId session attribute in flex session once user login to the system. It is done in a java class following way.

    FlexSession session= FlexContext.getFlexSession();
    session.setAttribute(“sessionId”, session.getId());

    Then in each remote call I’m checking the session id as in following code.
    if((session.getAttribute(“sessionId”)==null) || session.getAttribute(“sessionId”)!=session.getId()){
    throw new Exception(“no session”);
    }

    If session attribute is null or stored session id is not equal to current session, exception is thrown.

    I’m catching this exception at flex client side within the fault result handler of remote object call and displaying the login page.

    public function userListFaultHandler(event:FaultEvent):void{
    if(event.fault.faultString==”no session”){
    //shows the login page
    Application.application.showLoginView();
    }
    }

    Can you see any issues or cons in this approach?

    Thanks

  312. ilikeflex Says:

    Hi

    I am using the blazeds server. I have created the destination and i am able to recieve the messages.

    The issue i am facing is that i have my java program which keep sending the messages to the blazeds server. At this point i have no client(browser) to consume the messages.So all the messages are accumulated at blazeds. At one point there are so many messages that my weblogic server goes out of memmory. So my question is how to destroy those messages which are not consume. I am using the tag but this does not seem to work. Please see the configuration below.

    Snippet of Java program:
    AsyncMessage msg = new AsyncMessage();
    msg.setDestination(destinationNameFlex);
    try
    {
    msg.setMessageId(objectMessage.getJMSMessageID());
    }
    catch(JMSException e)
    {
    }
    msg.setBody(data);

    MessageBroker.getMessageBroker(null).routeMessageToService(msg, null);

    Messaging-config.xml

    <!– –>

    15

    Services-config.xml

    false

    true

    false

    true
    1

    [BlazeDS]
    false
    false
    false
    false

    Endpoint.*
    Service.*
    Configuration

    false

    Any pointers are highly appreciated.

    thanks
    ilikeflex

  313. ilikeflex Says:

    Doing repost…

    I am using the blazeds server. I have created the destination and i am able to recieve the messages.

    The issue i am facing is that i have my java program which keep sending the messages to the blazeds server. At this point i have no client(browser) to consume the messages.So all the messages are accumulated at blazeds. At one point there are so many messages that my weblogic server goes out of memmory. So my question is how to destroy those messages which are not consume. I am using the message-time-to-live in the desination properties tag but this does not seem to work. Please see the configuration below.

    Snippet of Java program:
    AsyncMessage msg = new AsyncMessage();
    msg.setDestination(destinationNameFlex);
    try
    {
    msg.setMessageId(objectMessage.getJMSMessageID());
    }
    catch(JMSException e)
    {
    }
    msg.setBody(data);

    MessageBroker.getMessageBroker(null).routeMessageToService(msg, null);

    and i am amf poling to get the messages.

    Thanks
    ilikeflex

  314. John Says:

    Thank you so much for your excellent work and support. I recently decided to take out WebORB and replace it with BlazeDS and BlazeMonster-generated code. I’m under the gun for a demo to sell Flex to my management.

    I noticed that with BlazeDS/Monster-generated code, all collections are ArrayCollections, rather than Arrays by default with WebORB. I have a complex (deeply nested and circular) object model and I need to fetch large record sets to the client. When I switched to the Blaze solution, I noticed a considerable slow down in performance.

    My questions is, can I make Blaze send only Arrays (and make the corresponding changes in the generated VO’s), and then just convert to ArrayCollections on the client when/if needed. I suspect this will recover the performance hit I took by switching. I can easily fix up the generated VO code, but how do I force BlazeDS to send only generic arrays? Is there a setting somewhere?

    Thanks again for your generous support to the Flex community.

    John K.

  315. LReddy Says:

    hi Sujit,

    I have to traverse an xml tree and build an object(for instance Map) that shows the parent and the children as a collection( parent id – collection). My xml is similar to this.

    I should have properties of the node as object properties. What is the best way to do this?

    Thanks.

  316. Sayali Says:

    Hi Sujit,

    I want to pass custom properties like host and port to a java class specified in remoting-config.xml.
    I tried something like this,

    com.selectica.javaapi.CxJavaAPI
    localhost
    7000

    but i am getting an error like

    **** MessageBrokerServlet failed to initialize due to runtime exception: Exception: flex.messaging.config.ConfigurationException: Unrecognized tag found in . Please consult the documentation to determine if the tag is invalid or belongs inside of a different tag:
    ‘/remote-host’ in destination with id: ‘CxJavaAPI’ from file: remoting-config.xml
    ‘/remote-port’ in destination with id: ‘CxJavaAPI’ from file: remoting-config.xml

    Now in this case actually my class CxJavaAPI has a constructor which needs the host and port .Is it possible to achieve this? If yes please let me know.

    Thanks in advance,
    Sayali

  317. Shreyas Says:

    Hi Sujit,

    I wanted to how we can get the method name of a RemoteObject that has invoked a particular handler?

    At present I have a RemoteObject with various methods all using the same handler on result, I just wish to ’switch’ the actions based on which method invokes the handler.

  318. Raj Says:

    Hi Sujith Reddy,

    Could you plz post one article on flex profiling.

  319. Latha CV Says:

    Hi Sujit,
    I am having a flex application with BlazeDS and Remote Objects are used to perform the business logic. The remote object also creates a RMI client object and communicates with the RMI server which inturn performs some DB operations.

    After approximately 30 seconds the AMF channel disconnects with a Fault while the backend is still working. The AMF is simple AMF.
    I have tried setting the requestTimeout=0 and also -1 on the remote objects, but the result is same.
    Any help is much appreciated.
    Thanks in advance.
    Regards,
    Latha

    Channel definition
    ———————–
    -
    -

    -
    false
    false

    -

    -
    false

    -

    -
    true
    4

    ———————————————-
    remoting-config.xml
    -
    -
    com.amat.raadmin.ui.service.ToolAccessManagement
    application

    ——————————————-

    Here is the log extract
    ———————————————
    ToolAccessMngr.invokeToolMethod: Inside invokeToolMethod
    ‘8AFA707B-08A2-CA64-E772-4C5D7AE7D89A’ producer sending message ‘6F042089-0286-EE50-0244-4C5D8E70178F’
    ‘8AFA707B-08A2-CA64-E772-4C5D7AE7D89A’ producer connected.
    ‘8AFA707B-08A2-CA64-E772-4C5D7AE7D89A’ producer acknowledge of ‘6F042089-0286-EE50-0244-4C5D8E70178F’.
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    warning: unable to bind to property ‘toolGroup’ on class ‘Object’ (class is not an IEventDispatcher)
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer set destination to ‘ToolAccessMngr’.
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer sending message ‘AEA0904A-8C56-D9BE-0A82-4C5E0F41C94E’
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer connected.
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer sending message ‘F03B8162-A1B3-2376-4763-4C5E0F4EB11A’
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer acknowledge of ‘AEA0904A-8C56-D9BE-0A82-4C5E0F41C94E’.
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer acknowledge of ‘F03B8162-A1B3-2376-4763-4C5E0F4EB11A’.
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer sending message ‘E48F33FF-38C7-8A6F-C67B-4C5E97FEFE56′
    ‘CF0DE17F-AB7F-E863-4537-4C5C61C36744′ producer channel faulted with Channel.Call.Failed NetConnection.Call.Failed: HTTP: Failed
    ‘8AFA707B-08A2-CA64-E772-4C5D7AE7D89A’ producer channel faulted with Channel.Call.Failed NetConnection.Call.Failed: HTTP: Failed
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer channel faulted with Channel.Call.Failed NetConnection.Call.Failed: HTTP: Failed
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer fault for ‘E48F33FF-38C7-8A6F-C67B-4C5E97FEFE56′.
    [ChannelFaultEvent faultCode="Channel.Call.Failed" faultString="error" faultDetail="NetConnection.Call.Failed: HTTP: Failed" channelId="my-amf" type="channelFault" bubbles=false cancelable=false eventPhase=2]
    [ChannelFaultEvent faultCode="Channel.Call.Failed" faultString="error" faultDetail="NetConnection.Call.Failed: HTTP: Failed" channelId="my-amf" type="channelFault" bubbles=false cancelable=false eventPhase=2]
    NetConnection.Call.Failed: HTTP: Failed
    NetConnection.Call.Failed: HTTP: Failed
    ToolAccessMngr.invokeToolMethod: Inside invokeToolMethod
    ToolAccessMngr.invokeToolMethod: Inside invokeToolMethod
    ‘8AFA707B-08A2-CA64-E772-4C5D7AE7D89A’ producer sending message ‘8C4F889F-A2C9-0DC8-C43B-4C5F15892BD8′
    ‘8AFA707B-08A2-CA64-E772-4C5D7AE7D89A’ producer sending message ‘8C4F889F-A2C9-0DC8-C43B-4C5F15892BD8′
    ‘my-amf’ channel sending message:
    (mx.messaging.messages::RemotingMessage)#0
    body = (Array)#1
    clientId = “9E706DC1-2D0E-B462-81B5-51DE23E8F796″
    destination = “ToolAccessMngr”
    headers = (Object)#2
    messageId = “8C4F889F-A2C9-0DC8-C43B-4C5F15892BD8″
    operation = “returnToolDetails”
    source = (null)
    timestamp = 0
    timeToLive = 0
    ‘my-amf’ channel polling stopped.
    ‘my-amf’ channel polling stopped.
    ‘my-amf’ channel disconnected.
    ‘my-amf’ channel disconnected.
    ‘my-amf’ channel has exhausted failover options and has reset to its primary endpoint.
    ‘my-amf’ channel has exhausted failover options and has reset to its primary endpoint.
    ‘my-amf’ channel endpoint set to http://localhost:8080/RAAdmin/messagebroker/amf
    ‘my-amf’ channel endpoint set to http://localhost:8080/RAAdmin/messagebroker/amf
    ‘CF0DE17F-AB7F-E863-4537-4C5C61C36744′ producer channel disconnected.
    ‘CF0DE17F-AB7F-E863-4537-4C5C61C36744′ producer channel disconnected.
    ‘8AFA707B-08A2-CA64-E772-4C5D7AE7D89A’ producer channel disconnected.
    ‘8AFA707B-08A2-CA64-E772-4C5D7AE7D89A’ producer channel disconnected.
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer channel disconnected.
    ‘DA76AE26-93A4-F6EA-57C7-4C5E0D1EB1FF’ producer channel disconnected.
    ‘8AFA707B-08A2-CA64-E772-4C5D7AE7D89A’ producer fault for ‘8C4F889F-A2C9-0DC8-C43B-4C5F15892BD8′.
    ‘8AFA707B-08A2-CA64-E772-4C5D7AE7D89A’ producer fault for ‘8C4F889F-A2C9-0DC8-C43B-4C5F15892BD8′.

  320. Latha CV Says:

    Hi Sujit,
    In my previous post, the xml tags are missing. Please find them here.
    Thank you.
    Channel definition:
    ————————–
    -
    -

    -
    false
    false

    -

    -
    false

    -

    -
    true
    4

    ———————————————-

    remoting-config.xml
    —————————————-
    -
    -
    com.amat.raadmin.ui.service.ToolAccessManagement
    application

    ——————————————-

  321. Latha CV Says:

    Hi Sujit,
    The problem of channel disconnect got resolved. It was mistake from our side. We were not using the AIR SDK for Linux, but were using the one for Windows.
    Sorry for any inconveniences.

    Thanks,
    Latha

  322. RDB Says:

    Morning Sujit,

    I have a problem with the new FB4. I would like to use the generated php wizard but cannot filter the datagrid using filter functions?

    Basically I was working on an date range filter that can filter the data in the datagrid connected to the mysql DB. I can only get it to work if I hard code the whole project and use arraycollections in the main application.

    Please could you create an example that uses dates and applies a range filter in flash builder 4…it would be a massive help?

    Thank you

    RDB.

  323. Jones Says:

    Hi Sujit, I have a question related to Flex 3 and ColdFusion that it might be simple to answer but I have been struggling with it for a while.
    I need to create a Flex application to use with ColdFusion and although this is a simple procedure when we are creating the project in a computer where you have ColdFusion installed locally (as all books shows examples of it), but what if the ColdFusion server is installed in another machine in the network?

    My current situation is the following:
    - I have Flex Builder 3 install in my PC at work and its workspace is in a folder in the network outside of my PC.
    - We have a server (ISWEB1) partition in two drives; C, where the ColdFusion 8 is installed and D where all the files the developers work with reside. The ColdFusion installation runs in a server where IIS is used as the web server.
    - I have the drive D on the server ISWEB1 mapped to one of my letter drives and can access it easily
    - The drive C on the Server can only be accessed remotely (or through the web to access the ColdFusion admin page) and is not exposed to the network as drive D is.

    My problem is, I need to create a Flex 3 application that uses ColdFusion using remote object access service (CF Flash Remoting) but I wanted to point to the installation version on the server ISWEB1 and not to the one installed locally. The Configure ColdFusion Server screen in the Flex Builder asked me for the location of ColdFusion root folder, Web root, and root URL. There is no way I can point to the server (ISWEB1)where ColdFusion is installed as those fields seem to required a address that points to a local install or a mapping on that local server.

    So how can I go about to create a project in Flex that uses ColdFusion that is not installed locally? The work around that could be used is to use the ColdFusion developers edition I have installed locally and use during the creation of the project in Flex Builder, but then I would have to have all the same data sources, mappings, and CFCs in my the local server in order to test, which seems double work. To aggravate that when you try to test the application Flex writes the files to the local server and unless you have everything available locally it would not work properly. I am trying to avoid duplicating the work.

  324. Todd Says:

    Hi Sujit,

    I am seeking some input about session authorization. I am assigned with the task of authenticating against a mysql data table. A userName,userPassword challenge. The development tools are Flex 4, LCDS 3 B2. Is the fiber model able to handle these request, and if so can you recommend a place to start researching or would the Spring framework be better suited for this type of task?

    Thank you

  325. Rajan Says:

    Hi

    I am using Blazeds-3.2.0.3978 amd Weblogic 10.0.0.1. I have the session timeout
    for 5 minutes.

    Below is channel definition i am using

    true
    1

    I have declared destination as

    120000

    Generally 10-15 users uses the system simultaneously. The server side code sends
    approx 3000 messages in one second on the destination. Everthing works fine but
    some time the client misses few messages. It happens sometimes. It is difficult
    to reproduce also. But any client cannot afford to loose message. I can send you
    the conference files for your reference.Any blaze expert can provide any
    pointer???

    Thanks
    ilikeflex

  326. Rajan Says:

    Doing Repost

    Hi

    I am using Blazeds-3.2.0.3978 amd Weblogic 10.0.0.1. I have the session timeout
    for 5 minutes.

    Below is channel definition i am using
    channel-definition id=”my-polling-amf”
    class=”mx.messaging.channels.AMFChannel”

    endpoint
    url=”http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling”
    class=”flex.messaging.endpoints.AMFEndpoint”/

    properties
    polling-enabledtrue/polling-enabled
    polling-interval-seconds1/polling-interval-seconds
    /properties

    /channel-definition

    I have declared destination as

    destination id=”destICL”
    adapter ref=”actionscript” /
    properties
    server
    message-time-to-live120000/message-time-to-live
    /server
    /properties
    /destination

    Generally 10-15 users uses the system simultaneously. The server side code sends
    approx 3000 messages in one second on the destination. Everthing works fine but
    some time the client misses few messages. It happens sometimes. It is difficult
    to reproduce also. But any client cannot afford to loose message. I can send you
    the conference files for your reference.Any blaze expert can provide any
    pointer???

    Thanks
    ilikeflex

  327. Rajan Says:

    I am sorry it is 3000 messages per minute and not second.

    Thanks
    ilikeflex

  328. Ricardo Says:

    Hello.

    building-a-database-based-app-using-flex-and-php-with-flash-builder-4.
    How does that relate to two tables?

  329. suresh kumar reddy Says:

    are you ace in Flex3 with Air?

  330. Chaitu Says:

    Hi sujith,

    I want to develop a sample application using java and flex, which contains jus two screens first contains the link for the second and the second one contains the results fetched from a data base. can you please assist me, as im new to flex…..

  331. Latha CV Says:

    Hi Sujit,
    I am having a AIR application on linux system. I am facing a channel fault after >~30secs when installed as a package using adt. While it works fine when we use ‘adl’ to run the application. I am using linux air sdk for both adl and adt, but the mxml is compiled on windows platform. Can you please provide any pointers on what could be causing the problem.
    Thanks in advance,
    Latha

  332. Abhishek Gupta Says:

    I have developed the dashboard in my application using flex 3.0. For this I have used JSP wrapper around the flex application. My application runs on JBoss application server. for communication between flex app and my application I am using LCDS. HTTPService component is being used to receive data from the server. Channel definitions are given in service-config.xml for amf and http channels and for both secure secure and not secure mode. In my proxy-config.xml I have defined Channels and destinations.

    In my development environment both secure and non secure mode were working fine. Now when I have deployed it behind the hardware load balancer(which accepts secure requests only and if the request is not secure it redirects it to secure url) there is no response from the message broker servlet. One thing more I have observed is when the environment is non load balanced there are request like ‘http://{server.name}:{server.port}/{context.root}/messagebroker/http’. and these requests are post request. But in load balanced environment with ssl the request is again like ‘http://{server.name}:{server.port}/{context.root}/messagebroker/http’ which is a post request and it is redirected to ‘https://{server.name}:{server.port}/{context.root}/messagebroker/http’ which is a get request. The content returned by this get request is null.

    services-config.xml


    false

    false

    false


    proxy-config.xml



    /kr/servlet/DashboardServlet

    /kr/krportal/dashboardJSPService.jsf

    Looking for some comments

    Thanks

    Abhishek Gupta

  333. Khalid Says:

    Hello;
    I am new to Adobe Flex; I am playing around Adobe flex dashboard http://www.adobe.com/devnet/flex/samples/dashboard/dashboard.html . I have managed to customize some of the panels (PODs), I am trying to have one of the panels to show pdf document, I used IFrame method I managed to have the SWF file configured and can show the Loading Icon shown, but I could not managed to pass the PDF document to the panel through podContentBase.as:
    /*
    * Base class for pod content.
    */

    package com.esria.samples.dashboard.view
    {
    import flash.xml.XMLNode;
    import mx.containers.VBox;
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.http.HTTPService;
    import mx.utils.ObjectProxy;
    import mx.events.IndexChangedEvent;
    import flash.external.ExternalInterface;
    import flash.geom.Point;
    import flash.net.navigateToURL;

    public class PodContentBase extends VBox
    {
    [Bindable]
    public var properties:XML; // Properties are from pods.xml.

    function PodContentBase()
    {
    super();
    percentWidth = 100;
    percentHeight = 100;
    addEventListener(FlexEvent.CREATION_COMPLETE, onCreationComplete);

    }

    private function onCreationComplete(e:FlexEvent):void
    {
    // Load the data source.
    var httpService:HTTPService = new HTTPService();

    httpService.url = properties.@dataSource;
    if (httpService.url != “”) {
    httpService.resultFormat = “e4x”;
    httpService.addEventListener(ResultEvent.RESULT, onResultHttpService);
    httpService.send();
    }
    else {

    httpService.addEventListener(ResultEvent.RESULT, onResultHttpService);
    httpService.send();

    }
    }

    private function onFaultHttpService(e:FaultEvent):void
    {
    Alert.show(“Unable to load datasource, ” + properties.@dataSource + “.”);
    }

    // abstract.
    protected function onResultHttpService(e:ResultEvent):void {}

    // Converts XML attributes in an XMLList to an Array.
    protected function xmlListToObjectArray(xmlList:XMLList):Array
    {
    var a:Array = new Array();
    for each(var xml:XML in xmlList)
    {
    var attributes:XMLList = xml.attributes();
    var o:Object = new Object();
    for each (var attribute:XML in attributes)
    {
    var nodeName:String = attribute.name().toString();
    var value:*;
    if (nodeName == “date”)
    {
    var date:Date = new Date();
    date.setTime(Number(attribute.toString()));
    value = date;
    }
    else
    {
    value = attribute.toString();
    }

    o[nodeName] = value;
    }

    a.push(new ObjectProxy(o));
    }

    return a;
    }

    // Dispatches an event when the ViewStack index changes, which triggers a state save.
    // ViewStacks are only in ChartContent and FormContent.
    protected function dispatchViewStackChange(newIndex:Number):void
    {
    dispatchEvent(new IndexChangedEvent(IndexChangedEvent.CHANGE, true, false, null, -1, newIndex));
    }
    }
    }
    I am using the Dashboard as a training session for me, can you please help me on this.

    Regards
    Khalid Almansour

  334. Khalid Says:

    Hello Sujit;
    I am new to Adobe Flex, can I use Flex to access MS Access tables, if yes can you please help me.

    Regards
    Khalid Almansour

  335. Thongchai Lim Says:

    Hi Sujit;
    Thanks for you Example, I want to connect Wsdl with SSL but I can’t use by step like your example please help me .

    https://rdws.rd.go.th/ServiceRD/CheckTINPINService.asmx?WSDL

    from
    http://www.rd.go.th/webservice/new/tin.html

    Thanks very much.

Leave a Reply