flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [15/51] [partial] flex-blazeds git commit: Refactored the directory structure
Date Tue, 04 Aug 2015 10:16:23 GMT
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples-spring/index.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/index.html b/attic/apps/samples-spring/index.html
index ab54259..a86cafc 100755
--- a/attic/apps/samples-spring/index.html
+++ b/attic/apps/samples-spring/index.html
@@ -1,330 +1,330 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>Spring BlazeDS Integration Test Drive</title>
-<link href="main.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-
-<h1>Spring  BlazeDS Integration Test Drive</h1>
-<p>The Spring BlazeDS Integration Test Drive  is a set of samples  that gets you   up and running  Flex with BlazeDS and Spring in minutes.</p>
-<div class="highlight">
-  
-  <h2>Samples Index</h2>
-<h4>Remoting</h4>
-<ul>
-<li><a href="#inventory">Spring BlazeDS Integration 101</a>: Demonstrates the basics.</li>
-<li><a href="#insync">inSync Contact Management Application</a>: A simple CRUD application built in eight steps.</li>
-<li><a href="#company">Company Manager</a>: Similar to the inSync application, but uses <strong>annotation-based configuration</strong>. Also demonstrates object associations.</li>
-</ul>
-<h4>Messaging</h4>
-<ul>
-<li><a href="#chat">Chat</a>: Messaging basics</li>
-<li><a href="#simplepush">Simple Data Push</a>: A simple data push example</li>
-<li><a href="#traderdesktop">Traderdesktop</a>: A more sophisticated data push example showing how to use subtopics</li>
-<li><a href="#collaboration">Collaboration</a>: A simple example showing how to use messaging to remotely drive another client's application</li>
-</ul>
-<h4>Security</h4>
-<ul>
-<li><a href="#security">Security integration 101</a></li>
-</ul>
-
-
-
-<h2>Importing the Projects in Flash  Builder 4</h2>
-<p>This step is optional: All the samples in this Test Drive run out-of-the-box. However, if you want to look at/experiment with the source code in the Flash Builder IDE while running the samples, do the following:</p>
-<ol>
-  <li>Unzip the WEB-INF/flex-src/flex-src.zip to a folder, say {FlexSrc}</li>
-  <li>In Flash Builder 4, click <strong>File &gt; Import &gt; General &gt; Existing  Projects into Workspace. </strong></li>
-  <li>Specify the above folder <strong>{FlexSrc}</strong>,  as the root directory and click  finish.<strong></strong></li>
-  </ol>
-<h2>Configuration Walkthrough</h2>
-<p><strong>web.xml</strong></p>
-  <p>In web.xml, the DispatcherServlet is configured to bootstrap  the Spring WebApplicationContext as usual. In this simple configuration, all  the <strong>/messagebroker</strong> requests are mapped to the DispatcherServlet.<br />
-  <p><strong>flex-servlet.xml</strong></p>
-  <p>In flex-servlet.xml, the BlazeDS message broker is  configured as a Spring-managed bean using the simple message-broker tag. This   bootstraps the BlazeDS message broker. <br />
-  With the message-broker in place, the Spring beans are  configured as usual, and exposed for remote access using the remoting-destination  tag. <br />
-  In this Test Drive, we split the configuration into multiple  XML files:</p>
-<ol>
-  <li>The application-specific beans are configured in <strong>spring/app-config.xml</strong> and exposed as  remoting destinations in <strong>flex-servlet.xml.</strong></li>
-  <li>The beans that provide the basic infrastructure  for the application (Database access) are configured in <strong>spring/infrastructure-config.xml</strong>. </li>
-  <li>Security is configured in <strong>spring/security-config.xml</strong>. For the purpose of this introduction, we use a basic  authentication provider. </li>
-</ol>
-<p>In your own web application, you can use a different  configuration arrangement, including single-file configuration.</p>
-</div>
-
-<h2>Remoting Samples</h2>
-
-<a name="inventory"></a>
-<div class="item">
-  <h3>Spring BlazeDS Integration 101</h3>
-  <h4>Run the sample:</h4>
-<ol>
-
-  <li>Click <a href="spring-blazeds-101/index.html">here</a> to run the application.</li>
-  <li>Click &quot;Get Data&quot;:  The DataGrid is populated with  data returned by the findAll() method of the ProductDAO Java class. </li>
-  </ol>
-<h4>Code walkthrough:</h4>
-<p>Open Main.mxml in the spring-blazeds-101 project to look at the source code of the application.</p>
-<p>Open the following files in a text editor to look at the source code for the server side  of the application: </p>
-<ul>
-  <li>{context-root}/WEB-INF/flex-servlet.xml</li>
-  <li>{context-root}/WEB-INF/spring/app-config.xml</li>
-  <li>org/springframework/flex/samples/product/ProducDAO.java</li>
-</ul>
-<p>Note that this  application uses a simplistic DAO implementation with low level JDBC code and no real abstraction. This was done intentionally to provide a bare-bones example that focuses exclusively on the Spring/BlazeDS Integration plumbing. All the other examples of this Test Drive,  use the JdbcTemplate abstraction of the Spring framework to build the data access objects.</p>
-<p>Using RemoteObject, you can directly invoke methods of Java objects  deployed in your application server, and consume the return value. The return value can be a value of a primitive data type, an object, a  collection of objects, an object graph, etc.</p>
-<p>Using the Spring BlazeDS integration, Spring beans are exposed using the remoting-destination tag. The productService bean is defined in app-config.xml and is exposed as a remoting destination in flex-servlet.xml.</p>
-<p>Java objects returned by server-side methods are deserialized into  either dynamic or typed ActionScript objects. This application doesn't have an explicit ActionScript version of the Product Java class. Product objects are therefore deserialized into dynamic objects. In InSync03 below, we start working with strongly typed model objects. </p>
-</div>
-
-<br />
-
-<a name="insync"></a>
-<div class="item">
-  <h3>InSync01: Searching Contacts</h3>
-  <h4>Run the sample:</h4>
-<ol>
-  <li>Click <a href="insync01/index.html">here</a> to run the application.</li>
-  <li>Click the Search button to retrieve all the contacts in the database.</li>
-  <li>Enter a few characters in the Search input field before clicking the Search button in order to search by name.</li>
-  </ol>
-<h4>Code walkthrough:</h4>
-<p>Open insync01.mxml in the insync01 project  to look at the source code of the application.</p>
-<p>Open the following files to look at the source code for the server side  of the application: </p>
-<ul>
-  <li>flex-servlet.xml</li>
-  <li>app-config.xml</li>
-  <li>org/springframework/flex/samples/contact/ContactDAO.java</li>
-</ul>
-</div>
-<br />
-
-<div class="item">
-  <h3>InSync02: Using the RemoteObject Events</h3>
-  <h4>Run the sample:</h4>
-  <p>Click <a href="insync02/index.html">here</a> to run the application.</p>
-<h4>Code walkthrough:</h4>
-<p>Open insync02.mxml in the insync02 project  to look at the source code of the application.</p>
-<p>This version is similar to insync01, but demonstrates how to use the ResultEvent and FaultEvent to have a finer control over RemoteObject calls.<br />
-</p>
-</div>
-<br />
-
-<div class="item">
-  <h3>InSync03: Strong Typing</h3>
-  <h4>Run the sample:</h4>
-<ol>
-  <li>Click <a href="insync03/index.html">here</a> to run the application.</li>
-  <li>Click the Search button to retrieve all the contacts in the database.</li>
-  <li>Enter a few characters in the Search input field before clicking the Search button to search by name.</li>
-  <li>Select a contact in the DataGrid.</li>
-  <li>Edit the contact in the Contact form and click &quot;Save&quot; to persist your changes.</li>
-  </ol>
-<h4>Code walkthrough:</h4>
-<p>Open insync03.mxml, Contact.as, and ContactForm.mxml in the insync03 project to look at the source code of the application.</p>
-<p>In this version, we work with strongly typed contact objects. The Contact.as class is the ActionScript representation of org.springframework.flex.samples.contact.Contact.java. The [RemoteClass(alias=&quot;org.springframework.flex.spring.samples.contact.Contact&quot;)] annotation in Contact.as is used to indicate that instances of Contact.as sent to the server should be deserialized as instances of org.springframework.flex.spring.samples.contact.Contact at the server side, and that similarly, instances of org.springframework.flex.spring.samples.contact.Contact retrieved from the server should be deserialized as instances of Contact.as.<br />
-</p>
-</div>
-<br />
-
-<div class="item">
-  <h3>InSync04: Opening Multiple Contacts</h3>
-  <h4>Run the sample:</h4>
-<ol>
-  <li>Click <a href="insync04/index.html">here</a> to run the application.</li>
-  <li>Click the Search button to retrieve all the contacts in the database.</li>
-  <li>Enter a few characters in the Search input field before clicking the Search button to search by name.</li>
-  <li>Double-click a contact in the DataGrid to open it in a separate Tab.</li>
-  <li>Edit the contact in the Contact form and click &quot;Save&quot; to persist your changes.</li>
-  </ol>
-<h4>Code walkthrough:</h4>
-<p>Open insync04.mxml in the insync04 project  to look at the source code of the application.<br />
-</p>
-</div>
-<br />
-
-<div class="item">
-  <h3>InSync05: Adding New Contacts</h3>
-  <h4>Run the sample:</h4>
-<ol>
-  <li>Click <a href="insync05/index.html">here</a> to run the application.</li>
-  <li>Click the Search button to retrieve all the contacts in the database.</li>
-  <li>Click the New Contact button.</li>
-  <li>Edit the new contact in the Contact form and click &quot;Save&quot; to create the contact.</li>
-  </ol>
-<h4>Code walkthrough:</h4>
-<p>Open insync05.mxml and ContactForm.mxml in the insync05 project to look at the source code of the application.</p>
-<p>This version enables the user of the application to add contacts. In ContactForm, we remotely invoke the create() method of ContactDAO when dealing with a new contact, and the update() method when updating an existing contact.<br />
-</p>
-</div>
-<br />
-
-<div class="item">
-  <h3>InSync06: Adding Event Notification for &quot;Loosely Coupled&quot; UI Synchronization</h3>
-  <h4>Run the sample:</h4>
-<ol>
-  <li>Click <a href="insync06/index.html">here</a> to run the application.</li>
-  <li>Click the Search button to retrieve all the contacts in the database.</li>
-  <li>Enter a few characters in the Search input field before clicking the Search button to search by name.</li>
-  <li>Double-click a contact in the DataGrid to open it in a separate Tab.</li>
-  <li>Modify the first name or last name of the contact and click &quot;Save&quot;. Notice that the DataGrid is updated to reflect your changes.</li>
-  <li>Add a new contact and click &quot;Save&quot; to create the contact. Notice that the contact appears in the DataGrid.</li>
-  <li>Delete a contact and notice that the contact is removed from the DataGrid.</li>
-  </ol>
-<h4>Code walkthrough:</h4>
-<p>Open insync06.mxml, ContactForm.mxml, and ContactEvent.as in the insync06 project  to look at the source code of the application.</p>
-<p>In this version, ContactForm dispatches events when a contact has been created, updated, or deleted. Other components of the application can register as listeners to these events to perform a specific task when a contact is created, updated or deleted. In this case, the main application registers as a listener to these events and refreshes the contact DataGrid to make sure it reflects the changes made in ContactForm.<br />
-</p>
-</div>
-<br />
-
-<a name="company"></a>
-<div class="item">
-  <h3>Company Manager</h3>
-  <h4>Run the sample:</h4>
-<ol>
-  <li>Click <a href="companymgr/index.html">here</a> to run the application.</li>
-  <li>Click the Search button to retrieve all the contacts in the database.</li>
-  <li>Enter a few characters in the Search input field before clicking the Search button to search by name.</li>
-  </ol>
-<h4>Code walkthrough:</h4>
-<p>Open companymgr.mxml, Company.as, Industry.as, and CompanyForm.mxml in the companymgr project to look at the source code of the application.</p>
-<p>Open the following files to look at the source code for the server side  of the application: </p>
-<ul>
-  <li>org/springframework/flex/spring/samples/company/CompanyDAO.java</li>
-  <li>org/springframework/flex/spring/samples/company/IndustryDAO.java</li>
-</ul>
-<p>The CompanyDAO and IndustryDAO beans are not defined in app-config.xml nor exposed in flex-servlet.xml. They are configured using annotations (<code>@Service</code>, 
-  <code>@RemotingDestination</code>, <code>@Autowired</code>, <code>@RemotingInclude</code>, and <code>@RemotingExclude</code>) in the class definition. This application is similar to inSync, but demonstrates object associations: the Company class has a property of type Industry.<br />
-</p>
-</div>
-<br />
-
-<h2>Messaging Samples</h2>
-
-<a name="chat"></a>
-<div class="item">
-  <h3>Chat</h3>
-  <h4>Run the sample:</h4>
-<ol>
-  <li>Click <a href="chat/index.html">here</a> to run the application.</li>
-  <li>Access the same URL in another browser window to open a second instance of the chat application.</li>
-  <li>Type a message in one of the chat clients and click &quot;Send&quot;: the message appears in the two chat clients.</li>
-</ol>
-
-<h4>Code walkthrough:</h4>
-<p>Open chat.mxml in the chat project to look at the source code of the application. The Message Service manages a set of destinations that Flex clients can publish and subscribe to. Flex provides two components, Producer and Consumer, that you use to  publish and subscribe to a destination. To subscribe to a destination, you use the <code>subscribe()</code> method of the Consumer class. When a message is published to a destination that you subscribed to, the <code>message</code> event is triggered on the Consumer.</p>
-
-<p>Open flex-servlet.xml to look at the message service configuration. The message service is configured using  <code>&lt;flex:message-service /&gt;</code> inside <code>&lt;flex:message-broker /&gt;</code>. The &quot;chat&quot; destination is configured using <code>&lt;flex:message-destination id=&quot;chat&quot; /&gt;</code></p>
-</div>
-<br />
-
-<a name="simplepush"></a>
-<div class="item">
-  <h3>Simple Data Push</h3>
-  <h4>Run the sample</h4>
-  <p>This example demonstrates how to use the message service to push data from the server to the client. At the server-side, a Java component publishes simulated real time values to a message destination. The Flex client subscribes to that destination and displays the values in real time. </p>
-  <ol>
-
-  <li>To start the feed at the server-side, run the <a href="feedstarter/index.html">Feed Starter application</a> and start the "Simple Feed".</li>
-  <li>Click <a href="simplepush/index.html">here</a> to run the client application</a>.</li>
-  <li>Click the Subscribe button. Pushed values appear in the text field. You can click the Unsubscribe button to unsubscribe from the destination. </li>
-  <li>To stop the feed when you are done experimenting with the application, access the <a href="feedstarter/index.html">Feed Starter application</a> and stop the "Simple Feed".</li>
-  </ol>
-  <h4>Code walk through</h4>
-  <p>Open simplepush.mxml in the simplepush project to look at the source code of the application.</p>
-  <p>Open the following files to look at the source code for the server side  of the application: </p>
-  <ul>
-    <li>org/springframework/flex/spring/samples/simplefeed/SimpleFeed.Java</li>
-    <li>flex-servlet.xml</li>
-  </ul>
-  <p>In SimpleFeed.java, the MessageTemplate class is used to publish messages to the "simple-feed" destination.</p>
-In flex-servlet.xml, the &quot;simple-feed&quot; destination is configured using <code>&lt;flex:message-destination id=&quot;simple-feed&quot; /&gt;</code></div>
-<br />
-
-<a name="traderdesktop"></a>
-<div class="item">
-  <h3>Traderdesktop</h3>
-  <h4>Run the sample</h4>
-  <p>Traderdesktop is a more sophisticated data push example showing how to  use subtopics to selectively subscribe to specific messages. In this case, the user can subscribe to updates for specific stocks only. At the server side, a Java component publishes simulated market data to a messaging destination.</p>
-  <ol>
-
-  <li>To start the feed  at the server-side, run the <a href="feedstarter/index.html">Feed Starter application</a> and start the "Market Feed".</li>
-  <li>Click <a href="traderdesktop/index.html">here</a> to run the client application</a>.</li>
-  <li>To stop the feed when you are done experimenting with the application, access the <a href="feedstarter/index.html">Feed Starter application</a> and stop the "Market Feed".</li>
-  </ol>
-  <h4>Code walk through</h4>
-  <p>Open traderdesktop.mxml in the traderdesktop project to look at the source code of the application.</p>
-  <p>Open the following files to look at the source code for the server side  of the application: </p>
-  <ul>
-    <li>org/springframework/flex/spring/samples/marketfeed/MarketFeed.Java</li>
-    <li>flex-servlet.xml. The market-feed destination is configured using <code>&lt;flex:message-destination id=&quot;market-feed&quot; allow-subtopics=&quot;true&quot; subtopic-separator=&quot;.&quot; /&gt;</code></li>
-  </ul>
-</div>
-<br />
-
-<a name="collaboration"></a>
-<div class="item">
-  <h3>Collaboration</h3>
-  <h4>Run the sample:</h4>
-<ol>
-  <li>Click <a href="collaboration/index.html">here</a> to run the application.</li>
-  <li>Access the same URL in another browser window to open a second instance of the chat application.</li>
-  <li>Enter some data in one browser and notice that the data appears in the other browser as well.</li>
-  <li>Select another tab in the accordion in one broswer, and notice that the other client's user interface is synchronized accordingly.</li>
-</ol>
-
-<h4>Code walkthrough:</h4>
-<p>Open collaboration.mxml in the collaboration project to look at the source code of the application.</p>
-</div>
-<br />
-
-
-<h2>Security Samples</h2>
-
-<a name="security"></a>
-<div class="item">
-  <h3>Security Integration 101</h3>
-  <h4>Run the sample:</h4>
-<ol>
-  <li>Click <a href="spring-blazeds-security-101/index.html">here</a> to run the application.</li>
-  <li>Click &quot;Get Data&quot; without logging in first: you  get an &quot;Access Denied&quot; exception.</li>
-  <li>Log in (use UserId: john / Password: john), and click &quot;Get Data&quot; again: you should now get the data.</li>
-  <li>Click &quot;Logout&quot; and &quot;Get Data&quot; again: you get the &quot;Access Denied&quot; exception again.</li>
-  <li>If you are already authenticated, you don't have to use the ChannelSet login. For example, access <a href="login.jsp">login.jsp</a>, and logon using john / john. <a href="spring-blazeds-security-101/index.html">Come back to the application</a> and click Get Data without logging in inside the application: you should get the data.</li>
-</ol>
-
-<h4>Code walkthrough:</h4>
-<p>Open Main.mxml in the spring-blazeds-security-101 project to look at the source code of the application.</p>
-<p>Open the following files in a text editor to look at the the server side configuration: </p>
-<ul>
-  <li>app-config.xml</li>
-  <li>security-config.xml</li>  
-</ul>
-
-<p>In app-config.xml, note that the &quot;find*&quot; methods of securedProductService are protected: they can only be accessed by members of ROLE_USER. A basic authentication provider is defined in security-config.xml.<br />
-</p>
-</div>
-
-<br />
-
-</body>
-</html>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<title>Spring BlazeDS Integration Test Drive</title>
+<link href="main.css" rel="stylesheet" type="text/css" />
+</head>
+<body>
+
+<h1>Spring  BlazeDS Integration Test Drive</h1>
+<p>The Spring BlazeDS Integration Test Drive  is a set of samples  that gets you   up and running  Flex with BlazeDS and Spring in minutes.</p>
+<div class="highlight">
+  
+  <h2>Samples Index</h2>
+<h4>Remoting</h4>
+<ul>
+<li><a href="#inventory">Spring BlazeDS Integration 101</a>: Demonstrates the basics.</li>
+<li><a href="#insync">inSync Contact Management Application</a>: A simple CRUD application built in eight steps.</li>
+<li><a href="#company">Company Manager</a>: Similar to the inSync application, but uses <strong>annotation-based configuration</strong>. Also demonstrates object associations.</li>
+</ul>
+<h4>Messaging</h4>
+<ul>
+<li><a href="#chat">Chat</a>: Messaging basics</li>
+<li><a href="#simplepush">Simple Data Push</a>: A simple data push example</li>
+<li><a href="#traderdesktop">Traderdesktop</a>: A more sophisticated data push example showing how to use subtopics</li>
+<li><a href="#collaboration">Collaboration</a>: A simple example showing how to use messaging to remotely drive another client's application</li>
+</ul>
+<h4>Security</h4>
+<ul>
+<li><a href="#security">Security integration 101</a></li>
+</ul>
+
+
+
+<h2>Importing the Projects in Flash  Builder 4</h2>
+<p>This step is optional: All the samples in this Test Drive run out-of-the-box. However, if you want to look at/experiment with the source code in the Flash Builder IDE while running the samples, do the following:</p>
+<ol>
+  <li>Unzip the WEB-INF/flex-src/flex-src.zip to a folder, say {FlexSrc}</li>
+  <li>In Flash Builder 4, click <strong>File &gt; Import &gt; General &gt; Existing  Projects into Workspace. </strong></li>
+  <li>Specify the above folder <strong>{FlexSrc}</strong>,  as the root directory and click  finish.<strong></strong></li>
+  </ol>
+<h2>Configuration Walkthrough</h2>
+<p><strong>web.xml</strong></p>
+  <p>In web.xml, the DispatcherServlet is configured to bootstrap  the Spring WebApplicationContext as usual. In this simple configuration, all  the <strong>/messagebroker</strong> requests are mapped to the DispatcherServlet.<br />
+  <p><strong>flex-servlet.xml</strong></p>
+  <p>In flex-servlet.xml, the BlazeDS message broker is  configured as a Spring-managed bean using the simple message-broker tag. This   bootstraps the BlazeDS message broker. <br />
+  With the message-broker in place, the Spring beans are  configured as usual, and exposed for remote access using the remoting-destination  tag. <br />
+  In this Test Drive, we split the configuration into multiple  XML files:</p>
+<ol>
+  <li>The application-specific beans are configured in <strong>spring/app-config.xml</strong> and exposed as  remoting destinations in <strong>flex-servlet.xml.</strong></li>
+  <li>The beans that provide the basic infrastructure  for the application (Database access) are configured in <strong>spring/infrastructure-config.xml</strong>. </li>
+  <li>Security is configured in <strong>spring/security-config.xml</strong>. For the purpose of this introduction, we use a basic  authentication provider. </li>
+</ol>
+<p>In your own web application, you can use a different  configuration arrangement, including single-file configuration.</p>
+</div>
+
+<h2>Remoting Samples</h2>
+
+<a name="inventory"></a>
+<div class="item">
+  <h3>Spring BlazeDS Integration 101</h3>
+  <h4>Run the sample:</h4>
+<ol>
+
+  <li>Click <a href="spring-blazeds-101/index.html">here</a> to run the application.</li>
+  <li>Click &quot;Get Data&quot;:  The DataGrid is populated with  data returned by the findAll() method of the ProductDAO Java class. </li>
+  </ol>
+<h4>Code walkthrough:</h4>
+<p>Open Main.mxml in the spring-blazeds-101 project to look at the source code of the application.</p>
+<p>Open the following files in a text editor to look at the source code for the server side  of the application: </p>
+<ul>
+  <li>{context-root}/WEB-INF/flex-servlet.xml</li>
+  <li>{context-root}/WEB-INF/spring/app-config.xml</li>
+  <li>org/springframework/flex/samples/product/ProducDAO.java</li>
+</ul>
+<p>Note that this  application uses a simplistic DAO implementation with low level JDBC code and no real abstraction. This was done intentionally to provide a bare-bones example that focuses exclusively on the Spring/BlazeDS Integration plumbing. All the other examples of this Test Drive,  use the JdbcTemplate abstraction of the Spring framework to build the data access objects.</p>
+<p>Using RemoteObject, you can directly invoke methods of Java objects  deployed in your application server, and consume the return value. The return value can be a value of a primitive data type, an object, a  collection of objects, an object graph, etc.</p>
+<p>Using the Spring BlazeDS integration, Spring beans are exposed using the remoting-destination tag. The productService bean is defined in app-config.xml and is exposed as a remoting destination in flex-servlet.xml.</p>
+<p>Java objects returned by server-side methods are deserialized into  either dynamic or typed ActionScript objects. This application doesn't have an explicit ActionScript version of the Product Java class. Product objects are therefore deserialized into dynamic objects. In InSync03 below, we start working with strongly typed model objects. </p>
+</div>
+
+<br />
+
+<a name="insync"></a>
+<div class="item">
+  <h3>InSync01: Searching Contacts</h3>
+  <h4>Run the sample:</h4>
+<ol>
+  <li>Click <a href="insync01/index.html">here</a> to run the application.</li>
+  <li>Click the Search button to retrieve all the contacts in the database.</li>
+  <li>Enter a few characters in the Search input field before clicking the Search button in order to search by name.</li>
+  </ol>
+<h4>Code walkthrough:</h4>
+<p>Open insync01.mxml in the insync01 project  to look at the source code of the application.</p>
+<p>Open the following files to look at the source code for the server side  of the application: </p>
+<ul>
+  <li>flex-servlet.xml</li>
+  <li>app-config.xml</li>
+  <li>org/springframework/flex/samples/contact/ContactDAO.java</li>
+</ul>
+</div>
+<br />
+
+<div class="item">
+  <h3>InSync02: Using the RemoteObject Events</h3>
+  <h4>Run the sample:</h4>
+  <p>Click <a href="insync02/index.html">here</a> to run the application.</p>
+<h4>Code walkthrough:</h4>
+<p>Open insync02.mxml in the insync02 project  to look at the source code of the application.</p>
+<p>This version is similar to insync01, but demonstrates how to use the ResultEvent and FaultEvent to have a finer control over RemoteObject calls.<br />
+</p>
+</div>
+<br />
+
+<div class="item">
+  <h3>InSync03: Strong Typing</h3>
+  <h4>Run the sample:</h4>
+<ol>
+  <li>Click <a href="insync03/index.html">here</a> to run the application.</li>
+  <li>Click the Search button to retrieve all the contacts in the database.</li>
+  <li>Enter a few characters in the Search input field before clicking the Search button to search by name.</li>
+  <li>Select a contact in the DataGrid.</li>
+  <li>Edit the contact in the Contact form and click &quot;Save&quot; to persist your changes.</li>
+  </ol>
+<h4>Code walkthrough:</h4>
+<p>Open insync03.mxml, Contact.as, and ContactForm.mxml in the insync03 project to look at the source code of the application.</p>
+<p>In this version, we work with strongly typed contact objects. The Contact.as class is the ActionScript representation of org.springframework.flex.samples.contact.Contact.java. The [RemoteClass(alias=&quot;org.springframework.flex.spring.samples.contact.Contact&quot;)] annotation in Contact.as is used to indicate that instances of Contact.as sent to the server should be deserialized as instances of org.springframework.flex.spring.samples.contact.Contact at the server side, and that similarly, instances of org.springframework.flex.spring.samples.contact.Contact retrieved from the server should be deserialized as instances of Contact.as.<br />
+</p>
+</div>
+<br />
+
+<div class="item">
+  <h3>InSync04: Opening Multiple Contacts</h3>
+  <h4>Run the sample:</h4>
+<ol>
+  <li>Click <a href="insync04/index.html">here</a> to run the application.</li>
+  <li>Click the Search button to retrieve all the contacts in the database.</li>
+  <li>Enter a few characters in the Search input field before clicking the Search button to search by name.</li>
+  <li>Double-click a contact in the DataGrid to open it in a separate Tab.</li>
+  <li>Edit the contact in the Contact form and click &quot;Save&quot; to persist your changes.</li>
+  </ol>
+<h4>Code walkthrough:</h4>
+<p>Open insync04.mxml in the insync04 project  to look at the source code of the application.<br />
+</p>
+</div>
+<br />
+
+<div class="item">
+  <h3>InSync05: Adding New Contacts</h3>
+  <h4>Run the sample:</h4>
+<ol>
+  <li>Click <a href="insync05/index.html">here</a> to run the application.</li>
+  <li>Click the Search button to retrieve all the contacts in the database.</li>
+  <li>Click the New Contact button.</li>
+  <li>Edit the new contact in the Contact form and click &quot;Save&quot; to create the contact.</li>
+  </ol>
+<h4>Code walkthrough:</h4>
+<p>Open insync05.mxml and ContactForm.mxml in the insync05 project to look at the source code of the application.</p>
+<p>This version enables the user of the application to add contacts. In ContactForm, we remotely invoke the create() method of ContactDAO when dealing with a new contact, and the update() method when updating an existing contact.<br />
+</p>
+</div>
+<br />
+
+<div class="item">
+  <h3>InSync06: Adding Event Notification for &quot;Loosely Coupled&quot; UI Synchronization</h3>
+  <h4>Run the sample:</h4>
+<ol>
+  <li>Click <a href="insync06/index.html">here</a> to run the application.</li>
+  <li>Click the Search button to retrieve all the contacts in the database.</li>
+  <li>Enter a few characters in the Search input field before clicking the Search button to search by name.</li>
+  <li>Double-click a contact in the DataGrid to open it in a separate Tab.</li>
+  <li>Modify the first name or last name of the contact and click &quot;Save&quot;. Notice that the DataGrid is updated to reflect your changes.</li>
+  <li>Add a new contact and click &quot;Save&quot; to create the contact. Notice that the contact appears in the DataGrid.</li>
+  <li>Delete a contact and notice that the contact is removed from the DataGrid.</li>
+  </ol>
+<h4>Code walkthrough:</h4>
+<p>Open insync06.mxml, ContactForm.mxml, and ContactEvent.as in the insync06 project  to look at the source code of the application.</p>
+<p>In this version, ContactForm dispatches events when a contact has been created, updated, or deleted. Other components of the application can register as listeners to these events to perform a specific task when a contact is created, updated or deleted. In this case, the main application registers as a listener to these events and refreshes the contact DataGrid to make sure it reflects the changes made in ContactForm.<br />
+</p>
+</div>
+<br />
+
+<a name="company"></a>
+<div class="item">
+  <h3>Company Manager</h3>
+  <h4>Run the sample:</h4>
+<ol>
+  <li>Click <a href="companymgr/index.html">here</a> to run the application.</li>
+  <li>Click the Search button to retrieve all the contacts in the database.</li>
+  <li>Enter a few characters in the Search input field before clicking the Search button to search by name.</li>
+  </ol>
+<h4>Code walkthrough:</h4>
+<p>Open companymgr.mxml, Company.as, Industry.as, and CompanyForm.mxml in the companymgr project to look at the source code of the application.</p>
+<p>Open the following files to look at the source code for the server side  of the application: </p>
+<ul>
+  <li>org/springframework/flex/spring/samples/company/CompanyDAO.java</li>
+  <li>org/springframework/flex/spring/samples/company/IndustryDAO.java</li>
+</ul>
+<p>The CompanyDAO and IndustryDAO beans are not defined in app-config.xml nor exposed in flex-servlet.xml. They are configured using annotations (<code>@Service</code>, 
+  <code>@RemotingDestination</code>, <code>@Autowired</code>, <code>@RemotingInclude</code>, and <code>@RemotingExclude</code>) in the class definition. This application is similar to inSync, but demonstrates object associations: the Company class has a property of type Industry.<br />
+</p>
+</div>
+<br />
+
+<h2>Messaging Samples</h2>
+
+<a name="chat"></a>
+<div class="item">
+  <h3>Chat</h3>
+  <h4>Run the sample:</h4>
+<ol>
+  <li>Click <a href="chat/index.html">here</a> to run the application.</li>
+  <li>Access the same URL in another browser window to open a second instance of the chat application.</li>
+  <li>Type a message in one of the chat clients and click &quot;Send&quot;: the message appears in the two chat clients.</li>
+</ol>
+
+<h4>Code walkthrough:</h4>
+<p>Open chat.mxml in the chat project to look at the source code of the application. The Message Service manages a set of destinations that Flex clients can publish and subscribe to. Flex provides two components, Producer and Consumer, that you use to  publish and subscribe to a destination. To subscribe to a destination, you use the <code>subscribe()</code> method of the Consumer class. When a message is published to a destination that you subscribed to, the <code>message</code> event is triggered on the Consumer.</p>
+
+<p>Open flex-servlet.xml to look at the message service configuration. The message service is configured using  <code>&lt;flex:message-service /&gt;</code> inside <code>&lt;flex:message-broker /&gt;</code>. The &quot;chat&quot; destination is configured using <code>&lt;flex:message-destination id=&quot;chat&quot; /&gt;</code></p>
+</div>
+<br />
+
+<a name="simplepush"></a>
+<div class="item">
+  <h3>Simple Data Push</h3>
+  <h4>Run the sample</h4>
+  <p>This example demonstrates how to use the message service to push data from the server to the client. At the server-side, a Java component publishes simulated real time values to a message destination. The Flex client subscribes to that destination and displays the values in real time. </p>
+  <ol>
+
+  <li>To start the feed at the server-side, run the <a href="feedstarter/index.html">Feed Starter application</a> and start the "Simple Feed".</li>
+  <li>Click <a href="simplepush/index.html">here</a> to run the client application</a>.</li>
+  <li>Click the Subscribe button. Pushed values appear in the text field. You can click the Unsubscribe button to unsubscribe from the destination. </li>
+  <li>To stop the feed when you are done experimenting with the application, access the <a href="feedstarter/index.html">Feed Starter application</a> and stop the "Simple Feed".</li>
+  </ol>
+  <h4>Code walk through</h4>
+  <p>Open simplepush.mxml in the simplepush project to look at the source code of the application.</p>
+  <p>Open the following files to look at the source code for the server side  of the application: </p>
+  <ul>
+    <li>org/springframework/flex/spring/samples/simplefeed/SimpleFeed.Java</li>
+    <li>flex-servlet.xml</li>
+  </ul>
+  <p>In SimpleFeed.java, the MessageTemplate class is used to publish messages to the "simple-feed" destination.</p>
+In flex-servlet.xml, the &quot;simple-feed&quot; destination is configured using <code>&lt;flex:message-destination id=&quot;simple-feed&quot; /&gt;</code></div>
+<br />
+
+<a name="traderdesktop"></a>
+<div class="item">
+  <h3>Traderdesktop</h3>
+  <h4>Run the sample</h4>
+  <p>Traderdesktop is a more sophisticated data push example showing how to  use subtopics to selectively subscribe to specific messages. In this case, the user can subscribe to updates for specific stocks only. At the server side, a Java component publishes simulated market data to a messaging destination.</p>
+  <ol>
+
+  <li>To start the feed  at the server-side, run the <a href="feedstarter/index.html">Feed Starter application</a> and start the "Market Feed".</li>
+  <li>Click <a href="traderdesktop/index.html">here</a> to run the client application</a>.</li>
+  <li>To stop the feed when you are done experimenting with the application, access the <a href="feedstarter/index.html">Feed Starter application</a> and stop the "Market Feed".</li>
+  </ol>
+  <h4>Code walk through</h4>
+  <p>Open traderdesktop.mxml in the traderdesktop project to look at the source code of the application.</p>
+  <p>Open the following files to look at the source code for the server side  of the application: </p>
+  <ul>
+    <li>org/springframework/flex/spring/samples/marketfeed/MarketFeed.Java</li>
+    <li>flex-servlet.xml. The market-feed destination is configured using <code>&lt;flex:message-destination id=&quot;market-feed&quot; allow-subtopics=&quot;true&quot; subtopic-separator=&quot;.&quot; /&gt;</code></li>
+  </ul>
+</div>
+<br />
+
+<a name="collaboration"></a>
+<div class="item">
+  <h3>Collaboration</h3>
+  <h4>Run the sample:</h4>
+<ol>
+  <li>Click <a href="collaboration/index.html">here</a> to run the application.</li>
+  <li>Access the same URL in another browser window to open a second instance of the chat application.</li>
+  <li>Enter some data in one browser and notice that the data appears in the other browser as well.</li>
+  <li>Select another tab in the accordion in one broswer, and notice that the other client's user interface is synchronized accordingly.</li>
+</ol>
+
+<h4>Code walkthrough:</h4>
+<p>Open collaboration.mxml in the collaboration project to look at the source code of the application.</p>
+</div>
+<br />
+
+
+<h2>Security Samples</h2>
+
+<a name="security"></a>
+<div class="item">
+  <h3>Security Integration 101</h3>
+  <h4>Run the sample:</h4>
+<ol>
+  <li>Click <a href="spring-blazeds-security-101/index.html">here</a> to run the application.</li>
+  <li>Click &quot;Get Data&quot; without logging in first: you  get an &quot;Access Denied&quot; exception.</li>
+  <li>Log in (use UserId: john / Password: john), and click &quot;Get Data&quot; again: you should now get the data.</li>
+  <li>Click &quot;Logout&quot; and &quot;Get Data&quot; again: you get the &quot;Access Denied&quot; exception again.</li>
+  <li>If you are already authenticated, you don't have to use the ChannelSet login. For example, access <a href="login.jsp">login.jsp</a>, and logon using john / john. <a href="spring-blazeds-security-101/index.html">Come back to the application</a> and click Get Data without logging in inside the application: you should get the data.</li>
+</ol>
+
+<h4>Code walkthrough:</h4>
+<p>Open Main.mxml in the spring-blazeds-security-101 project to look at the source code of the application.</p>
+<p>Open the following files in a text editor to look at the the server side configuration: </p>
+<ul>
+  <li>app-config.xml</li>
+  <li>security-config.xml</li>  
+</ul>
+
+<p>In app-config.xml, note that the &quot;find*&quot; methods of securedProductService are protected: they can only be accessed by members of ROLE_USER. A basic authentication provider is defined in security-config.xml.<br />
+</p>
+</div>
+
+<br />
+
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples-spring/login.jsp
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/login.jsp b/attic/apps/samples-spring/login.jsp
index 5945ad9..82f9fa8 100755
--- a/attic/apps/samples-spring/login.jsp
+++ b/attic/apps/samples-spring/login.jsp
@@ -1,64 +1,64 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %>
-<%@ page import="org.springframework.security.web.authentication.AbstractProcessingFilter" %>
-<%@ page import="org.springframework.security.web.authentication.AuthenticationProcessingFilter" %>
-<%@ page import="org.springframework.security.core.AuthenticationException" %>
-
-
-
-
-<!-- Not used unless you declare a <form-login login-page="/login.jsp"/> element -->
-
-<html>
-  <head>
-    <title>CUSTOM SPRING SECURITY LOGIN</title>
-  </head>
-
-  <body onload="document.f.j_username.focus();">
-    <h1>CUSTOM SPRING SECURITY LOGIN</h1>
-
-	<P>Valid users:
-	<P>
-	<P>username <b>john</b>, password <b>john</b>
-	<br>username <b>guest</b>, password <b>guest</b>
-	<p>
-
-    <%-- this form-login-page form is also used as the
-         form-error-page to ask for a login again.
-         --%>
-    <c:if test="${not empty param.login_error}">
-      <font color="red">
-        Your login attempt was not successful, try again.<br/><br/>
-        Reason: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>.
-      </font>
-    </c:if>
-
-    <form name="f" action="<c:url value='j_spring_security_check'/>" method="POST">
-      <table>
-        <tr><td>User:</td><td><input type='text' name='j_username' value='<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>'/></td></tr>
-        <tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
-        <tr><td><input type="checkbox" name="_spring_security_remember_me"></td><td>Don't ask for my password for two weeks</td></tr>
-
-        <tr><td colspan='2'><input name="submit" type="submit"></td></tr>
-        <tr><td colspan='2'><input name="reset" type="reset"></td></tr>
-      </table>
-
-    </form>
-
-  </body>
-</html>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt' %>
+<%@ page import="org.springframework.security.web.authentication.AbstractProcessingFilter" %>
+<%@ page import="org.springframework.security.web.authentication.AuthenticationProcessingFilter" %>
+<%@ page import="org.springframework.security.core.AuthenticationException" %>
+
+
+
+
+<!-- Not used unless you declare a <form-login login-page="/login.jsp"/> element -->
+
+<html>
+  <head>
+    <title>CUSTOM SPRING SECURITY LOGIN</title>
+  </head>
+
+  <body onload="document.f.j_username.focus();">
+    <h1>CUSTOM SPRING SECURITY LOGIN</h1>
+
+	<P>Valid users:
+	<P>
+	<P>username <b>john</b>, password <b>john</b>
+	<br>username <b>guest</b>, password <b>guest</b>
+	<p>
+
+    <%-- this form-login-page form is also used as the
+         form-error-page to ask for a login again.
+         --%>
+    <c:if test="${not empty param.login_error}">
+      <font color="red">
+        Your login attempt was not successful, try again.<br/><br/>
+        Reason: <c:out value="${SPRING_SECURITY_LAST_EXCEPTION.message}"/>.
+      </font>
+    </c:if>
+
+    <form name="f" action="<c:url value='j_spring_security_check'/>" method="POST">
+      <table>
+        <tr><td>User:</td><td><input type='text' name='j_username' value='<c:if test="${not empty param.login_error}"><c:out value="${SPRING_SECURITY_LAST_USERNAME}"/></c:if>'/></td></tr>
+        <tr><td>Password:</td><td><input type='password' name='j_password'></td></tr>
+        <tr><td><input type="checkbox" name="_spring_security_remember_me"></td><td>Don't ask for my password for two weeks</td></tr>
+
+        <tr><td colspan='2'><input name="submit" type="submit"></td></tr>
+        <tr><td colspan='2'><input name="reset" type="reset"></td></tr>
+      </table>
+
+    </form>
+
+  </body>
+</html>

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples-spring/main.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/main.css b/attic/apps/samples-spring/main.css
index 25bdec0..7a5406f 100755
--- a/attic/apps/samples-spring/main.css
+++ b/attic/apps/samples-spring/main.css
@@ -1,138 +1,138 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-body {
-	font-family: Verdana, Arial, Helvetica, sans-serif;
-	margin-top: 30px;
-	margin-top: 30px;
-	margin-left: 8%;
-	margin-right: 8%;
-	font-size: 0.8em;
-	color:#444;
-	background-color:#FFFFFF;
-}
-
-h1, h2, h3 {
-	font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
-	font-weight: bold;
-}
-
-h1 {
-	font-weight: bold;
-	margin-top: 4px;
-	margin-bottom: 12px;
-	font-size: 2em;
-}
-
-h2 {
-	padding-top: 4px;
-	margin-bottom: 0px;
-	font-size: 1.4em;
-	color: #333333;
-	text-transform:uppercase;
-}
-
-h3 {
-	margin-top: 0px;
-	font-size: 1.3em;
-	color: #004477;
-}
-
-h4 {
-	margin-top: 20px;
-	margin-bottom: 8px;
-	font-size: 12px;
-	color: #333333;
-}
-
-.item {
-	border-bottom: 1px solid #CCCCCC;
-	padding-top: 12px;
-	padding-bottom: 12px;
-}
-
-.highlight {
-	border: 1px solid #CCCCCC;
-	padding-top:0px;
-	padding-left:10px;
-	padding-right:10px;
-	padding-bottom:20px;
-	margin-top:0px;
-	margin-bottom:20px;
-}
-
-.footer {
-	color: #666666;
-	margin-top: 20px;
-	font-size: 0.75em;
-}
-
-ul {
-	margin-top:8px;
-	margin-bottom:8px;
-}
-
-li {
-	padding-bottom:8px;
-}
-
-code {
-	color: #000099;
-	font-family: "Courier New", Courier, monospace;
-	font-size:1.1em;
-}
-
-img {
-	border: 0;
-}
-
-#col1{
-  	float:left;
-	width: 20%;
-	padding-right: 24px;
-}
-
-#col2{
-  float: left;
-  width: 55%;
-}
-
-#col3{
-	float: right;
-	width: 20%;
-	margin: 0px;
-	padding: 0px;
-}
-
-a:link {
-	color: #006699;
-	text-decoration: none;
-}
-
-a:visited {
-	text-decoration: none;
-	color: #006699;
-}
-
-a:hover {
-	text-decoration: underline;
-	color: #006699;
-}
-
-a:active {
-	text-decoration: none;
-	color: #006699;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+body {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	margin-top: 30px;
+	margin-top: 30px;
+	margin-left: 8%;
+	margin-right: 8%;
+	font-size: 0.8em;
+	color:#444;
+	background-color:#FFFFFF;
+}
+
+h1, h2, h3 {
+	font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	font-weight: bold;
+}
+
+h1 {
+	font-weight: bold;
+	margin-top: 4px;
+	margin-bottom: 12px;
+	font-size: 2em;
+}
+
+h2 {
+	padding-top: 4px;
+	margin-bottom: 0px;
+	font-size: 1.4em;
+	color: #333333;
+	text-transform:uppercase;
+}
+
+h3 {
+	margin-top: 0px;
+	font-size: 1.3em;
+	color: #004477;
+}
+
+h4 {
+	margin-top: 20px;
+	margin-bottom: 8px;
+	font-size: 12px;
+	color: #333333;
+}
+
+.item {
+	border-bottom: 1px solid #CCCCCC;
+	padding-top: 12px;
+	padding-bottom: 12px;
+}
+
+.highlight {
+	border: 1px solid #CCCCCC;
+	padding-top:0px;
+	padding-left:10px;
+	padding-right:10px;
+	padding-bottom:20px;
+	margin-top:0px;
+	margin-bottom:20px;
+}
+
+.footer {
+	color: #666666;
+	margin-top: 20px;
+	font-size: 0.75em;
+}
+
+ul {
+	margin-top:8px;
+	margin-bottom:8px;
+}
+
+li {
+	padding-bottom:8px;
+}
+
+code {
+	color: #000099;
+	font-family: "Courier New", Courier, monospace;
+	font-size:1.1em;
+}
+
+img {
+	border: 0;
+}
+
+#col1{
+  	float:left;
+	width: 20%;
+	padding-right: 24px;
+}
+
+#col2{
+  float: left;
+  width: 55%;
+}
+
+#col3{
+	float: right;
+	width: 20%;
+	margin: 0px;
+	padding: 0px;
+}
+
+a:link {
+	color: #006699;
+	text-decoration: none;
+}
+
+a:visited {
+	text-decoration: none;
+	color: #006699;
+}
+
+a:hover {
+	text-decoration: underline;
+	color: #006699;
+}
+
+a:active {
+	text-decoration: none;
+	color: #006699;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples-spring/stocklist.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/stocklist.xml b/attic/apps/samples-spring/stocklist.xml
index a5efecc..b464290 100755
--- a/attic/apps/samples-spring/stocklist.xml
+++ b/attic/apps/samples-spring/stocklist.xml
@@ -16,126 +16,126 @@ See the License for the specific language governing permissions and
 limitations under the License.
 
 -->
-<portfolio>
-
-	<stock>
-		<symbol>XOM</symbol>
-		<company>Exxon Mobile Corp</company>
-		<last>61.56</last>
-	</stock>
-
-	<stock>
-		<symbol>WMT</symbol>
-		<company>Wal-Mart Stores</company>
-		<last>45.62</last>
-	</stock>
-
-	<stock>
-		<symbol>GM</symbol>
-		<company>General Motors Corporation</company>
-		<last>19.8</last>
-	</stock>
-
-	<stock>
-		<symbol>CVX</symbol>
-		<company>Chevron Corp New</company>
-		<last>58.95</last>
-	</stock>
-
-	<stock>
-		<symbol>COP</symbol>
-		<company>Conocophillips</company>
-		<last>67.14</last>
-	</stock>
-
-	<stock>
-		<symbol>GE</symbol>
-		<company>General Electric Company</company>
-		<last>33.61</last>
-	</stock>
-
-	<stock>
-		<symbol>C</symbol>
-		<company>Citigroup Inc</company>
-		<last>48.18</last>
-	</stock>
-
-	<stock>
-		<symbol>AIG</symbol>
-		<company>American International Group Inc</company>
-		<last>62.92</last>
-	</stock>
-
-	<stock>
-		<symbol>GOOG</symbol>
-		<company>Google Inc</company>
-		<last>417.93</last>
-	</stock>
-
-	<stock>
-		<symbol>ADBE</symbol>
-		<company>Adobe Systems Incorporated</company>
-		<last>39.20</last>
-	</stock>
-
-	<stock>
-		<symbol>JBLU</symbol>
-		<company>JetBlue Airways Corporation</company>
-		<last>10.57</last>
-	</stock>
-
-	<stock>
-		<symbol>COKE</symbol>
-		<company>Coca-Cola Bottling Co. Consolidated</company>
-		<last>48.20</last>
-	</stock>
-
-	<stock>
-		<symbol>GENZ</symbol>
-		<company>Genzyme Corporation</company>
-		<last>61.16</last>
-	</stock>
-
-	<stock>
-		<symbol>YHOO</symbol>
-		<company>Yahoo Inc.</company>
-		<last>32.78</last>
-	</stock>
-
-	<stock>
-		<symbol>IBM</symbol>
-		<company>International Business Machines Corp.</company>
-		<last>82.34</last>
-	</stock>
-
-	<stock>
-		<symbol>BA</symbol>
-		<company>Boeing Company</company>
-		<last>83.45</last>
-	</stock>
-
-	<stock>
-		<symbol>SAP</symbol>
-		<company>SAP AG</company>
-		<last>54.63</last>
-	</stock>
-
-	<stock>
-		<symbol>MOT</symbol>
-		<company>Motorola, Inc.</company>
-		<last>21.35</last>
-	</stock>
-
-	<stock>
-		<symbol>VZ</symbol>
-		<company>Verizon Communications</company>
-		<last>33.03</last>
-	</stock>
-
-	<stock>
-		<symbol>MCD</symbol>
-		<company>McDonald's Corporation</company>
-		<last>34.57</last>
-	</stock>
-
+<portfolio>
+
+	<stock>
+		<symbol>XOM</symbol>
+		<company>Exxon Mobile Corp</company>
+		<last>61.56</last>
+	</stock>
+
+	<stock>
+		<symbol>WMT</symbol>
+		<company>Wal-Mart Stores</company>
+		<last>45.62</last>
+	</stock>
+
+	<stock>
+		<symbol>GM</symbol>
+		<company>General Motors Corporation</company>
+		<last>19.8</last>
+	</stock>
+
+	<stock>
+		<symbol>CVX</symbol>
+		<company>Chevron Corp New</company>
+		<last>58.95</last>
+	</stock>
+
+	<stock>
+		<symbol>COP</symbol>
+		<company>Conocophillips</company>
+		<last>67.14</last>
+	</stock>
+
+	<stock>
+		<symbol>GE</symbol>
+		<company>General Electric Company</company>
+		<last>33.61</last>
+	</stock>
+
+	<stock>
+		<symbol>C</symbol>
+		<company>Citigroup Inc</company>
+		<last>48.18</last>
+	</stock>
+
+	<stock>
+		<symbol>AIG</symbol>
+		<company>American International Group Inc</company>
+		<last>62.92</last>
+	</stock>
+
+	<stock>
+		<symbol>GOOG</symbol>
+		<company>Google Inc</company>
+		<last>417.93</last>
+	</stock>
+
+	<stock>
+		<symbol>ADBE</symbol>
+		<company>Adobe Systems Incorporated</company>
+		<last>39.20</last>
+	</stock>
+
+	<stock>
+		<symbol>JBLU</symbol>
+		<company>JetBlue Airways Corporation</company>
+		<last>10.57</last>
+	</stock>
+
+	<stock>
+		<symbol>COKE</symbol>
+		<company>Coca-Cola Bottling Co. Consolidated</company>
+		<last>48.20</last>
+	</stock>
+
+	<stock>
+		<symbol>GENZ</symbol>
+		<company>Genzyme Corporation</company>
+		<last>61.16</last>
+	</stock>
+
+	<stock>
+		<symbol>YHOO</symbol>
+		<company>Yahoo Inc.</company>
+		<last>32.78</last>
+	</stock>
+
+	<stock>
+		<symbol>IBM</symbol>
+		<company>International Business Machines Corp.</company>
+		<last>82.34</last>
+	</stock>
+
+	<stock>
+		<symbol>BA</symbol>
+		<company>Boeing Company</company>
+		<last>83.45</last>
+	</stock>
+
+	<stock>
+		<symbol>SAP</symbol>
+		<company>SAP AG</company>
+		<last>54.63</last>
+	</stock>
+
+	<stock>
+		<symbol>MOT</symbol>
+		<company>Motorola, Inc.</company>
+		<last>21.35</last>
+	</stock>
+
+	<stock>
+		<symbol>VZ</symbol>
+		<company>Verizon Communications</company>
+		<last>33.03</last>
+	</stock>
+
+	<stock>
+		<symbol>MCD</symbol>
+		<company>McDonald's Corporation</company>
+		<last>34.57</last>
+	</stock>
+
 </portfolio>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/README.txt
----------------------------------------------------------------------
diff --git a/attic/apps/samples/README.txt b/attic/apps/samples/README.txt
index 714815e..16c2166 100755
--- a/attic/apps/samples/README.txt
+++ b/attic/apps/samples/README.txt
@@ -1,5 +1,5 @@
-All of the files contained in this directory and any subdirectories are 
-considered "Sample Code" under the terms of the end user license agreement 
-that accompanies this product. Please consult such end user license agreement 
-for details about your rights with respect to such files.
-
+All of the files contained in this directory and any subdirectories are 
+considered "Sample Code" under the terms of the end user license agreement 
+that accompanies this product. Please consult such end user license agreement 
+for details about your rights with respect to such files.
+

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/flex-src/dashboard/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/dashboard/build.xml b/attic/apps/samples/WEB-INF/flex-src/dashboard/build.xml
index ed10119..bdeff8c 100755
--- a/attic/apps/samples/WEB-INF/flex-src/dashboard/build.xml
+++ b/attic/apps/samples/WEB-INF/flex-src/dashboard/build.xml
@@ -1,85 +1,85 @@
-<?xml version="1.0"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-<project name="samples.war/build.xml" default="main" basedir="../../../../../">
-    
-    <property environment="env" />
-    <property file="${basedir}/build.properties"/>
-    <property name="samples.war" value="${basedir}/apps/samples"/>
-    <property name="context.root" value="samples" />
-    <property name="application.name" value="Collaborative Dashboard" />
-    <property name="application.file" value="dashboard" />
-    <property name="application.bin.dir" value="${samples.war}/${application.file}" />
-    <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/${application.file}/src" />
-
-    <target name="main" depends="clean,compile-swf" />
-    
-    <target name="compile-swf">
-
-        <taskdef resource="flexTasks.tasks" classpath="${basedir}/ant/lib/flexTasks.jar" />
-        
-        <property name="FLEX_HOME" value="${basedir}"/>
-
-        <mxmlc file="${application.src.dir}/${application.file}.mxml" 
-            output="${application.bin.dir}/${application.file}.swf"
-            actionscript-file-encoding="UTF-8"
-            keep-generated-actionscript="false"
-            incremental="false"
-            services="${samples.war}/WEB-INF/flex/services-config.xml"
-            context-root="${context.root}"
-            locale="en_US">
-            <load-config filename="${basedir}/frameworks/flex-config.xml"/>
-            <license product="flexbuilder3" serial-number="${env.fb3_license}"/>
-            <source-path path-element="${basedir}/frameworks"/>
-            <external-library-path/>
-            <metadata>
-                <publisher name="${manifest.Implementation-Vendor}" />
-                <creator name="${manifest.Implementation-Vendor}" />
-            </metadata>
-        </mxmlc>
-
-        <html-wrapper title="${application.name}"
-            height="100%"
-            width="100%"
-            application="app"
-            swf="${application.file}"
-            version-major="10"
-            version-minor="0"
-            version-revision="0"
-            express-install="true"
-            output="${application.bin.dir}"/>
-
-        <copy todir="${application.bin.dir}">
-            <fileset dir="${application.src.dir}" includes="results.xml"/>
-        </copy>
-        <copy todir="${application.src.dir}">
-            <fileset dir="${basedir}/frameworks/libs" includes="datavisualization.swc" />
-            <fileset dir="${basedir}/frameworks/locale/en_US" includes="datavisualization_rb.swc" />
-        </copy>
-    </target>
-
-    <target name="clean" description="--> Removes jars and classes">
-        <delete quiet="true" includeemptydirs="true">
-            <fileset dir="${application.bin.dir}" includes="*.swf,index.html"/>
-            <fileset dir="${application.bin.dir}/history/" />
-            <fileset dir="${application.src.dir}" includes="datavisualization*.swc"/>
-        </delete>
-    </target>
-
-</project>
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<project name="samples.war/build.xml" default="main" basedir="../../../../../">
+    
+    <property environment="env" />
+    <property file="${basedir}/build.properties"/>
+    <property name="samples.war" value="${basedir}/apps/samples"/>
+    <property name="context.root" value="samples" />
+    <property name="application.name" value="Collaborative Dashboard" />
+    <property name="application.file" value="dashboard" />
+    <property name="application.bin.dir" value="${samples.war}/${application.file}" />
+    <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/${application.file}/src" />
+
+    <target name="main" depends="clean,compile-swf" />
+    
+    <target name="compile-swf">
+
+        <taskdef resource="flexTasks.tasks" classpath="${basedir}/ant/lib/flexTasks.jar" />
+        
+        <property name="FLEX_HOME" value="${basedir}"/>
+
+        <mxmlc file="${application.src.dir}/${application.file}.mxml" 
+            output="${application.bin.dir}/${application.file}.swf"
+            actionscript-file-encoding="UTF-8"
+            keep-generated-actionscript="false"
+            incremental="false"
+            services="${samples.war}/WEB-INF/flex/services-config.xml"
+            context-root="${context.root}"
+            locale="en_US">
+            <load-config filename="${basedir}/frameworks/flex-config.xml"/>
+            <license product="flexbuilder3" serial-number="${env.fb3_license}"/>
+            <source-path path-element="${basedir}/frameworks"/>
+            <external-library-path/>
+            <metadata>
+                <publisher name="${manifest.Implementation-Vendor}" />
+                <creator name="${manifest.Implementation-Vendor}" />
+            </metadata>
+        </mxmlc>
+
+        <html-wrapper title="${application.name}"
+            height="100%"
+            width="100%"
+            application="app"
+            swf="${application.file}"
+            version-major="10"
+            version-minor="0"
+            version-revision="0"
+            express-install="true"
+            output="${application.bin.dir}"/>
+
+        <copy todir="${application.bin.dir}">
+            <fileset dir="${application.src.dir}" includes="results.xml"/>
+        </copy>
+        <copy todir="${application.src.dir}">
+            <fileset dir="${basedir}/frameworks/libs" includes="datavisualization.swc" />
+            <fileset dir="${basedir}/frameworks/locale/en_US" includes="datavisualization_rb.swc" />
+        </copy>
+    </target>
+
+    <target name="clean" description="--> Removes jars and classes">
+        <delete quiet="true" includeemptydirs="true">
+            <fileset dir="${application.bin.dir}" includes="*.swf,index.html"/>
+            <fileset dir="${application.bin.dir}/history/" />
+            <fileset dir="${application.src.dir}" includes="datavisualization*.swc"/>
+        </delete>
+    </target>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/012fad7c/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RegionBreakdown.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RegionBreakdown.mxml b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RegionBreakdown.mxml
index 487238c..b2f25a8 100755
--- a/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RegionBreakdown.mxml
+++ b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RegionBreakdown.mxml
@@ -1,176 +1,176 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-<mx:Panel xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns="*">
-    <fx:Metadata>
-        [Event("regionChange")]
-    </fx:Metadata>
-    
-    <fx:Script>
-        <![CDATA[
-        import mx.charts.HitData;
-
-        public function set month(m:Object):void
-        {
-        	_month = m;
-        	this.title = "Regional Breakdown [" + _month.name + "]";
-    	}
-
-		[Bindable]
-		private var _month:Object;
-
-        private function getSliceLabel(item:Object, arg2:String, arg3:Number, arg4:Number):String
-        {
-            return item==null?"":item.name;
-        }
-
-		private var _selectedRegion:Object;
-		
-        public function get selectedRegion():Object
-        {
-            return _selectedRegion;
-        }
-        
-        public function set selectedRegion(item:Object):void
-        {
-            _selectedRegion = item;
-
-            var index:int = -1;
-            for (var i:int=0; i < _month.region.length && index == -1; i++)
-            {
-                if (_month.region[i].name == item.name)
-                    index = i;
-            }
-            //we only want to explode the selected region
-            var explodeData:Array = [];
-            explodeData[index] = 0.15;
-            pcRegion.series[0].perWedgeExplodeRadius = explodeData;
-        }
-        
-        private function regionChange(item:Object):void
-        {
-            selectedRegion = item;
-            dispatchEvent(new Event("regionChange"));
-        }
-
-        private function dataGridCurrencyFormat(item:Object, column:Object):String
-        {
-            return cf.format(item[column.dataField]);
-        }
-
-        private function formatDataTip(hitData:HitData):String
-        {
-            var name:String = hitData.item.name;
-            var revenue:Number = hitData.item.revenue;
-            return "<b>Region: "+name+"</b><br>Revenue: "+cf.format(revenue);
-        }
-
-        ]]>
-
-    </fx:Script>
-
-    <fx:Declarations>
-    	<mx:CurrencyFormatter id="cf"/>
-
-    	<mx:SeriesInterpolate id="interpolate" elementOffset="10"/>
-    </fx:Declarations>
-
-    <mx:ViewStack id="vs" width="100%" height="100%">
-    
-        <mx:VBox width="100%" height="100%"  icon="@Embed('icon_chart.png')" toolTip="View in Chart" 
-            hideEffect="Fade" showEffect="Fade">
-            <mx:PieChart id="pcRegion" dataProvider="{_month.region}" showDataTips="true" width="100%" height="100%"
-                itemClick="regionChange(event.hitData.item)"
-                dataTipFunction="formatDataTip">
-
-                <mx:series>
-                    <fx:Array>
-                        <mx:PieSeries field="revenue" nameField="name" labelPosition="callout"
-                                      labelFunction="getSliceLabel" showDataEffect="{interpolate}">
-                         <mx:fills>
-	                        <fx:Array>
-	                            <mx:RadialGradient>
-	                                <mx:entries>
-	                                    <fx:Array>
-	                                        <mx:GradientEntry color="#EF7651" ratio="0"/>
-	                                        <mx:GradientEntry color="#994C34" ratio="1"/>
-	                                    </fx:Array>
-	                                </mx:entries>
-	                            </mx:RadialGradient>
-	                            <mx:RadialGradient>
-	                                <mx:entries>
-	                                    <fx:Array>
-	                                        <mx:GradientEntry color="#E9C836" ratio="0"/>
-	                                        <mx:GradientEntry color="#AA9127" ratio="1"/>
-	                                    </fx:Array>
-	                                </mx:entries>
-	                            </mx:RadialGradient>
-	                            <mx:RadialGradient>
-	                                <mx:entries>
-	                                    <fx:Array>
-	                                        <mx:GradientEntry color="#6FB35F" ratio="0"/>
-	                                        <mx:GradientEntry color="#497B54" ratio="1"/>
-	                                    </fx:Array>
-	                                </mx:entries>
-	                            </mx:RadialGradient>
-	                            <mx:RadialGradient>
-	                                <mx:entries>
-	                                    <fx:Array>
-	                                        <mx:GradientEntry color="#A1AECF" ratio="0"/>
-	                                        <mx:GradientEntry color="#47447A" ratio="1"/>
-	                                    </fx:Array>
-	                                </mx:entries>
-	                            </mx:RadialGradient>
-	                            <mx:RadialGradient>
-	                                <mx:entries>
-	                                    <fx:Array>
-	                                        <mx:GradientEntry color="#BA9886" ratio="0"/>
-	                                        <mx:GradientEntry color="#AE775B" ratio="1"/>
-	                                    </fx:Array>
-	                                </mx:entries>
-	                            </mx:RadialGradient>
-	                        </fx:Array>
-	                    </mx:fills>
-	                    </mx:PieSeries>
-                    </fx:Array>
-                </mx:series>
-
-            </mx:PieChart>
-        </mx:VBox>
-
-        <mx:VBox width="100%" height="100%" icon="@Embed('icon_grid.png')" toolTip="View in Grid"
-            hideEffect="Fade" showEffect="Fade">
-            <mx:DataGrid dataProvider="{_month.region}" width="100%" height="100%"
-            	change="regionChange(DataGrid(event.target).selectedItem)">
-                <mx:columns>
-                    <fx:Array>
-                        <mx:DataGridColumn dataField="name" headerText="Region"/>
-                        <mx:DataGridColumn dataField="revenue" headerText="Revenue" labelFunction="dataGridCurrencyFormat" />
-                    </fx:Array>
-                </mx:columns>
-            </mx:DataGrid>
-        </mx:VBox>
-
-    </mx:ViewStack>
-
-    <mx:ControlBar>
-        <mx:ToggleButtonBar dataProvider="{vs}"/>
-    </mx:ControlBar>
-
-</mx:Panel>
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<mx:Panel xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns="*">
+    <fx:Metadata>
+        [Event("regionChange")]
+    </fx:Metadata>
+    
+    <fx:Script>
+        <![CDATA[
+        import mx.charts.HitData;
+
+        public function set month(m:Object):void
+        {
+        	_month = m;
+        	this.title = "Regional Breakdown [" + _month.name + "]";
+    	}
+
+		[Bindable]
+		private var _month:Object;
+
+        private function getSliceLabel(item:Object, arg2:String, arg3:Number, arg4:Number):String
+        {
+            return item==null?"":item.name;
+        }
+
+		private var _selectedRegion:Object;
+		
+        public function get selectedRegion():Object
+        {
+            return _selectedRegion;
+        }
+        
+        public function set selectedRegion(item:Object):void
+        {
+            _selectedRegion = item;
+
+            var index:int = -1;
+            for (var i:int=0; i < _month.region.length && index == -1; i++)
+            {
+                if (_month.region[i].name == item.name)
+                    index = i;
+            }
+            //we only want to explode the selected region
+            var explodeData:Array = [];
+            explodeData[index] = 0.15;
+            pcRegion.series[0].perWedgeExplodeRadius = explodeData;
+        }
+        
+        private function regionChange(item:Object):void
+        {
+            selectedRegion = item;
+            dispatchEvent(new Event("regionChange"));
+        }
+
+        private function dataGridCurrencyFormat(item:Object, column:Object):String
+        {
+            return cf.format(item[column.dataField]);
+        }
+
+        private function formatDataTip(hitData:HitData):String
+        {
+            var name:String = hitData.item.name;
+            var revenue:Number = hitData.item.revenue;
+            return "<b>Region: "+name+"</b><br>Revenue: "+cf.format(revenue);
+        }
+
+        ]]>
+
+    </fx:Script>
+
+    <fx:Declarations>
+    	<mx:CurrencyFormatter id="cf"/>
+
+    	<mx:SeriesInterpolate id="interpolate" elementOffset="10"/>
+    </fx:Declarations>
+
+    <mx:ViewStack id="vs" width="100%" height="100%">
+    
+        <mx:VBox width="100%" height="100%"  icon="@Embed('icon_chart.png')" toolTip="View in Chart" 
+            hideEffect="Fade" showEffect="Fade">
+            <mx:PieChart id="pcRegion" dataProvider="{_month.region}" showDataTips="true" width="100%" height="100%"
+                itemClick="regionChange(event.hitData.item)"
+                dataTipFunction="formatDataTip">
+
+                <mx:series>
+                    <fx:Array>
+                        <mx:PieSeries field="revenue" nameField="name" labelPosition="callout"
+                                      labelFunction="getSliceLabel" showDataEffect="{interpolate}">
+                         <mx:fills>
+	                        <fx:Array>
+	                            <mx:RadialGradient>
+	                                <mx:entries>
+	                                    <fx:Array>
+	                                        <mx:GradientEntry color="#EF7651" ratio="0"/>
+	                                        <mx:GradientEntry color="#994C34" ratio="1"/>
+	                                    </fx:Array>
+	                                </mx:entries>
+	                            </mx:RadialGradient>
+	                            <mx:RadialGradient>
+	                                <mx:entries>
+	                                    <fx:Array>
+	                                        <mx:GradientEntry color="#E9C836" ratio="0"/>
+	                                        <mx:GradientEntry color="#AA9127" ratio="1"/>
+	                                    </fx:Array>
+	                                </mx:entries>
+	                            </mx:RadialGradient>
+	                            <mx:RadialGradient>
+	                                <mx:entries>
+	                                    <fx:Array>
+	                                        <mx:GradientEntry color="#6FB35F" ratio="0"/>
+	                                        <mx:GradientEntry color="#497B54" ratio="1"/>
+	                                    </fx:Array>
+	                                </mx:entries>
+	                            </mx:RadialGradient>
+	                            <mx:RadialGradient>
+	                                <mx:entries>
+	                                    <fx:Array>
+	                                        <mx:GradientEntry color="#A1AECF" ratio="0"/>
+	                                        <mx:GradientEntry color="#47447A" ratio="1"/>
+	                                    </fx:Array>
+	                                </mx:entries>
+	                            </mx:RadialGradient>
+	                            <mx:RadialGradient>
+	                                <mx:entries>
+	                                    <fx:Array>
+	                                        <mx:GradientEntry color="#BA9886" ratio="0"/>
+	                                        <mx:GradientEntry color="#AE775B" ratio="1"/>
+	                                    </fx:Array>
+	                                </mx:entries>
+	                            </mx:RadialGradient>
+	                        </fx:Array>
+	                    </mx:fills>
+	                    </mx:PieSeries>
+                    </fx:Array>
+                </mx:series>
+
+            </mx:PieChart>
+        </mx:VBox>
+
+        <mx:VBox width="100%" height="100%" icon="@Embed('icon_grid.png')" toolTip="View in Grid"
+            hideEffect="Fade" showEffect="Fade">
+            <mx:DataGrid dataProvider="{_month.region}" width="100%" height="100%"
+            	change="regionChange(DataGrid(event.target).selectedItem)">
+                <mx:columns>
+                    <fx:Array>
+                        <mx:DataGridColumn dataField="name" headerText="Region"/>
+                        <mx:DataGridColumn dataField="revenue" headerText="Revenue" labelFunction="dataGridCurrencyFormat" />
+                    </fx:Array>
+                </mx:columns>
+            </mx:DataGrid>
+        </mx:VBox>
+
+    </mx:ViewStack>
+
+    <mx:ControlBar>
+        <mx:ToggleButtonBar dataProvider="{vs}"/>
+    </mx:ControlBar>
+
+</mx:Panel>


Mime
View raw message