Expand my Community achievements bar.

How to debug Flash Remoting for Java Objects running on JBOSS

Avatar

Level 1
I am trying to get a HelloWorld type of app running and am
stuck after numerous tries.

My Goal is to be able to hookup a Flex Control to data
returned from a Java Object hosted in JBOSS.

I found that BlazeDS would enable me to do that.



My setup: Eclipse 3.3, BlazeDS, JBOSS app. I did not install
Flexbuilder as BlazeDS is purported to be open source.I have
installed Debug version of Flash Player.



After tinkering with the config files for a few hours and
trolling a lot of web sites, I was able to make the page hit my
remote Java Object. So I thought I was able to validate remoting.
But the last piece is still missing - getting the return values
back.



I have been unable to find any documentation which indicates
what kind of setup is needed to hookup values to mx:controls.

I tried a DataGrid and hooked it up to a API which returns a
list of VOs. DId not work.

I tried a HTMLText control and wired it to a property of a VO
. DId not work.



The code is being hit on the server side. but nothing is
showing up in the browser.


I need a way to debug this on the client to see what is
returned.




or if someone knows what is the expectation on the client
side for remoting, that will help too.

---------

I am enclosing my MXML file for reference below.

---------

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
backgroundColor="#FFFFFF">

<mx:Script>

<![CDATA[



import mx.controls.Alert;

]]>

</mx:Script>



<mx:RemoteObject id="srv" destination="product"
endpoint="/messagebroker/amf?id=AjaxBean"
fault="Alert.show(event.fault.message,'Error')">



</mx:RemoteObject>



<mx:DataGrid
dataProvider="{srv.getAccountsList.lastResult}" width="50%"
height="50%">

<mx:columns>

<mx:DataGridColumn dataField="AccountId"/>

<mx:DataGridColumn dataField="AcctNickname"/>

<mx:DataGridColumn dataField="AcctNumber"/>

<mx:DataGridColumn dataField="AcctType"/>

<mx:DataGridColumn dataField="LastSuccessfulDate"/>

<mx:DataGridColumn dataField="AcctBal"/>

</mx:columns>

</mx:DataGrid>



<mx:Panel title="RemoteObject Example" height="75%"
width="75%"

paddingTop="10" paddingBottom="10" paddingLeft="10"
paddingRight="10">



<mx:Text
htmlText="TextField:{srv.GetCurAccount.lastResult.AcctNickname}"/>

<mx:Button label="Get Cur Account"
click="srv.GetCurAccount.send()"/>



</mx:Panel>

<mx:Button label="Get Data"
click="srv.getAccountsList()"/>



</mx:Application>

0 Replies