Flexcoffee development tutorial (write Java code directly in flex)

Source: Internet
Author: User

Let's go on to the previous tutorial to briefly explain how to compile JavaCodeTo achieve simple interaction with the background.

 

Let's take a look at the example:

 

<? 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/> Public VaR value: String = "beanshell"; <br/> private function showbeanshellresult (value: Object ): void <br/> {<br/> alert. show (string (value); <br/>}< br/>] --> <br/> </MX: SCRIPT> <br/> <code: beanshell id = "beanshell" <br/> Object = "{This}" <br/> Autorun = "off" <br/> method = "{showbeanshellresult}"> <br /> <code: code> <br/> string result = "Java println" + # value #; <br/> system. out. println (result); <br/> </code: code> <br/> </code: beanshell> <br/> <mx: button label = "testbeanshell" <br/> click = "{beanshell. run ()} "/> <br/> </MX: Application> <br/>

 

 

 

Java code is dynamically executed during the running process.

String result = "Java println" + # value #; <br/> system. Out. println (result ); 

 

Accelerated development to a certain extent, making flex and the background more closely integrated

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Related Article

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.