JAVA to Flex relation

Now, we usually use Remote Class Annotation when we convert
into the JAVA object from
Action Script 3 Class Object.
And we doubt when we convert that the declaration of the
[public] is always necessity or not,
about the scope of variable declaration in the class of JAVA
and the class of Action Script 3.
Please let us know, we should declare of the [public] or
not.

From ActionScript to Java, only public, non-static,
read-writable properties (that is, properties that have both a
public get and set accessor defined) and public, non-static, vars
are serialized.
From Java to ActionScript, only public, non-static,
non-transient, read-writable bean properties (that is, properties
that have both a public getter and setter methods defined) and
public, non-static, non-transient fields are serialized.
For custom serialization requirements, consider using
matching flash.utils.IExternalizable and java.io.Externalizable
implementations that are also registered with the appropriate
[RemoteClass(alias="...")] metadata.
There are a few other options on the server for customizing
serializaiton of strongly typed objects (via the
PropertyProxyRegistry), but this is a little out of scope for this
question.

Similar Messages

  • Issues in mapping objects from java to flex - using flex4

    Hi,
    I have a class in java which i want to send to flex4 using BlazeDS as middleware. There are a few issues that i am facing and they are:
    When sending the object across (java to flex), the properties with boolean data type having value as true gets converted to properties with value as  false. Even after setting the value to true it still comes as false on flex side. Can't understand why this is happening.
    When sending the list of object containing property with boolean data type, the object on flex side does not show those properties at all. As of there were no boolean properties in that object.
    Last but not the least, When sending List<ContractFilterVO> contractFilterVOs to flex using remote call, the result typecasted to ArrayCollection does not show the holding objects as ContractFilterVOs but as plain default Object though having all the properties send, except the boolean one mentioned in above points. Basically it is not able to typecast the objects in arraycoolection but the same objects gets typecasted when sent individually.
    In all the above points i am using Remote Service through BlazeDS for connectivity with Java. I have done a lot of this stuff in Flex 3 but doing it for the first time in flex 4, is there anything that Flex 4 needs specific. Below is the pasted code for reference purpose.
    Flex Object
    package com.vo
         [RemoteClass(alias="com.vo.ContractFilterVO")]
    public class ContractFilterVO{
         public function ContractFilterVO(){
         public var contractCode:String;
         public var contractDescription:String;
         public var isIndexation:Boolean;
         public var isAdditional:Boolean;
    * Rmote Part of code
    var remoteObject:RemoteObject = new RemoteObject();
    remoteObject.destination="testService";
    remoteObject.addEventListener(ResultEvent.Result,handleResult);
    public function handleResult(event:ResultEvent):void{
         var contarctFilterVOs:ArrayCollection = event.result as ArrayCollection; //Point 2&3 probelem, if list sent form java
         var contarctFilterVO:ContractFilterVO= event.result as ContractFilterVO; //Point 1 probelem, if only single Object of type ContractFilterVO sent form java
    Java Object
    package com.vo
    public class ContractFilterVO implements Serializable 
         public function ContractFilterVO(){
         private static final long serialVersionUID = 8067201720546217193L;
         private String contractCode;
         private String contractDescription;
         private Boolean isIndexation;
         private Boolean isAdditional;
    I don't understand what is wron in my code on either side, it looks syntactically right. It would be great anyone could help me point out my mistake here. Waiting for right solutions...
    Thanks and Regards,
    Jigar

    Hi Jeffery,
    Thanks for your reply, it did solve my query @ point 3 as well as point 2 where the objects in arraycollection were not geting converted and boolean properties did not appear when list of an objects were received. And hey, i did have public functions for properties defined java class, just forgot to mention here in post, sorry for that.
    The solution you gave was right, but than what if i have a VO which has multiple List of objects coming from Java, than i would have to create an instance of each type of object on flex side this is too tedious, is'nt it? Is there any better solution... out there.
    And jeffery do you some tricks up your sleeve for this Boolean issues to that i am facing in point 1... Still struggling with this one...
    Anyone out there would be more than welcome to point my mistake, if any and provide tips/tricks or solutions...
    Thanks again to Jeffery...
    Waiting for more solutions sooner...
    thanks and Regards,
    Jigar

  • How to move a money value from java to Flex

    According to
    http://livedocs.adobe.com/flex/2/docs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDo cs_Parts&file=00001103.html
    I can pass a Double, Float, Long, Short, BigDecimal or the primative equivalent types from java to Flex and they will be converted into a number.
    My testcase says that only BigDecimal actually shows up on the Flex side.
    Am I missing something or is there a problem in BlazeDs/Flex somewhere?
    Bill Tims
    P.S. If you would like my sample code, I'll be glad to post it.

    Pete
    After looking at it I see why you were confused. Here is the Java object, the receiving Flex object, and the debug info from the SystemOut.log out of JBos 4.2. All of this is using Java 1.6 and Flex 3.0. I'm using the December, 2008 BlazeDs jar files.
    The variable bCd is being serialized as BCd. If I change it to bcd, everything works fine. We also tested this with php->flex and that works fine, which suggests the problem is in Blaze.
    public class Test2 implements Serializable{
    private static final long serialVersionUID = 1805176418478176484L;
    private String abc = "abc";
    private String bCd = "bcd";
    public Test2() {
    public String getAbc() {
    return abc;
    public void setAbc(String abc) {
    this.abc = abc;
    public String getBCd() {
    return bCd;
    public void setBCd(String cd) {
    bCd = cd;
    ============================================================
    package jdbcTables.businessdelegate {
    import mx.rpc.soap.types.*;
    import org.slsot.mis.jdbc.*;
    [RemoteClass(alias="org.slsot.mis.value.inquiry.Test2")]
    [Bindable]
    public class Test2
    public var abc:String;
    public var bCd:String;
    } /* Test2*/
    =============================================================
    12:24:22,084 INFO [STDOUT]-btims [BlazeDS]03/03/2009 12:24:22.084 [Endpoint.General] Channel endpoint slsot-amf received request.
    12:24:22,084 INFO [STDOUT]-btims [BlazeDS]03/03/2009 12:24:22.084 [Endpoint.AMF] Deserializing AMF/HTTP request
    Version: 3
    (Message #0 targetURI=null, responseURI=/4)
    (Array #0)
    [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
    operation = "callFunction"
    source = null
    destination = "accessor"
    timestamp = 0
    headers = (Object #1)
    DSEndpoint = "slsot-amf"
    DSId = "nil"
    clientId = null
    timeToLive = 0
    messageId = "9530B236-243F-4965-4252-CD944C3430F1"
    body = (Array #2)
    [0] = "Test"
    [1] = "test2"
    [2] = (Array #3)
    12:24:22,084 DEBUG [Accessor]-btims Begin Test.test2()
    12:24:22,099 DEBUG [Security]-btims t2=org.slsot.mis.value.inquiry.Test2@1b89df3
    12:24:24,678 DEBUG [Accessor]-btims End Test.test2()
    12:24:24,678 INFO [STDOUT]-btims [BlazeDS]03/03/2009 12:24:24.678 [Service.Remoting] Adapter 'java-object' called 'org.slsot.mis.Accessor.callFunction(java.util.Arrays$ArrayList (Collection size:3)
    [0] = Test
    [1] = test2
    [2] = java.lang.Object[] (Array length:0)
    12:24:24,693 INFO [STDOUT]-btims [BlazeDS]03/03/2009 12:24:24.693 [Service.Remoting] Result: 'org.slsot.mis.value.inquiry.Test2
    abc = abc
    BCd = bcd
    12:24:24,693 INFO [STDOUT]-btims [BlazeDS]03/03/2009 12:24:24.693 [Endpoint.AMF] Serializing AMF/HTTP response
    Version: 3
    (Message #0 targetURI=/4/onResult, responseURI=)
    (Externalizable Object #0 'DSK')
    (Typed Object #1 'org.slsot.mis.value.inquiry.Test2')
    abc = "abc"
    BCd = "bcd"
    1.236104664693E12
    (Byte Array #2, Length 16)
    (Byte Array #3, Length 16)
    (Byte Array #4, Length 16)

  • Unable to Open the Flex related Applications in firefox 5 version

    In Our application one of the module is built in flex.Unable to Open the Flex related Applications in firefox 5 version

    Firefox 5 is not supported, please update to Firefox 24 IMMEDIATELY! [[Update Firefox to the latest version]]

  • Confuse..where are the java files(bean) related to JSP in Portal??

    Hi..
    Can anybody plz help me..
    I already deploy the new JPDK Jan 2003.
    It's works fine in the Portal.
    Just, i don't understand, where they put the java files(bean) related?
    For example..the Lottery (lotto.jsp)
    it called this bean..
    "<jsp:usebean id = "picker" class = "oracle.portal.sample.devguide.lottery.LottoPicker" scope = "page" />"
    but, when i searched in the Server, i cannot find this LottoPicker.java.....
    Pls help me, it is urgent..

    Hi,
    All the bean files are in samplev2.jar at %OC4J_HOME%/j2ee/home/applications/jpdk/jpdk/WEB-INF/lib. If you extract the zip you will see all the class files for samples in JPDK.
    btw, as per J2EE container specification, the default location for any java class file (i.e. '.class' files) is WEB-INF/lib (packaged as a jar) or inside WEB-INF/classes as individial class files (with their complete package structure)
    Regards,
    Abhinav

  • Announcement: Join us in a Flex-Related Focus Group

    Hi Everybody,
    Some of you may know me, but many probably not. I'm Jeffry
    Houser, producer of The Flex Show (
    http://www.theflexshow.com),
    a flex related podcast. I also run a DotComIt (
    http://www.dot-com-it.com ),
    an Adobe Solutions Partner specializing in Flex Development.
    DotComIt is working on a line of commercial Flex Components, and
    we'd like to get some feedback from the developer community. In
    order to do this, we will be conducting some focus groups over the
    course of the next few months and want to welcome all Flex
    developers to participate.
    What is a focus group? A focus group is a group of potential
    customers who are brought together to get their opinions,
    perceptions, and ideas that will help to shape the design,
    strategy, and direction of DotComIt's product development.
    Why Participate in a DotComIt Flex Component Focus Group?
    1. Get $50 for your participation (paid via PayPal or
    iTunes).
    2. An opportunity to provide your input, perspective, and
    opinion(s) about Flex and the use of components within Flex.
    3. Hear the opinions and perspectives of other developers
    like yourself, first hand.
    4. Make sure your needs and wants are heard and perhaps help
    shape DotComIt's component development road map.
    To be eligible, you'll just have to fill out a short survey
    at
    http://www.dot-com-it.com/survey.
    We want to talk to developer's with all levels of experience, so no
    matter how much, or how little, you know about Flex we want to hear
    from you. The survey will close on Friday April 4th, and we will
    contact selected participants the following week to discuss
    specific details.
    The focus groups are being conducted by a business
    development firm on DotComIt's behalf. So, for those that know me,
    you can participate w/o being fear of conflict of interests or
    upsetting me.
    Please feel free to pass this on to anyone who you think may
    be interested. Now back to your regularly schedule lists posts.
    Thank You!

    This sounds like bad table design. If you think of column B as a foreign key it looks like you have a many-to-many
    modelled with only two tables. The normal way of handling this in relational DBs is to have a third table as a "relator" table.
    So table 1 and table 2 would be related via a third table 3.
    Alternatively it shouldn't be duplicated and you have bad data.
    Anyway, if you provide the information requested by Roger we will be able to help more.

  • How can i use C/Javascript/php/Java in flex?

    can i embed these language into my flex project?
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    please help~

    saipanBETTY0509 wrote:
    Subject: How can i use C/Javascript/php/Java in flex?
    can i embed these language into my flex project?
    You can't.  Why do you want to do this?
    saipanBETTY0509 wrote:
    since i have to check harddisk space, free memory remain. Also, i need to check the pixel of photos before the photos becoming bitmapdata
    I think what this means is "I want to check to see how much hard disk space is available.  Also, I need to check the pixel dimensions of an image."
    Is that right?
    There is no way in the Flash Player (as far as I know) that you can determine the amount of free disk space.  However, in AIR you can use air.File.applicationStorageDirectory.spaceAvailable to determine the storage space available in the application storage directory.
    As far as determining the dimensions of an image, there are plenty of good resources out there on that.  Maybe this one will be helpful to you?
    http://www.yswfblog.com/blog/2008/12/22/flash-10-experiments-the-warholizer-loading-and-pr ocessing-local-images/
      -Josh

  • Server/Data Push Form Java to Flex.

    Hi All ,
       In my application ( Flex3 + Java Struts) i am using RPC (HttpService) calls only . Recently i read the article about
      DATA PUSH FROM JAVA TO FLEX WITHOUT PAGE REFRESHING USING SERVER PUSH.
    Can anybody tell me more about this , how to use this in my application.
    Thanks in Advance....

    Did not worked that much with those but I know there are some embedded example
    that comes along with the blazeDS download.
    The DB is embedded but you can have a rough idea. alsoe there are some
    turtorials and odcs for both of them, Google is your friend. Also google for
    James Ward's blog and Christophe Coenraets, they have posts about this.
    C

  • Send error from Java to Flex

    I need to throw errors from Java and to receive them in Flex.
    My idea is using xml with error id and message, and maybe the Flex
    component which should show the error.
    Is there any other way to do it? Another interaction between
    Java and Flex?
    Thanks in advance
    Tuli-O

    XML wrapping error info written to response when java code
    throws and having a common component on the flex to handle this
    situation -- maybe on the fault event.

  • Java/web/Flex

    Hello,
    Can some one send me some instructions on setting up a
    java/flex/web app in flex builder. I am looking for how to create a
    web project, webroot folder, src code folders for java/flex etc.
    Thanks
    Matt

    your request lacks sufficient detail to provide any
    instructions. what kind of java framework do you mean to use?
    Websphere, Tomcat, or JBoss? Are you running flex builder as a
    plugin or standalone? If you are doing any real work with Java and
    Flex at the same time, I recommend you use install the flexbuilder
    as the Eclipse plugin.

  • Best way for Java objects to relate to DB tables

    When creating a Java app which relies on a backend DB, it is convenient (and necessary) to create Java classes which relate to the data in those tables. However with a normalised set of tables, should the Java classes relate purely to the tables, or the "view" of the un-normalised data?
    e.g. (rough example of what I mean)
    CREATE TABLE teams
    team_id INTEGER NOT NULL PRIMARY KEY,
    team_name CHAR(50)
    CREATE TABLE users
    user_id INTEGER NOT NULL PRIMARY KEY,
    user_name CHAR(50),
    team_id INTEGER REFERENCES teams(team_id)
    Now, the Java class for a user could have either have a variable (e.g. teamName) declared as an int (to fully reflect the table design) or a String (to represent the "view" of the data). I know that views can be used etc. and in this example that would be very easy � I am just using these simplified tables as an example.
    I have tried both and both have pitfalls. For instance, when getting the data from the database, it is very easy to create the object from the DB if it reflects the �view� of the data. However when it comes to updating the data in the DB, you need to do a lot of other work to find out what needs updating in which tables, because the actual raw data (as will be inserted/updated with SQL commands) is not available in the Java object.
    I hope this makes sense.
    Thanks.

    My question is what is the best way to write the classes that represent the DB data. As I said this is not EJB (that would handle the DB side of things anyway), as this is overkill for this particular situation. It was more of a general question anyway - should the class contain the actual data (e.g. should the user Class contain a String for the team name (e.g. Purchasing) or a link to the underlying DB id for Purchasing.
    In reality, I would create a Team class, but the same applies - should the Java Class ever contain any relationship to the underlying DB. I think not, but it seems inefficient to have to continually query the DB to find out information we already have.
    Apologies if I am not explaining this very well.

  • Problem with java and flex web service

    Hi,
    I have a basic web service written in java using jax ws 2.1
    ri. I need to call it from Flex using the WebService class
    Annotations for the java web method :
    @WebMethod
    public void Login(
    @WebParam(name="server") String serverURL,
    @WebParam(name=AUTHENTICATE_HEADER,header=true,mode=WebParam.Mode.INOUTHolder<Authenticate Header>
    authHeader)
    When I try and call the service from Flex , it can't find the
    login method and attempts to call it fail. If I set the web service
    to RPC based using @SOAPBinding , the method is found but then
    there are issues with the authentication header.
    What do I need to do to get flex web services communicating
    succesfully with java ?
    Are there are any known compatibility issues ? Or guidelines
    for going about this ?
    Any help would be appreciated

    well Shay,
    i've used JDev's tools to developer and to deploy the web service: the war and ear files are automatically generates you to the end of the process.
    I have included all the files java and the compiled classes, but I do not have files jar.
    But don't works: if i create only one java class with all code inside then it works fine!!
    Daniele

  • Flex with webdynpro for java using Flex Island

    Hi Friends,
    I am on Netweaver/SAP Enterprise Portal 7.0 SPstack12, I am developing UI for BI reports using VC, I am interested in developing UI using flex and want to integrate those apps with EP, I came to know flux Island supports flux with webdynpro java,  basically I am a webdynpro for java developer, I want to develop flux applications with webdynpro for java in NWDS. And i want to know how to use Flex Island with webdynpro for java. So could u please post some useful links.
    Thank in advance
    Regards
    samba

    Hi
    If you want to try out using ADOBE Flash Islands with WDJ, you would need to download SAP CE 7.1 EhP1 trial version, if not done so already.
    The following link may help you in building the WDJ component with Flash Islands..
    The specified item was not found.
    If you donot want to develop the Flex project you can download the .swf file provided by the SAP mentors:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10989ef6-968c-2b10-50a9-eb34a5267163
    Thanks.
    Chitrali

  • Data connection between Java Webdynpro - Flex Flash Island

    Hi,
    I'm developing a Java Webdynpro with connection to a Flex Flash Island. I'm using Flex 3.2.
    I've already set up the connection from WDJ to Flex, by using Events and the FlashIsland.fireEvent method, this all works fine. Now I'm trying to update a value in WDJ, to be updated in Flex. This gives the following error:
    Error: Error #1023: Stack overflow occurred.
         at Function/http://adobe.com/AS3/2006/builtin::apply()
         at mx.binding::Watcher/wrapUpdate()
         at mx.binding::PropertyWatcher/eventHandler()
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at mx.core::UIComponent/dispatchEvent()
         at UWLApplication/set opentask_updated()
         at MethodInfo-4234()
         at Function/http://adobe.com/AS3/2006/builtin::call()
         at sap.core.wd.context::WDContextListener/execute()
         at sap.core.wd.context::WDContext/notifyListeners()
         at sap.core.wd.context::WDContext/_set()
         at sap.core.wd.context::WDContext/set()
         at sap.wd.island::WDIsland/storeProperty()
         at sap.wd.island::WDIsland/onUpdateProperty()
         at mx.binding.utils::ChangeWatcher/wrapHandler()
         at flash.events::EventDispatcher/dispatchEventFunction()
         at flash.events::EventDispatcher/dispatchEvent()
         at mx.core::UIComponent/dispatchEvent()
         at UWLApplication/set opentask_updated()
         at MethodInfo-4234()
    This is especially strange, cause before I had a refresh button in which I updated my entire item collection. Now, I have added this field and suddenly I get this error !
    Does anybody has any idea what this could mean? Any help would be much appreciated ...
    My field in Flex:
    \[Bindable\]
    public var opentask_updated:Number;
    <mx:Text id="opentask_updated_text" text="{opentask_updated.toString()}" />
    My adaptions in WDJ:
    public void getInbox( )  {
           wdContext.currentInboxElement().setOpentask_updated(0);
    public void wdDoInit()  {
           getInbox();

    Solved!
    It appeared to be a "long" parameter and I was trying to put it in a "Number" parameter in Flex (because there is no long in Flex)
    When I changed both to String, it worked!

  • Charts in WebDynpro Java (BusinessGraphics/Flex Islands)

    Hello Experts,
    In our project we are to display complex chart on a WebDynpro page. I did investigate the following solution but non of them could help me:
    BusinessGraphics element: The element works through a Chart Engine. Chart Engine could draw a chart I need, but unfortunately BusinessGraphics element doesn't allow to change XML request to Chart Engine and supports only a half of functionality(FE I couldn't choose Column&Lines chart type). So, we couldn't use BusinessGraphics element to display needed chart.
    AnalyticsChart element: The element use Flex Charting to display a chart and the element provides very small functionality as well and I cannot create needed chart.
    Of cause it's possible to create needed chart in Flex, but I didn't find any way to integrate Flex and Java. Search points me to Flash Island technology, but it seems the technology was released only for WebDynpro ABAP.
    Environment: NetWeaver Server 7.11 EHP1(from SDN); NetWeaver Development Studio 7.1 SP00 PAT0000 (Build id: 200807300233)
    So, let me ask questions:
    Is there any way to modify XML request from BusinessGraphics element to chart engine?
    How can I embed Flex/Flesh application to the WebDynpro page?
    Best Regards,
    Dmitry
    Edited by: Dmitry Eidzin on Oct 22, 2008 10:54 AM

    Hi Dmitry,
    1. As far as I know, there is no way...
    2. some hints regarding Flash Island:
    To integrate flash files into your Web Dynpro application, the Adobe Flash Island UI element can be used. Flash Island is based on Adobe Flex (http://www.adobe.com/flex).
    In Web Dynpro a FlashIsland is set as RootElement and spans an entire view.
    To specify the flash componentu2019s data source, properties and events and to bind them to the relevant Web Dynpro objects, you can insert one or more of the following View elements into the FlashIsland:
    DataSource (GACDataSource)
    Property (GACProperty) into the DataSource.
    Event (GACEvent).
    EventParameter (GACEventParameter) into the Event.
    Itu2019s also possible to insert a Property directly into the FlashIsland, if you want to bind to a context attribute directly under the ContextRoot. You can also refer to hierarchical data structures by inserting DataSources into a DataSource.
    To specify the screen area, where the FlashIsland is to be displayed, insert a ViewContainerUIElement into a view.
    Insert a view, e.g. called FlashView into this ViewContainerUIElement.
    Open the FlashView, select the RootElement in the Outline view and choose FlashIsland from the context menu entry Replace With.
    Select the RootElement and enter the name of your  component to the property swfFile, for example: myFlash.swf. This file has to be stored in the mime repository. The relevant path is: .
    To insert the needed additional elements to the RootElement, select it, open the context menu and choose DataSource.
    To insert a Property, select the DataSource and choose Insert Property from the context menu.
    Hope this helps
    kind regards
    Stefanie

Maybe you are looking for