Flexcoffee development tutorial (Remote instance Java class)

Source: Internet
Author: User

Flexcoffee is a fast framework of flex and Java, which allows seamless integration of flex and Java. There are few introductions, but here we will show you how to use it.

 

First download the related package from Google,

Http://code.google.com/p/flexcoffee/

 

Flexcoffee_3.0_1.1.rar

 

Create a project,

 

 

 

 

 

 

 

 

Now we need to encode the code after creating the project. We need to create a Java class first.

Package test; <br/> public class testflexcoffee {<br/> Public String testcoffee (string Arg) {<br/> return "test:" + Arg; <br/>}< br/> 

 

 

Then the class and the method of calling it are implemented in flex.

<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <mx: Application xmlns: MX = "http://www.adobe.com/2006/mxml" <br/> layout = "absolute" <br/> xmlns: code = "http://code.google.com/p/flexcoffee/"> <br/> <mx: SCRIPT> <br/> <! -- [CDATA [<br/> Import MX. controls. alert; <br/> private function returnmethod (value: Object): void <br/>{< br/> alert. show (string (value); <br/>}< br/> private function click (): void <br/>{< br/> testflexcoffee. run (); <br/>}< br/>] --> <br/> </MX: SCRIPT> <br/> <code: classload id = "testflexcoffee" <br/> classpath = "test. testflexcoffee "<br/> classmethod =" testcoffee "<br/> method =" {returnmethod} "<br/> value =" {['ken']} "<br/> Autorun = "off"/> <br/> <mx: button label = "test" <br/> click = "{Click ()}"/> <br/> </MX: Application> 

 

The result is as follows:

 

 

Note: The flexcoffeewar package is already integrated with all functions of blazeds.

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.