Flex ArrayCollection to Java HashSet
Hi,
I got a problem that I cannot resolve by googleing. I need your expertise:
Here s the part of the story:
1 Bdc have many BdcDetails, so in Flex Bdc.as ==> public var bdcdetails:ArrayCollection; in Java Bdc.java ==> private Set<BdcDetails> bdcdetails = new HashSet<BdcDetails>();
It works perfectly in Flex which means Flex understand what is inside a Java HashSet. But when a Bdc is sent to Java. Java don't understand what is inside ArrayCollection, everything is ASObject. So ((BdcDetails)bdc.getBdcdetails().toArray()[0]) ==> give ClassCastException
Please help! Thanks
P/S: I am using Blaze DS 4.5.0.0-SNAPSHOT
Thanks, i ve found the work around.
I create a setter for Bdc.as
funtion set bdcDetails in which i loop through the arraycollection, cast
each item to BdcDetails then put back to the arraycollection.
That s it. I dont know it s good or not but it works
Similar Messages
-
Integrating flex with webdynpro java
hi,
iam new bie in webdynpro java.please tell is there possibility of integrating flex in webdynpro java,if so what are the prerequisites for it.Hi
This is possible through Adobe Flash Islands under Mimes folder in your Webdynpro project. You create flex objects in FlexBuilder and generate the .swf files. Then the swf files need to be placed under the Mimes folder of Webdynpro Project from which they can be accessed.
Follow the link below for details :
http://wiki.sdn.sap.com/wiki/display/WDJava/WebDynproJava(CE7.1EHP1)andAdobeFlexIntegration-ColumnChart
http://help.sap.com/saphelp_nw72/helpdata/en/48/825afcf53d3ff6e10000000a42189c/content.htm
Regards,
Sayan Ghosh -
Revision: 18053
Revision: 18053
Author: [email protected]
Date: 2010-10-07 03:27:37 -0700 (Thu, 07 Oct 2010)
Log Message:
BLZ-571: Use of wrong operator in string comparison in flex.messaging.VersionInfo.java
Updated the code to use the right operator.
Check-in Tests: PASS
QA: Yes
Ticket Links:
http://bugs.adobe.com/jira/browse/BLZ-571
Modified Paths:
blazeds/trunk/modules/core/src/flex/messaging/VersionInfo.java -
FLEX+CAIRNGORM+BLAZEDS+JAVA+DATABASE
A very simple example for FLEX+CAIRNGORM+BLAZEDS+JAVA+DATABASE.
http://vijaaay.limewebs.com/forum/viewthread.php?tid=26&extra=page%3D1
or
visit www . flexindia . tk >> Flex Examples
The attachment zip contains the source files[ FLEX and JAVA ] and Readme.txt which helps you to setup this example.
Regards,
VijayYeah i registered, but i couldn't find zip file. Could you please tell me where is that example
Thanks,
ApacheFlex. -
How to convert java map collection to flex arraycollection
Dear all:
as title, any sample code? thank for helping
java map [{"id":140,"state":"Alabama","obama":6,"mccain":5,"ec":3},
{"id":91,"state":"Alaska","obama":4,"mccain":5,"ec":3}I think the closes thing to an .exe in Java is developing you program as an application, and packing it into an "executable jar" file.
-
From Adobe Workspace+Flex : ArrayCollection to ArrayList
Hi all
I have created a flex application which sends an ArrayCollection to LCDS 3.1 installed on JBoss. This ArrayCollection is converted into ArrayList which successfuly is converted into Array by a server java program.
The Problem:
I incorporate the flex application into Adobe LC PBM ES 2.5. The first time, I execute the process, the flex application is executed successfuly and the ArrayCollection is converted into ArrayList which is also converted into Array. The second time, I execute the process, an error occurs at the server and the cause is that the java program can not figure the mirror java class on the server. But, if I refresh the Adobe Workspace, we go bakc to sequere one where the flex application is executed successfuly the first time.
Any idea how to over come this issue?
Best regards
KhaledHi all
I have created a flex application which sends an ArrayCollection to LCDS 3.1 installed on JBoss. This ArrayCollection is converted into ArrayList which successfuly is converted into Array by a server java program.
The Problem:
I incorporate the flex application into Adobe LC PBM ES 2.5. The first time, I execute the process, the flex application is executed successfuly and the ArrayCollection is converted into ArrayList which is also converted into Array. The second time, I execute the process, an error occurs at the server and the cause is that the java program can not figure the mirror java class on the server. But, if I refresh the Adobe Workspace, we go bakc to sequere one where the flex application is executed successfuly the first time.
Any idea how to over come this issue?
Best regards
Khaled -
Flex RPC mapping Java nested classes to ActionScript classes
We are calling a Java method in our project using
RemoteObject the value returned by the java method is a ArrayList
containing instances of a class say ParentClass with some nested
classes.
The structure of ParentClass(Java) is something like this
class ParentClass {
//some primitives
private ChildClassA childAInstance;
private ChildClassB childBInstance;
//getters setters
We have created similar class structure on the ActionScript
side, the ActionScript classes(ParentClass,ChildClassA
,ChildClassB) have been properly annotated with the [RemoteClass]
metadata tag,
The problem is that though i'm getting the primitive data
members of the ParentClass through RPC in my corresponding AS
ParentClass class i'm getting an runtime exception trying to access
ChildClassA,ChildClassB members.
Am i missing something, exactly the same scenario is
mentioned in this article
http://www.adobe.com/devnet/flex/articles/complex_data.html
But the Object.registerClass method mentioned in the tutorial
is giving me compilation error, the sample code attached with the
article is corrupt zip too.
Please help me out on thisJAXB will create classes from an XML schema, SAX is a parser library and JAXP is a library of XML a bunch of XML tools.
I don't care for JAXB too much. I would skip it and go right to the JAX-RPC spec (WebServices). -
Have a problem using flex ui with Java application
Hi, I have a built a Flex UI for a java project. The UI has
some forms which use a servlet for POST and data populated from
servlet. I have used HTTP service to make the calls. I have built
my application i.e UI in Flex Builder and when I run my application
from flex builder everything works fine i.e data populated
correctly..
But when I open the projects folder and run the html file
generated the Http Service does not happen. Can anybody tell me why
is this so?? . Moreover I want use this UI for my already existing
java project. So what all files (i,e. html, mxml, swf) will be
required to be copied to my java project for the UI to work ..
.Thanks in advance...well, that's because Flex Builder is tell Flash player to
trust stuff in the bin folder:
http://viconflex.blogspot.com/2008/08/why-no-sandbox-violation-running-from.html
ATTA -
Flex 4.5 - java.lang.IllegalArgumentException: argument type mismatch
0 down vote favorite
I am having a problem when sending a soap request from a flex 4.5 application to a coldfusion 9 web service created using a CFC.
The most annoying thing it is only an intermittent problem but I can't work out what is wrong.
There a many methods within the web service of which Flex has no issue, but these are mainly ones that read data. The one I am having a problem with is one that is writing back to the web service.
The issue only arises when I have to restart the Coldfusion service for some reason, which is quite often as the development machine is my laptop. It has now also happened when I have moved the Flex app to a development server for testing and as it's hosted I can't restart the services easily.
I get the response below every time. I have tried tracing the call through the Flash Builder Network monitor and building a dummy call using the same data, all to no avail.
I have tried stripping out all of the code and then rebuilding it, which takes a long time as I am using custom types in ColdFusion.
Also , if I cfinvoke the method through a CFM page, it works fine. It is only when trying to call it through a SOAP request through Flex 4.5.
It will then suddenly start working again however and then it is fine until I restart the CF services again.
I can't tell what I triggers it to start working again.
Does something initialise it in ColdFusion and then it's fine ???. I am really struggling with this and any help would be appreciated.
I have a sample SOAP request that I trapped in the Network Monitor and also the WSDL if needed.
java.lang.IllegalArgumentException: argument type mismatch
<ns1:stackTrace xmlns:ns1="http://xml.apache.org/axis/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis.utils.BeanPropertyDescriptor.set(BeanPropertyDescriptor.java:142)
at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:75)
at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249)
at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at coldfusion.xml.rpc.CFCProvider.invoke(CFCProvider.java:54)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at coldfusion.xml.rpc.CFCServlet.doAxisPost(CFCServlet.java:270)
at coldfusion.filter.AxisFilter.invoke(AxisFilter.java:43)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:356)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
at coldfusion.xml.rpc.CFCServlet.invoke(CFCServlet.java:138)
at coldfusion.xml.rpc.CFCServlet.doPost(CFCServlet.java:289)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
at jrun.servlet.FilterChain.service(FilterChain.java:101)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)</ns1:stackTrace>
<ns2:hostname xmlns:ns2="http://xml.apache.org/axis/" xmlns:soapenv
="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org2001/XMLSchema-instance">Darren-LT</ns2:hostname>Someone suggested it could be a serialisation issue but I I'm not sure how to go about checking that.
Any suggestions ? -
Flex 3 and Java - Integrated Development on Eclipse
I am new to flex as well as to eclipse. I have downloaded
Adobe Flex Builder 3.0 and installed it. I want to use java at the
back-end, but I don't have Java perspective option in eclipse.
Therefore, I am currently using 2 IDE(s), one is
flex-builder, and other is Eclipse for Web tool platform
(eclipse-jee-europa-winter-win32.zip).
Is there anyway that I can benefit integrated development of
Flex and java using same IDE?I wouldn't try it really... it's not worth the issues you'd
probably run into and the work of getting it setup, if it's even
possible. I just run Eclipse and FB separate. If you have a gig of
ram you should be fine doing this I think.
If you *really* want to get rid of one, you can use the Flex
plugin for Eclipse, but I've heard people complain about it not
playing nice with Java. -
Populate Flex Tree from Java Code (Database)
Hi
Can someone please help me? I'm very new to using flex. I'm
basically trying to create a tree that is populated from data in my
database. I am using hibernate to fetch that data.
The plan is to basically create the tree in Java code (since
I don't want any processing done on the client PC) and then pass
this to the flex tree (or an actionscript data structure that is
compatible as the tree datasource)
I am creating the java tree using DocumentImpl. Is this
correct? What class would work?
Element e = null;
Node n = null;
Document xmldoc= new DocumentImpl();
Element root = xmldoc.createElement("USERS");quote:
Originally posted by:
ntsiii
Stop running and get a map (read the documents)
This is hardly a useful comment and must discourage new users
from asking questions. If you think the documentation relating to
the use of the tree control is straightforward then I beg to
differ.
If you are aware of a clear example of how to use the data
tree with a php backend returning a remote data object please
enlighten me. Meanwhile I continue my search but not within the
livedocs.
One site I have found that may be of use is
http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html
Not everyone is an expert. -
I am using a product called Crystal Xcelsius to design and
develop dashboards for banking customers. The product using Flex
controls with an Excel spreadsheet to show data. It then supports
data connections to refresh or update that data. After setting all
this up, it compiles it down to a Flash (SWF) file that can be
delivered to our client.
On the client's machine, the SWF file is loaded into a
database and then served up to the users as needed. Also loaded
into the database are the SQL queries which will be used to provide
the data needed to refresh the connections.
These SWF files and queries can be provided by us, but we
also let our clients use Xcelsius to create their own and then
upload them into our application. What I am looking for is a way to
validate the SWF file as part of the import process. Specifically,
since they are providing an SWF and a set of queries with
connection names and range names, I want to parse the SWF file and
make sure that the data connections in the SWF file match the
queries that they have provided with the SWF file. I want to make
sure that all connections in the SWF file have queries provided,
and that there are no queries that were provided which don't map to
connections in the SWF file.
I can take care of the mapping, the part I don't know about
is getting the list of connections specified in the SWF file. Since
the server that is importing these files is running Java, are there
any Java components or libraries I can use to look into a SWF file
and get the list of data connections in the file?
Any help, thoughts, or suggestions would be appreciated.
-BenjaminJames,
If you want client-side validation you must use vbscript or preferrable javascript.
To do client-side validation in your get or post method use java to validate the incoming paramters.
By the way if you move to a jsps/struts/jsf environment you'll get more help from the system in dealing with these kinds of problems. Developing sizable applications using only servlets will be very difficult. -
Import CSV/Excel data into Flex Datagrid using Java/JSP
Hi,
Is there any way we can import excel/csv data into flex datagrid component.
I see that is been done using php in this site. http://code.google.com/p/as3xls/
Any help would be appreciated.
Thanks in advanceYou can store the list of data from the Excel sheet that you have read already into an ArrayList
Then go through the JDBC tutorial, and learn how to insert a single record into the table.
After you understand how to insert a single record, you can iterate through the ArrayList of data and insert them into the table in the database.
If you know JDBC, see if you can use OR Mapping frameworks like Hibernate or iBatis, they make it very easy to manage database in Java. -
Hi,
I want to create a Flex Project which uses Java EE Server.
This is my requirement...I have a login Page, Register Page...when I Register the data should be sent to Database Table. when I login with existing username and password, It should validate from the Database and then a new page opens up which shows any info.
Can anybody tell me, how this can be achieved??
Thanks for the Help...You'll probably use the Flex RemoteObject to connect to your J2EE app.
http://livedocs.adobe.com/flex/3/html/help.html?content=transitions_2.html
http://www.summa-tech.com/blog/2009/03/05/flex-remote-object-services-blazeds/
http://learn.adobe.com/wiki/display/Flex/Creating+Flex+Builder+Projects+that+Use+Server+Te chnologies
http://livedocs.adobe.com/flex/3/html/help.html?content=projects_3.html
If this post answered your question or helped, please mark it as such. -
ArrayCollection to Java ArrayList to database
Hi Every bod
My MXML program sends an array collection to java method
successfully. But, how I can read in java each attribute of each
object of the java array list in order to store them?
Thanks
Best regards
Dr. KhaledEach object in the ArrayList will be converted into an
flex.messaging.io.amf.ASObject in Java. An ASObject is basically a
java.util.Map so you can use the get method.
In ActionScript: { firstname:"George", lastname:"Washington"
becomes in Java:
obj.get("firstname");
obj.get("lastname");
Maybe you are looking for
-
When I try to open a project in After Effects I get his error message. Media is stored on a 8TB Raid 10 NAS connected with a Gigabit router. The NAS is on my desk connected directly to my computer through the router. Computer Specs Adobe CC Windows
-
Two-page fullscreen view in Adobe Reader 11?
I really cannot achieve it – toggles to one-page view all the time. Yes, I have 'Fill screen with one page at a time.' unchecked (Edit -> Preferences -> Full Screen). Help please. Smok
-
Error in looking up the JMS Connection Factory
Hi, I am using weblogic6.1. I created a JMS Connection factory from administrator console with the name QueueConnectionFactory..But when i restart the server and try to look up that factory its giving an NameNo
-
Ucm backup-archive-restore strategy
hi fellow oracle-stellent users, i wanna ask what's the best practice strategy for backup and restore of an ucm server: content, metadata, and configs. i'm in the middle of reading the docs (10gR3), but still confused about many components that must
-
THIS IS MY SPEC "URGENT HELP NEEDED"
Posting date VBRK FKDAT SO Y Fields to be retrieved: VBRK - VBELN VBRK - FKDAT VBRK - VKORG VBRK - SPART VBRK - KUNAG VBRK - NETWR KNA1 - KUNNR KNA1 - NAME1 VBRP - FKIMG Get the