TAILIEUCHUNG - Flex 3 with Java- P5

Tham khảo tài liệu 'flex 3 with java- p5', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 8 In the following example we will use some third-party open source libraries to encode and decode JSON objects in Flex and JSP. They are as follows json-simple http p json-simple A Java open source library for encoding and decoding JSON objects in Java as3corelib http p as3corelib An ActionScript open source library for encoding and decoding JSON objects in Flex ActionScript Before we start writing code we will have to copy the file into our project s libs folder. This ensures that all JSON-related API classes are available during coding and compilation. So make sure that you have downloaded AS3CoreLib from the URL specified above. The .swc files are library files used in Flex or ActionScript programming. Think of them as Java s .jar files which contain all your compiled class files. Similarly the .swc files contain all your precompiled definitions which can be referenced by your .swf application. To know more about .SWC visit http flex 3 html help. html content . We will start with writing the Flex MXML code which will use HTTPService to invoke a JSP page that builds and returns a JSON object. The MXML code xml version encoding utf-8 mx Application xmlns mx http 2006 mxml creationComp lete init mx Script CDATA import import import import private function init void private function resultHandler event ResultEvent void var jd JSONDecoder new JSONDecoder String 187 Communicating with Server-side Java private function faultHandler event FaultEvent void mx Script mx HTTPService id httpSrv url http 8180 result resultHandler event fault faultHandler event mx DataGrid id dgGrid width 100 height 100 mx Application In the above code we have .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.