netbeans + flex 第一个DEMO
首先建一个netbeans的java web项目
然后从网上吧blazeds.war 下载下来用rar 解压 把web-inf 替换掉在netbeans\web 下面的web-inf中的全部文件
然后 部署下
在打开flex builder 新建一个flex project 写上名字和项目路径
在Application server type 选中j2ee
点击 下一步
然后 Root folder选中netbeans 建的项目 下的web路径 例如E:\学习\WebDemo\web {我的项目交WebDemo}
Root Url 写上你的服务器url路径 例如:http://localhost:8080/WebDemo
Context root 还是/WebDemo
在output folder 这里注意一下 比如我的项目是E:\学习\WebDemo\ 这个路径下 那么写E:\学习\WebDemo\web 这样的话flex builfer就会把生成的文件都放在web下面了
然后下一步 ok 现在项目算是搭建完事了
现在修改配置文件netbeans 下面的web\web-inf\flex\remoting-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<service id="remoting-service"
class="flex.messaging.services.RemotingService">
<adapters>
<adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
</adapters>
<default-channels>
<channel ref="my-amf"/>
</default-channels>
<destination id="helloWorld">
<properties>
<source>com.demo.java.HelloWorld</source>
</properties>
</destination>
</service>
<destination id="helloWorld">
<properties>
<source>cn.demo.java.HelloWorld</source>
</properties>
</destination>
这些是我新加的 helloWrold 是自己新建的名字
com.demo.java.HelloWorld 是我新建的类
里面代码如下
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
p
相关文档:
我以前一直从事桌面开发,尤其数据处理的的系统较多。使用较多的是开发工具是VFP,它有自带的数据库,也可以使用大型的数据库系统,既可以开发系统也可以用命令行进行管理数据。但,它在不久的将来就MS不再抚养这个买来的儿子了,操作的系统的换代等等多种因素影响,不管它是否会消忘,但始终也会 ......
Flex中通过继承可以为新组件增加新的功能,如通过注入方法,改变背景色,改变位置和高度等。这里主要掌握原组件的一些特性,属性和方法,以便根据需要的功能加以覆写(也可以自己扩展),达到自己想要的效果。下面是一个简单的例子
1、新建MyDataGrid.as,继承DataGrid,覆写drawRowBackground方法,注入rowColorFunction方 ......
<?xml version="1.0"?>
<!-- Simple example to demonstrate the ColumnChart and BarChart controls. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp()"
backgroundColor="#FFFFFF" width="350" height="125"
layout="absolute">
<!- ......
MyEclipse Flex的配置之初我们看看缘由:一开始学习使用Flex的时候,我是用的单独的FlexBuilder3,做些纯Flex的应用程序还可以.但是如果要和Java结合在一起使用,即利用FLEX充当一个完整的J2EE系统的WEB层的话,那么单独使用FlexBuilder3和MYECLIPSE是很不方便的,大大影响了开发效率,因此做了下MyEclipse+Flex的配置,达到直接在 ......