For Flex's learning personal feelings mainly in two aspects, one is the Flex rich tag library, can easily construct a rich user interface; on the other hand, it is to learn how Flex as a web app's performance layer and multi-layer applications Other grassroots are communicating.
Flex Call JavaBean in Server JVM is initially:
Background: Flex can use Data Service with three ways: First, the refict service, the third is http service, the web service only knows the approximate, no deployment, HTTP Service feels in a general three-layer application There are not many, just study Remote Object Service. Remote Object Service is white, which is the interaction of Flex and server-side General Java objects, which may be Pojo (Plain Old Java Object) or JavaBean et al. Any object that is not deployed as a Web Service.
Tag: Use Remote Java Object in Flex to identify the REMOTEOBJECT to be used to identify the REMOTEOBJECT to be divided into two types, named and unnamed, the difference between the two distinguishment is If there is NAMED (this is used to tell Flex to call the Java object which class is this property, this RemoteObject is named. And if there is no named property, you must be like Source attributes (Source = package.classname This class is in the classpath found under the classpath you can find if you are using What is Tomcat This classpath is the ../web-inf/classes directory). These two uses are not very clear in the use of essentials, they will not be studying first.
Call: The communication of Flex and Java Object is to call the Java object, which involves how the parameters are transmitted. There are two ways to transfer the function transfer parameters of the Java object in Flex: 1. Explicit parameter passes is to write the parameter list of the function like usually written Java code, see an example: XML Version = "1.0" Encoding = "UTF-8"?> mx: panel> mx: RemoteObject> mx: Application> dataSourceExample defined course of this class is: public class dataSourceExample {private String msg; public void setMsg (String msg) {this.msg = msg; show ();} public String getMsg () {return msg;} public Void show () {system.out.println (msg);}}
The last step: This is written, it is running, but there is still a point to configure the following, it is necessary to configure the flex-config.xml in the ../web-inf/flex configuration .......