You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cd...@apache.org on 2015/08/04 11:51:39 UTC
[01/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Repository: flex-blazeds
Updated Branches:
refs/heads/4.8.0 95f7f472c -> 752297593
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/dcd/product/ProductService.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/dcd/product/ProductService.java b/attic/apps/samples/WEB-INF/src/flex/samples/dcd/product/ProductService.java
new file mode 100755
index 0000000..8288767
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/dcd/product/ProductService.java
@@ -0,0 +1,197 @@
+/*
+ * 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.
+ */
+package flex.samples.dcd.product;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.sql.*;
+import flex.samples.ConnectionHelper;
+import flex.samples.DAOException;
+import java.util.Iterator;
+
+public class ProductService {
+
+ public Product[] getProducts() throws DAOException {
+
+ List list = new ArrayList();
+ Connection c = null;
+
+ try {
+ c = ConnectionHelper.getConnection();
+ Statement s = c.createStatement();
+ ResultSet rs = s.executeQuery("SELECT * FROM product ORDER BY name");
+ while (rs.next()) {
+ list.add(new Product(rs.getInt("product_id"),
+ rs.getString("name"),
+ rs.getString("description"),
+ rs.getString("image"),
+ rs.getString("category"),
+ rs.getDouble("price"),
+ rs.getInt("qty_in_stock")));
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ throw new DAOException(e);
+ } finally {
+ ConnectionHelper.close(c);
+ }
+ Product[] products = new Product[list.size()];
+ Iterator i = list.iterator();
+ int index = 0;
+ while(i.hasNext()) {
+ products[index] = (Product)i.next();
+ index++;
+ }
+ return products;
+ }
+
+ public List getProductsByName(String name) throws DAOException {
+
+ List list = new ArrayList();
+ Connection c = null;
+
+ try {
+ c = ConnectionHelper.getConnection();
+ PreparedStatement ps = c.prepareStatement("SELECT * FROM product WHERE UPPER(name) LIKE ? ORDER BY name");
+ ps.setString(1, "%" + name.toUpperCase() + "%");
+ ResultSet rs = ps.executeQuery();
+ while (rs.next()) {
+ list.add(new Product(rs.getInt("product_id"),
+ rs.getString("name"),
+ rs.getString("description"),
+ rs.getString("image"),
+ rs.getString("category"),
+ rs.getDouble("price"),
+ rs.getInt("qty_in_stock")));
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ throw new DAOException(e);
+ } finally {
+ ConnectionHelper.close(c);
+ }
+ return list;
+
+ }
+
+ public Product getProduct(int productId) throws DAOException {
+
+ Product product = new Product();
+ Connection c = null;
+
+ try {
+ c = ConnectionHelper.getConnection();
+ PreparedStatement ps = c.prepareStatement("SELECT * FROM product WHERE product_id=?");
+ ps.setInt(1, productId);
+ ResultSet rs = ps.executeQuery();
+ if (rs.next()) {
+ product = new Product();
+ product.setProductId(rs.getInt("product_id"));
+ product.setName(rs.getString("name"));
+ product.setDescription(rs.getString("description"));
+ product.setImage(rs.getString("image"));
+ product.setCategory(rs.getString("category"));
+ product.setPrice(rs.getDouble("price"));
+ product.setQtyInStock(rs.getInt("qty_in_stock"));
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new DAOException(e);
+ } finally {
+ ConnectionHelper.close(c);
+ }
+ return product;
+ }
+
+ public Product createProduct(Product product) throws DAOException {
+
+ Connection c = null;
+ PreparedStatement ps = null;
+ try {
+ c = ConnectionHelper.getConnection();
+ ps = c.prepareStatement("INSERT INTO product (name, description, image, category, price, qty_in_stock) VALUES (?, ?, ?, ?, ?, ?)");
+ ps.setString(1, product.getName());
+ ps.setString(2, product.getDescription());
+ ps.setString(3, product.getImage());
+ ps.setString(4, product.getCategory());
+ ps.setDouble(5, product.getPrice());
+ ps.setInt(6, product.getQtyInStock());
+ ps.executeUpdate();
+ Statement s = c.createStatement();
+ // HSQLDB Syntax to get the identity (company_id) of inserted row
+ ResultSet rs = s.executeQuery("CALL IDENTITY()");
+ // MySQL Syntax to get the identity (product_id) of inserted row
+ // ResultSet rs = s.executeQuery("SELECT LAST_INSERT_ID()");
+ rs.next();
+ // Update the id in the returned object. This is important as this value must get returned to the client.
+ product.setProductId(rs.getInt(1));
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new DAOException(e);
+ } finally {
+ ConnectionHelper.close(c);
+ }
+ return product;
+ }
+
+ public void updateProduct(Product product) throws DAOException {
+
+ Connection c = null;
+
+ try {
+ c = ConnectionHelper.getConnection();
+ PreparedStatement ps = c.prepareStatement("UPDATE product SET name=?, description=?, image=?, category=?, price=?, qty_in_stock=? WHERE product_id=?");
+ ps.setString(1, product.getName());
+ ps.setString(2, product.getDescription());
+ ps.setString(3, product.getImage());
+ ps.setString(4, product.getCategory());
+ ps.setDouble(5, product.getPrice());
+ ps.setInt(6, product.getQtyInStock());
+ ps.setInt(7, product.getProductId());
+ ps.executeUpdate();
+ } catch (SQLException e) {
+ e.printStackTrace();
+ throw new DAOException(e);
+ } finally {
+ ConnectionHelper.close(c);
+ }
+
+ }
+
+ private boolean remove(Product product) throws DAOException {
+
+ Connection c = null;
+
+ try {
+ c = ConnectionHelper.getConnection();
+ PreparedStatement ps = c.prepareStatement("DELETE FROM product WHERE product_id=?");
+ ps.setInt(1, product.getProductId());
+ int count = ps.executeUpdate();
+ return (count == 1);
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new DAOException(e);
+ } finally {
+ ConnectionHelper.close(c);
+ }
+ }
+
+ public boolean deleteProduct(Product product) throws DAOException {
+ return remove(product);
+ }
+
+}
\ No newline at end of file
[29/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java b/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java
deleted file mode 100755
index df61b32..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java
+++ /dev/null
@@ -1,106 +0,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.
- */
-package flex.samples.crm.employee;
-
-import flex.samples.crm.company.Company;
-
-public class Employee
-{
- private int employeeId;
-
- private String firstName;
-
- private String lastName;
-
- private String title;
-
- private String email;
-
- private String phone;
-
- private Company company;
-
- public String getEmail()
- {
- return email;
- }
-
- public void setEmail(String email)
- {
- this.email = email;
- }
-
- public int getEmployeeId()
- {
- return employeeId;
- }
-
- public void setEmployeeId(int employeeId)
- {
- this.employeeId = employeeId;
- }
-
- public String getFirstName()
- {
- return firstName;
- }
-
- public void setFirstName(String firstName)
- {
- this.firstName = firstName;
- }
-
- public String getLastName()
- {
- return lastName;
- }
-
- public void setLastName(String lastName)
- {
- this.lastName = lastName;
- }
-
- public String getPhone()
- {
- return phone;
- }
-
- public void setPhone(String phone)
- {
- this.phone = phone;
- }
-
- public String getTitle()
- {
- return title;
- }
-
- public void setTitle(String title)
- {
- this.title = title;
- }
-
- public Company getCompany()
- {
- return company;
- }
-
- public void setCompany(Company company)
- {
- this.company = company;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/crm/employee/EmployeeDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/crm/employee/EmployeeDAO.java b/apps/samples/WEB-INF/src/flex/samples/crm/employee/EmployeeDAO.java
deleted file mode 100755
index c165016..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/crm/employee/EmployeeDAO.java
+++ /dev/null
@@ -1,300 +0,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.
- */
-package flex.samples.crm.employee;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.Statement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Types;
-import java.util.ArrayList;
-import java.util.List;
-
-import flex.samples.ConnectionHelper;
-import flex.samples.DAOException;
-import flex.samples.crm.ConcurrencyException;
-import flex.samples.crm.company.Company;
-
-public class EmployeeDAO
-{
- public List getEmployees() throws DAOException
- {
- List list = new ArrayList();
- Connection c = null;
- try
- {
- c = ConnectionHelper.getConnection();
- Statement s = c.createStatement();
- ResultSet rs = s.executeQuery("SELECT * FROM employee ORDER BY last_name");
- Employee employee;
- while (rs.next())
- {
- employee = new Employee();
- employee.setEmployeeId(rs.getInt("employee_id"));
- employee.setFirstName(rs.getString("first_name"));
- employee.setLastName(rs.getString("last_name"));
- employee.setTitle(rs.getString("title"));
- employee.setEmail(rs.getString("email"));
- employee.setPhone(rs.getString("phone"));
- Company company = new Company();
- company.setCompanyId(rs.getInt("company_id"));
- employee.setCompany(company);
- list.add(employee);
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e);
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- return list;
- }
-
- public List findEmployeesByCompany(Integer companyId) throws DAOException
- {
- List list = new ArrayList();
- Connection c = null;
- try
- {
- Company company = new Company();
- company.setCompanyId(companyId.intValue());
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("SELECT * FROM employee WHERE company_id = ? ORDER BY last_name");
- ps.setInt(1, companyId.intValue());
- ResultSet rs = ps.executeQuery();
- while (rs.next())
- {
- Employee employee = new Employee();
- employee.setEmployeeId(rs.getInt("employee_id"));
- employee.setFirstName(rs.getString("first_name"));
- employee.setLastName(rs.getString("last_name"));
- employee.setTitle(rs.getString("title"));
- employee.setEmail(rs.getString("email"));
- employee.setPhone(rs.getString("phone"));
- employee.setCompany(company);
- list.add(employee);
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e);
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- return list;
- }
-
- public List findEmployeesByName(String name) throws DAOException
- {
- List list = new ArrayList();
- Connection c = null;
-
- try
- {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("SELECT * FROM employee WHERE first_name LIKE ? OR last_name LIKE ? ORDER BY last_name");
- ps.setString(1, "%" + name + "%");
- ps.setString(2, "%" + name + "%");
- ResultSet rs = ps.executeQuery();
-
- Employee employee;
- while (rs.next())
- {
- employee = new Employee();
- employee.setEmployeeId(rs.getInt("employee_id"));
- employee.setFirstName(rs.getString("first_name"));
- employee.setLastName(rs.getString("last_name"));
- employee.setTitle(rs.getString("title"));
- employee.setEmail(rs.getString("email"));
- employee.setPhone(rs.getString("phone"));
- Company company = new Company();
- company.setCompanyId(rs.getInt("company_id"));
-
- list.add(employee);
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e);
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- return list;
- }
-
- public Employee getEmployee(int employeeId) throws DAOException
- {
- Employee employee = null;
- Connection c = null;
-
- try
- {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("SELECT * FROM employee WHERE employee_id= ?");
- ps.setInt(1, employeeId);
- ResultSet rs = ps.executeQuery();
-
- if (rs.next())
- {
- employee = new Employee();
- employee.setEmployeeId(rs.getInt("employee_id"));
- employee.setFirstName(rs.getString("first_name"));
- employee.setLastName(rs.getString("last_name"));
- employee.setTitle(rs.getString("title"));
- employee.setEmail(rs.getString("email"));
- employee.setPhone(rs.getString("phone"));
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e.getMessage());
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- return employee;
- }
-
- public Employee createEmployee(Employee employee) throws DAOException
- {
- Connection c = null;
- PreparedStatement ps = null;
- try
- {
- c = ConnectionHelper.getConnection();
- ps = c.prepareStatement("INSERT INTO employee (first_name, last_name, title, email, phone, company_id) VALUES (?, ?, ?, ?, ?, ?)");
- ps.setString(1, employee.getFirstName());
- ps.setString(2, employee.getLastName());
- ps.setString(3, employee.getTitle());
- ps.setString(4, employee.getEmail());
- ps.setString(5, employee.getPhone());
- if (employee.getCompany() != null)
- ps.setInt(6, employee.getCompany().getCompanyId());
- else
- ps.setNull(6, Types.INTEGER);
- ps.execute();
- ps.close();
- Statement s = c.createStatement();
- // HSQLDB Syntax to get the identity (employee_id) of inserted row
- ResultSet rs = s.executeQuery("CALL IDENTITY()");
- rs.next();
- // Update the id in the returned object. This is important as this
- // value must get returned to the client.
- employee.setEmployeeId(rs.getInt(1));
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e);
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- return employee;
- }
-
-
- public void updateEmployee(Employee newVersion, Employee previousVersion, List changes) throws DAOException, ConcurrencyException
- {
- Connection c = null;
- try
- {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("UPDATE employee SET first_name=?, last_name=?, title=?, email=?, phone=?, company_id=? WHERE employee_id=? AND first_name=? AND last_name=? AND title=? AND email=? AND phone=? AND company_id=?");
- ps.setString(1, newVersion.getFirstName());
- ps.setString(2, newVersion.getLastName());
- ps.setString(3, newVersion.getTitle());
- ps.setString(4, newVersion.getEmail());
- ps.setString(5, newVersion.getPhone());
- if (newVersion.getCompany() != null)
- ps.setInt(6, newVersion.getCompany().getCompanyId());
- else
- ps.setNull(6,Types.INTEGER);
- ps.setInt(7, newVersion.getEmployeeId());
- ps.setString(8, previousVersion.getFirstName());
- ps.setString(9, previousVersion.getLastName());
- ps.setString(10, previousVersion.getTitle());
- ps.setString(11, previousVersion.getEmail());
- ps.setString(12, previousVersion.getPhone());
- if (previousVersion.getCompany() != null)
- ps.setInt(13, previousVersion.getCompany().getCompanyId());
- else
- ps.setNull(13, Types.INTEGER);
- if (ps.executeUpdate() == 0)
- {
- throw new ConcurrencyException("Item not found");
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e.getMessage());
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- }
-
- public void deleteEmployee(Employee employee) throws DAOException, ConcurrencyException
- {
- Connection c = null;
- try
- {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("DELETE FROM employee WHERE employee_id=? AND first_name=? AND last_name=? AND title=? AND email=? AND phone=? AND company_id=?");
- ps.setInt(1, employee.getEmployeeId());
- ps.setString(2, employee.getFirstName());
- ps.setString(3, employee.getLastName());
- ps.setString(4, employee.getTitle());
- ps.setString(5, employee.getEmail());
- ps.setString(6, employee.getPhone());
- if (employee.getCompany() != null)
- ps.setInt(7, employee.getCompany().getCompanyId());
- else
- ps.setNull(7, Types.INTEGER);
- if (ps.executeUpdate() == 0)
- {
- throw new ConcurrencyException("Item not found");
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e.getMessage());
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/dcd/product/Product.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/dcd/product/Product.java b/apps/samples/WEB-INF/src/flex/samples/dcd/product/Product.java
deleted file mode 100755
index d46544e..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/dcd/product/Product.java
+++ /dev/null
@@ -1,89 +0,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.
- */
-package flex.samples.dcd.product;
-import java.io.Serializable;
-
-public class Product implements Serializable {
-
- static final long serialVersionUID = 103844514947365244L;
-
- private int productId;
- private String name;
- private String description;
- private String image;
- private String category;
- private double price;
- private int qtyInStock;
-
- public Product() {
-
- }
-
- public Product(int productId, String name, String description, String image, String category, double price, int qtyInStock) {
- this.productId = productId;
- this.name = name;
- this.description = description;
- this.image = image;
- this.category = category;
- this.price = price;
- this.qtyInStock = qtyInStock;
- }
-
- public String getCategory() {
- return category;
- }
- public void setCategory(String category) {
- this.category = category;
- }
- public String getDescription() {
- return description;
- }
- public void setDescription(String description) {
- this.description = description;
- }
- public String getImage() {
- return image;
- }
- public void setImage(String image) {
- this.image = image;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public double getPrice() {
- return price;
- }
- public void setPrice(double price) {
- this.price = price;
- }
- public int getProductId() {
- return productId;
- }
- public void setProductId(int productId) {
- this.productId = productId;
- }
- public int getQtyInStock() {
- return qtyInStock;
- }
- public void setQtyInStock(int qtyInStock) {
- this.qtyInStock = qtyInStock;
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/dcd/product/ProductService.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/dcd/product/ProductService.java b/apps/samples/WEB-INF/src/flex/samples/dcd/product/ProductService.java
deleted file mode 100755
index dcf1ba9..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/dcd/product/ProductService.java
+++ /dev/null
@@ -1,197 +0,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.
- */
-package flex.samples.dcd.product;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.sql.*;
-import flex.samples.ConnectionHelper;
-import flex.samples.DAOException;
-import java.util.Iterator;
-
-public class ProductService {
-
- public Product[] getProducts() throws DAOException {
-
- List list = new ArrayList();
- Connection c = null;
-
- try {
- c = ConnectionHelper.getConnection();
- Statement s = c.createStatement();
- ResultSet rs = s.executeQuery("SELECT * FROM product ORDER BY name");
- while (rs.next()) {
- list.add(new Product(rs.getInt("product_id"),
- rs.getString("name"),
- rs.getString("description"),
- rs.getString("image"),
- rs.getString("category"),
- rs.getDouble("price"),
- rs.getInt("qty_in_stock")));
- }
- } catch (SQLException e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
- Product[] products = new Product[list.size()];
- Iterator i = list.iterator();
- int index = 0;
- while(i.hasNext()) {
- products[index] = (Product)i.next();
- index++;
- }
- return products;
- }
-
- public List getProductsByName(String name) throws DAOException {
-
- List list = new ArrayList();
- Connection c = null;
-
- try {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("SELECT * FROM product WHERE UPPER(name) LIKE ? ORDER BY name");
- ps.setString(1, "%" + name.toUpperCase() + "%");
- ResultSet rs = ps.executeQuery();
- while (rs.next()) {
- list.add(new Product(rs.getInt("product_id"),
- rs.getString("name"),
- rs.getString("description"),
- rs.getString("image"),
- rs.getString("category"),
- rs.getDouble("price"),
- rs.getInt("qty_in_stock")));
- }
- } catch (SQLException e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
- return list;
-
- }
-
- public Product getProduct(int productId) throws DAOException {
-
- Product product = new Product();
- Connection c = null;
-
- try {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("SELECT * FROM product WHERE product_id=?");
- ps.setInt(1, productId);
- ResultSet rs = ps.executeQuery();
- if (rs.next()) {
- product = new Product();
- product.setProductId(rs.getInt("product_id"));
- product.setName(rs.getString("name"));
- product.setDescription(rs.getString("description"));
- product.setImage(rs.getString("image"));
- product.setCategory(rs.getString("category"));
- product.setPrice(rs.getDouble("price"));
- product.setQtyInStock(rs.getInt("qty_in_stock"));
- }
- } catch (Exception e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
- return product;
- }
-
- public Product createProduct(Product product) throws DAOException {
-
- Connection c = null;
- PreparedStatement ps = null;
- try {
- c = ConnectionHelper.getConnection();
- ps = c.prepareStatement("INSERT INTO product (name, description, image, category, price, qty_in_stock) VALUES (?, ?, ?, ?, ?, ?)");
- ps.setString(1, product.getName());
- ps.setString(2, product.getDescription());
- ps.setString(3, product.getImage());
- ps.setString(4, product.getCategory());
- ps.setDouble(5, product.getPrice());
- ps.setInt(6, product.getQtyInStock());
- ps.executeUpdate();
- Statement s = c.createStatement();
- // HSQLDB Syntax to get the identity (company_id) of inserted row
- ResultSet rs = s.executeQuery("CALL IDENTITY()");
- // MySQL Syntax to get the identity (product_id) of inserted row
- // ResultSet rs = s.executeQuery("SELECT LAST_INSERT_ID()");
- rs.next();
- // Update the id in the returned object. This is important as this value must get returned to the client.
- product.setProductId(rs.getInt(1));
- } catch (Exception e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
- return product;
- }
-
- public void updateProduct(Product product) throws DAOException {
-
- Connection c = null;
-
- try {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("UPDATE product SET name=?, description=?, image=?, category=?, price=?, qty_in_stock=? WHERE product_id=?");
- ps.setString(1, product.getName());
- ps.setString(2, product.getDescription());
- ps.setString(3, product.getImage());
- ps.setString(4, product.getCategory());
- ps.setDouble(5, product.getPrice());
- ps.setInt(6, product.getQtyInStock());
- ps.setInt(7, product.getProductId());
- ps.executeUpdate();
- } catch (SQLException e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
-
- }
-
- private boolean remove(Product product) throws DAOException {
-
- Connection c = null;
-
- try {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("DELETE FROM product WHERE product_id=?");
- ps.setInt(1, product.getProductId());
- int count = ps.executeUpdate();
- return (count == 1);
- } catch (Exception e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
- }
-
- public boolean deleteProduct(Product product) throws DAOException {
- return remove(product);
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/feed/Feed.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/feed/Feed.java b/apps/samples/WEB-INF/src/flex/samples/feed/Feed.java
deleted file mode 100755
index 5f31a28..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/feed/Feed.java
+++ /dev/null
@@ -1,85 +0,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.
- */
-package flex.samples.feed;
-
-import java.util.*;
-import flex.messaging.MessageBroker;
-import flex.messaging.messages.AsyncMessage;
-import flex.messaging.util.UUIDUtils;
-
-public class Feed {
- private static FeedThread thread;
-
- public Feed() {
- }
-
- public void start() {
- if (thread == null) {
- thread = new FeedThread();
- thread.start();
- }
- }
-
- public void stop() {
- thread.running = false;
- thread = null;
- }
-
- public static class FeedThread extends Thread {
-
- public boolean running = true;
-
- public void run() {
- MessageBroker msgBroker = MessageBroker.getMessageBroker(null);
- String clientID = UUIDUtils.createUUID();
-
- Random random = new Random();
- double initialValue = 35;
- double currentValue = 35;
- double maxChange = initialValue * 0.005;
-
- while (running) {
- double change = maxChange - random.nextDouble() * maxChange * 2;
- double newValue = currentValue + change;
-
- if (currentValue < initialValue + initialValue * 0.15
- && currentValue > initialValue - initialValue * 0.15) {
- currentValue = newValue;
- } else {
- currentValue -= change;
- }
-
- AsyncMessage msg = new AsyncMessage();
- msg.setDestination("feed");
- msg.setClientId(clientID);
- msg.setMessageId(UUIDUtils.createUUID());
- msg.setTimestamp(System.currentTimeMillis());
- msg.setBody(new Double(currentValue));
- msgBroker.routeMessageToService(msg, null);
-
- System.out.println("" + currentValue);
-
- try {
- Thread.sleep(300);
- } catch (InterruptedException e) {
- }
-
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/marketdata/Feed.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/marketdata/Feed.java b/apps/samples/WEB-INF/src/flex/samples/marketdata/Feed.java
deleted file mode 100755
index 19e7247..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/marketdata/Feed.java
+++ /dev/null
@@ -1,121 +0,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.
- */
-package flex.samples.marketdata;
-
-import java.util.*;
-
-import flex.messaging.MessageBroker;
-import flex.messaging.messages.AsyncMessage;
-import flex.messaging.util.UUIDUtils;
-
-public class Feed {
-
- public static void main(String args[]) {
- Feed feed = new Feed();
- feed.start();
- }
-
- private static FeedThread thread;
-
- public Feed() {
- }
-
- public void start() {
- if (thread == null) {
- thread = new FeedThread();
- thread.start();
- }
- }
-
- public void stop() {
- thread.running = false;
- thread = null;
- }
-
- public static class FeedThread extends Thread {
-
- public boolean running = true;
-
- private Random random;
-
- public void run() {
-
- MessageBroker msgBroker = MessageBroker.getMessageBroker(null);
- String clientID = UUIDUtils.createUUID();
-
- Portfolio portfolio = new Portfolio();
- List stocks = portfolio.getStocks();
- int size = stocks.size();
- int index = 0;
-
- random = new Random();
-
- Stock stock;
-
- while (running) {
-
- stock = (Stock) stocks.get(index);
- simulateChange(stock);
-
- index++;
- if (index >= size) {
- index = 0;
- }
-
- AsyncMessage msg = new AsyncMessage();
- msg.setDestination("market-data-feed");
- msg.setHeader("DSSubtopic", stock.getSymbol());
- msg.setClientId(clientID);
- msg.setMessageId(UUIDUtils.createUUID());
- msg.setTimestamp(System.currentTimeMillis());
- msg.setBody(stock);
- msgBroker.routeMessageToService(msg, null);
-
- try {
- Thread.sleep(20);
- } catch (InterruptedException e) {
- }
-
- }
- }
-
- private void simulateChange(Stock stock) {
-
- double maxChange = stock.open * 0.005;
- double change = maxChange - random.nextDouble() * maxChange * 2;
- stock.change = change;
- double last = stock.last + change;
-
- if (last < stock.open + stock.open * 0.15
- && last > stock.open - stock.open * 0.15) {
- stock.last = last;
- } else {
- stock.last = stock.last - change;
- }
-
- if (stock.last > stock.high) {
- stock.high = stock.last;
- } else if (stock.last < stock.low) {
- stock.low = stock.last;
- }
- stock.date = new Date();
-
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/marketdata/Portfolio.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/marketdata/Portfolio.java b/apps/samples/WEB-INF/src/flex/samples/marketdata/Portfolio.java
deleted file mode 100755
index 250dc10..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/marketdata/Portfolio.java
+++ /dev/null
@@ -1,75 +0,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.
- */
-package flex.samples.marketdata;
-
-import java.io.*;
-import java.net.URLDecoder;
-
-import javax.xml.parsers.*;
-import org.w3c.dom.*;
-import java.util.List;
-import java.util.ArrayList;
-
-public class Portfolio {
-
- public static void main(String[] args) {
- Portfolio stockFeed = new Portfolio();
- stockFeed.getStocks();
- }
-
- public List getStocks() {
-
- List list = new ArrayList();
-
- try {
- InputStream is = getClass().getClassLoader().getResourceAsStream("flex/samples/marketdata/portfolio.xml");
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- Document doc = factory.newDocumentBuilder().parse(is);
- NodeList stockNodes = doc.getElementsByTagName("stock");
- int length = stockNodes.getLength();
- Stock stock;
- Node stockNode;
- for (int i=0; i<length; i++) {
- stockNode = stockNodes.item(i);
- stock = new Stock();
- stock.setSymbol( getStringValue(stockNode, "symbol") );
- stock.setName( getStringValue(stockNode, "company") );
- stock.setLast( getDoubleValue(stockNode, "last") );
- stock.setHigh( stock.getLast() );
- stock.setLow( stock.getLast() );
- stock.setOpen( stock.getLast() );
- stock.setChange( 0 );
- list.add(stock);
- System.out.println(stock.getSymbol());
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- return list;
- }
-
- private String getStringValue(Node node, String name) {
- return ((Element) node).getElementsByTagName(name).item(0).getFirstChild().getNodeValue();
- }
-
- private double getDoubleValue(Node node, String name) {
- return Double.parseDouble( getStringValue(node, name) );
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/marketdata/Stock.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/marketdata/Stock.java b/apps/samples/WEB-INF/src/flex/samples/marketdata/Stock.java
deleted file mode 100755
index 6e4b9ee..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/marketdata/Stock.java
+++ /dev/null
@@ -1,84 +0,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.
- */
-package flex.samples.marketdata;
-
-import java.util.Date;
-import java.io.Serializable;
-
-public class Stock implements Serializable {
-
- private static final long serialVersionUID = -8334804402463267285L;
-
- protected String symbol;
- protected String name;
- protected double low;
- protected double high;
- protected double open;
- protected double last;
- protected double change;
- protected Date date;
-
- public double getChange() {
- return change;
- }
- public void setChange(double change) {
- this.change = change;
- }
- public double getHigh() {
- return high;
- }
- public void setHigh(double high) {
- this.high = high;
- }
- public double getLast() {
- return last;
- }
- public void setLast(double last) {
- this.last = last;
- }
- public double getLow() {
- return low;
- }
- public void setLow(double low) {
- this.low = low;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public double getOpen() {
- return open;
- }
- public void setOpen(double open) {
- this.open = open;
- }
- public String getSymbol() {
- return symbol;
- }
- public void setSymbol(String symbol) {
- this.symbol = symbol;
- }
- public Date getDate() {
- return date;
- }
- public void setDate(Date date) {
- this.date = date;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/marketdata/portfolio.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/marketdata/portfolio.xml b/apps/samples/WEB-INF/src/flex/samples/marketdata/portfolio.xml
deleted file mode 100755
index b464290..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/marketdata/portfolio.xml
+++ /dev/null
@@ -1,141 +0,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.
-
--->
-<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/75229759/apps/samples/WEB-INF/src/flex/samples/product/Product.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/product/Product.java b/apps/samples/WEB-INF/src/flex/samples/product/Product.java
deleted file mode 100755
index 7e3c87d..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/product/Product.java
+++ /dev/null
@@ -1,89 +0,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.
- */
-package flex.samples.product;
-import java.io.Serializable;
-
-public class Product implements Serializable {
-
- static final long serialVersionUID = 103844514947365244L;
-
- private int productId;
- private String name;
- private String description;
- private String image;
- private String category;
- private double price;
- private int qtyInStock;
-
- public Product() {
-
- }
-
- public Product(int productId, String name, String description, String image, String category, double price, int qtyInStock) {
- this.productId = productId;
- this.name = name;
- this.description = description;
- this.image = image;
- this.category = category;
- this.price = price;
- this.qtyInStock = qtyInStock;
- }
-
- public String getCategory() {
- return category;
- }
- public void setCategory(String category) {
- this.category = category;
- }
- public String getDescription() {
- return description;
- }
- public void setDescription(String description) {
- this.description = description;
- }
- public String getImage() {
- return image;
- }
- public void setImage(String image) {
- this.image = image;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public double getPrice() {
- return price;
- }
- public void setPrice(double price) {
- this.price = price;
- }
- public int getProductId() {
- return productId;
- }
- public void setProductId(int productId) {
- this.productId = productId;
- }
- public int getQtyInStock() {
- return qtyInStock;
- }
- public void setQtyInStock(int qtyInStock) {
- this.qtyInStock = qtyInStock;
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/product/ProductService.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/product/ProductService.java b/apps/samples/WEB-INF/src/flex/samples/product/ProductService.java
deleted file mode 100755
index 8e0a816..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/product/ProductService.java
+++ /dev/null
@@ -1,191 +0,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.
- */
-package flex.samples.product;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.sql.*;
-
-import flex.samples.ConnectionHelper;
-import flex.samples.DAOException;
-
-public class ProductService {
-
- public List getProducts() throws DAOException {
-
- List list = new ArrayList();
- Connection c = null;
-
- try {
- c = ConnectionHelper.getConnection();
- Statement s = c.createStatement();
- ResultSet rs = s.executeQuery("SELECT * FROM product ORDER BY name");
- while (rs.next()) {
- list.add(new Product(rs.getInt("product_id"),
- rs.getString("name"),
- rs.getString("description"),
- rs.getString("image"),
- rs.getString("category"),
- rs.getDouble("price"),
- rs.getInt("qty_in_stock")));
- }
- } catch (SQLException e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
- return list;
-
- }
-
- public List getProductsByName(String name) throws DAOException {
-
- List list = new ArrayList();
- Connection c = null;
-
- try {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("SELECT * FROM product WHERE UPPER(name) LIKE ? ORDER BY name");
- ps.setString(1, "%" + name.toUpperCase() + "%");
- ResultSet rs = ps.executeQuery();
- while (rs.next()) {
- list.add(new Product(rs.getInt("product_id"),
- rs.getString("name"),
- rs.getString("description"),
- rs.getString("image"),
- rs.getString("category"),
- rs.getDouble("price"),
- rs.getInt("qty_in_stock")));
- }
- } catch (SQLException e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
- return list;
-
- }
-
- public Product getProduct(int productId) throws DAOException {
-
- Product product = new Product();
- Connection c = null;
-
- try {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("SELECT * FROM product WHERE product_id=?");
- ps.setInt(1, productId);
- ResultSet rs = ps.executeQuery();
- if (rs.next()) {
- product = new Product();
- product.setProductId(rs.getInt("product_id"));
- product.setName(rs.getString("name"));
- product.setDescription(rs.getString("description"));
- product.setImage(rs.getString("image"));
- product.setCategory(rs.getString("category"));
- product.setPrice(rs.getDouble("price"));
- product.setQtyInStock(rs.getInt("qty_in_stock"));
- }
- } catch (Exception e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
- return product;
- }
-
- public Product create(Product product) throws DAOException {
-
- Connection c = null;
- PreparedStatement ps = null;
- try {
- c = ConnectionHelper.getConnection();
- ps = c.prepareStatement("INSERT INTO product (name, description, image, category, price, qty_in_stock) VALUES (?, ?, ?, ?, ?, ?)");
- ps.setString(1, product.getName());
- ps.setString(2, product.getDescription());
- ps.setString(3, product.getImage());
- ps.setString(4, product.getCategory());
- ps.setDouble(5, product.getPrice());
- ps.setInt(6, product.getQtyInStock());
- ps.executeUpdate();
- Statement s = c.createStatement();
- // HSQLDB Syntax to get the identity (company_id) of inserted row
- ResultSet rs = s.executeQuery("CALL IDENTITY()");
- // MySQL Syntax to get the identity (product_id) of inserted row
- // ResultSet rs = s.executeQuery("SELECT LAST_INSERT_ID()");
- rs.next();
- // Update the id in the returned object. This is important as this value must get returned to the client.
- product.setProductId(rs.getInt(1));
- } catch (Exception e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
- return product;
- }
-
- public boolean update(Product product) throws DAOException {
-
- Connection c = null;
-
- try {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("UPDATE product SET name=?, description=?, image=?, category=?, price=?, qty_in_stock=? WHERE product_id=?");
- ps.setString(1, product.getName());
- ps.setString(2, product.getDescription());
- ps.setString(3, product.getImage());
- ps.setString(4, product.getCategory());
- ps.setDouble(5, product.getPrice());
- ps.setInt(6, product.getQtyInStock());
- ps.setInt(7, product.getProductId());
- return (ps.executeUpdate() == 1);
- } catch (SQLException e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
-
- }
-
- public boolean remove(Product product) throws DAOException {
-
- Connection c = null;
-
- try {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("DELETE FROM product WHERE product_id=?");
- ps.setInt(1, product.getProductId());
- int count = ps.executeUpdate();
- return (count == 1);
- } catch (Exception e) {
- e.printStackTrace();
- throw new DAOException(e);
- } finally {
- ConnectionHelper.close(c);
- }
- }
-
- public boolean delete(Product product) throws DAOException {
- return remove(product);
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/qos/CustomDelayQueueProcessor.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/qos/CustomDelayQueueProcessor.java b/apps/samples/WEB-INF/src/flex/samples/qos/CustomDelayQueueProcessor.java
deleted file mode 100755
index 3841e2a..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/qos/CustomDelayQueueProcessor.java
+++ /dev/null
@@ -1,121 +0,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.
- */
-package flex.samples.qos;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import flex.messaging.client.FlexClient;
-import flex.messaging.client.FlexClientOutboundQueueProcessor;
-import flex.messaging.client.FlushResult;
-import flex.messaging.config.ConfigMap;
-import flex.messaging.MessageClient;
-
-/**
- * Per client queue processor that applies custom quality of services parameters (in this case: delay).
- * Custom quality of services parameters are read from the client FlexClient instance.
- * In this sample, these parameters are set in the FlexClient instance by the client application
- * using the flex.samples.qos.FlexClientConfigService RemoteObject.
- *
- * This class is used in the channel definition (see services-config.xml)that the 'market-data-feed'
- * message destination (see messaging-config.xml) references.
- *
- * Each client that connects to this channel's endpoint gets a unique instance of this class to manage
- * its specific outbound queue of messages.
- */
-public class CustomDelayQueueProcessor extends FlexClientOutboundQueueProcessor
-{
- /**
- * Used to store the last time this queue was flushed.
- * Starts off with an initial value of the construct time for the instance.
- */
- private long lastFlushTime = System.currentTimeMillis();
-
- /**
- * Driven by configuration, this is the configurable delay time between flushes.
- */
- private int delayTimeBetweenFlushes;
-
- public CustomDelayQueueProcessor() {
- }
-
- /**
- * Sets up the default delay time between flushes. This default is used if a client-specific
- * value has not been set in the FlexClient instance.
- *
- * @param properties A ConfigMap containing any custom initialization properties.
- */
- public void initialize(ConfigMap properties)
- {
- delayTimeBetweenFlushes = properties.getPropertyAsInt("flush-delay", -1);
- if (delayTimeBetweenFlushes < 0)
- throw new RuntimeException("Flush delay time for DelayedDeliveryQueueProcessor must be a positive value.");
- }
-
- /**
- * This flush implementation delays flushing messages from the queue until 3 seconds
- * have passed since the last flush.
- *
- * @param outboundQueue The queue of outbound messages.
- * @return An object containing the messages that have been removed from the outbound queue
- * to be written to the network and a wait time for the next flush of the outbound queue
- * that is the default for the underlying Channel/Endpoint.
- */
- public FlushResult flush(List outboundQueue)
- {
- int delay = delayTimeBetweenFlushes;
- // Read custom delay from client's FlexClient instance
- FlexClient flexClient = getFlexClient();
- if (flexClient != null)
- {
- Object obj = flexClient.getAttribute("market-data-delay");
- if (obj != null)
- {
- try {
- delay = Integer.parseInt((String) obj);
- } catch (NumberFormatException ignore) {
- }
- }
- }
-
- long currentTime = System.currentTimeMillis();
- if ((currentTime - lastFlushTime) < delay)
- {
- // Delaying flush. No messages will be returned at this point
- FlushResult flushResult = new FlushResult();
- // Don't return any messages to flush.
- // And request that the next flush doesn't occur until 3 seconds since the previous.
- flushResult.setNextFlushWaitTimeMillis((int)(delay - (currentTime - lastFlushTime)));
- return flushResult;
- }
- else // OK to flush.
- {
- // Flushing. All queued messages will now be returned
- lastFlushTime = currentTime;
- FlushResult flushResult = new FlushResult();
- flushResult.setNextFlushWaitTimeMillis(delay);
- flushResult.setMessages(new ArrayList(outboundQueue));
- outboundQueue.clear();
- return flushResult;
- }
- }
-
- public FlushResult flush(MessageClient client, List outboundQueue) {
- return super.flush(client, outboundQueue);
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/qos/FlexClientConfigService.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/qos/FlexClientConfigService.java b/apps/samples/WEB-INF/src/flex/samples/qos/FlexClientConfigService.java
deleted file mode 100755
index c66d46b..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/qos/FlexClientConfigService.java
+++ /dev/null
@@ -1,74 +0,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.
- */
-package flex.samples.qos;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-
-import flex.messaging.FlexContext;
-import flex.messaging.client.FlexClient;
-
-public class FlexClientConfigService
-{
-
- public void setAttribute(String name, Object value)
- {
- FlexClient flexClient = FlexContext.getFlexClient();
- flexClient.setAttribute(name, value);
- }
-
- public List getAttributes()
- {
- FlexClient flexClient = FlexContext.getFlexClient();
- List attributes = new ArrayList();
- Enumeration attrNames = flexClient.getAttributeNames();
- while (attrNames.hasMoreElements())
- {
- String attrName = (String) attrNames.nextElement();
- attributes.add(new Attribute(attrName, flexClient.getAttribute(attrName)));
- }
-
- return attributes;
-
- }
-
- public class Attribute {
-
- private String name;
- private Object value;
-
- public Attribute(String name, Object value) {
- this.name = name;
- this.value = value;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public Object getValue() {
- return value;
- }
- public void setValue(Object value) {
- this.value = value;
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/runtimeconfig/ChatRoomService.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/runtimeconfig/ChatRoomService.java b/apps/samples/WEB-INF/src/flex/samples/runtimeconfig/ChatRoomService.java
deleted file mode 100755
index 9e83da5..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/runtimeconfig/ChatRoomService.java
+++ /dev/null
@@ -1,81 +0,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.
- */
-package flex.samples.runtimeconfig;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import flex.messaging.MessageBroker;
-import flex.messaging.MessageDestination;
-//import flex.messaging.config.ServerSettings;
-import flex.messaging.services.MessageService;
-
-/**
- * Simplistic implementation of a chat room management service. Clients can add rooms,
- * and obtain a list of rooms. The interesting part of this example is the "on-the-fly"
- * creation of a message destination. The same technique can be used to create DataService
- * and Remoting destinations.
- */
-public class ChatRoomService {
-
- private List rooms;
-
- public ChatRoomService()
- {
- rooms = Collections.synchronizedList(new ArrayList());
- }
-
- public List getRoomList()
- {
- return rooms;
- }
-
- public void createRoom(String id) {
-
- if (roomExists(id))
- {
- throw new RuntimeException("Room already exists");
- }
-
- // Create a new Message destination dynamically
- String serviceId = "message-service";
- MessageBroker broker = MessageBroker.getMessageBroker(null);
- MessageService service = (MessageService) broker.getService(serviceId);
- MessageDestination destination = (MessageDestination) service.createDestination(id);
-
- if (service.isStarted())
- {
- destination.start();
- }
-
- rooms.add(id);
-
- }
-
- public boolean roomExists(String id)
- {
- int size = rooms.size();
- for (int i=0; i<size; i++)
- {
- if ( ((String)rooms.get(i)).equals(id) )
- {
- return true;
- }
- }
- return false;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/runtimeconfig/EmployeeRuntimeRemotingDestination.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/runtimeconfig/EmployeeRuntimeRemotingDestination.java b/apps/samples/WEB-INF/src/flex/samples/runtimeconfig/EmployeeRuntimeRemotingDestination.java
deleted file mode 100755
index 4624eba..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/runtimeconfig/EmployeeRuntimeRemotingDestination.java
+++ /dev/null
@@ -1,54 +0,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.
- */
-package flex.samples.runtimeconfig;
-
-import flex.messaging.config.ConfigMap;
-import flex.messaging.services.AbstractBootstrapService;
-import flex.messaging.services.RemotingService;
-import flex.messaging.services.remoting.RemotingDestination;
-
-public class EmployeeRuntimeRemotingDestination extends AbstractBootstrapService
-{
- private RemotingService remotingService;
-
- /**
- * This method is called by FDS when FDS has been initialized but not started.
- */
- public void initialize(String id, ConfigMap properties)
- {
- remotingService = (RemotingService) getMessageBroker().getService("remoting-service");
- RemotingDestination destination = (RemotingDestination) remotingService.createDestination(id);
- destination.setSource("flex.samples.crm.employee.EmployeeDAO");
- }
-
- /**
- * This method is called by FDS as FDS starts up (after initialization).
- */
- public void start()
- {
- // No-op
- }
-
- /**
- * This method is called by FDS as FDS shuts down.
- */
- public void stop()
- {
- // No-op
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/web.xml b/apps/samples/WEB-INF/web.xml
deleted file mode 100755
index 0a97d59..0000000
--- a/apps/samples/WEB-INF/web.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-<?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.
-
--->
-
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
- <display-name>BlazeDS Samples</display-name>
- <description>BlazeDS Sample Application</description>
-
- <!-- Http Flex Session attribute and binding listener support -->
- <listener>
- <listener-class>flex.messaging.HttpFlexSession</listener-class>
- </listener>
-
- <!-- MessageBroker Servlet -->
- <servlet>
- <servlet-name>MessageBrokerServlet</servlet-name>
- <display-name>MessageBrokerServlet</display-name>
- <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
- <init-param>
- <param-name>services.configuration.file</param-name>
- <param-value>/WEB-INF/flex/services-config.xml</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>MessageBrokerServlet</servlet-name>
- <url-pattern>/messagebroker/*</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list>
- <welcome-file>index.htm</welcome-file>
- </welcome-file-list>
-
- <!-- for WebSphere deployment, please uncomment -->
- <!--
- <resource-ref>
- <description>Flex Messaging WorkManager</description>
- <res-ref-name>wm/MessagingWorkManager</res-ref-name>
- <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
- -->
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/build.xml b/apps/samples/build.xml
deleted file mode 100755
index 609d314..0000000
--- a/apps/samples/build.xml
+++ /dev/null
@@ -1,168 +0,0 @@
-<?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 file="${basedir}/build.properties"/>
- <property name="samples.war" value="${basedir}/apps/samples"/>
- <property name="dist.dir" value="${basedir}/dist"/>
- <property name="src.dir" value="${samples.war}/WEB-INF/src"/>
- <property name="classes.dir" value="${samples.war}/WEB-INF/classes"/>
- <property name="context.root" value="samples" />
-
- <path id="classpath">
- <fileset dir="${samples.war}/WEB-INF/lib" includes="**/*.jar"/>
- <pathelement location="${servlet.jar}"/>
- <pathelement location="${jms.jar}"/>
- </path>
-
- <target name="main" depends="clean,samples"/>
- <target name="samples" depends="prepare,copy-resources,compile"/>
-
- <target name="prepare">
- <mkdir dir="${samples.war}/WEB-INF/lib"/>
- <mkdir dir="${samples.war}/WEB-INF/classes"/>
- </target>
-
- <target name="copy-resources">
- <fail unless="local.sdk.lib.dir" message="must specify local.sdk.lib.dir in server/build.properties"/>
- <fail unless="local.sdk.frameworks.dir" message="must specify local.sdk.frameworks.dir in build.properties"/>
-
- <!-- copy to the lib directory -->
- <copy todir="${samples.war}/WEB-INF/lib">
- <fileset dir="${basedir}/lib" includes="${webapp.lib}" />
- <fileset file="${hsqldb.jar}" />
- </copy>
-
- <!-- copy to sampledb directory -->
- <copy todir="${basedir}/sampledb">
- <fileset file="${hsqldb.jar}" />
- </copy>
-
- <!-- copy to the classes directory -->
- <copy todir="${samples.war}/WEB-INF/classes">
- <fileset dir="${samples.war}/WEB-INF/src">
- <include name="**/*.xml"/>
- </fileset>
- <fileset dir="${basedir}/lib" includes="${webapp.classes}"/>
- </copy>
-
- <!-- create version.properties -->
- <propertyfile file="${samples.war}/WEB-INF/flex/version.properties">
- <entry key="build" value="${manifest.Implementation-Version}.${build.number}"/>
- <entry key="minimumSDKVersion" value="${min.sdk.version}"/>
- </propertyfile>
-
- </target>
-
- <target name="run-depend" if="src.depend">
- <echo message="Removing class files that changed and dependent class files."/>
- <depend cache="${classes.dir}" srcdir="${src.dir}" destdir="${classes.dir}"/>
- </target>
-
- <target name="compile" depends="prepare,run-depend,copy-resources" description="compile">
- <javac source="1.4" debug="${src.debug}" destdir="${classes.dir}" srcdir="${src.dir}" classpathref="classpath"/>
- </target>
-
- <target name="compile-swfs">
- <property name="samples.src.dir" value="${samples.war}/WEB-INF/flex-src" />
-
- <ant antfile="${samples.src.dir}/dashboard/build.xml" />
- <ant antfile="${samples.src.dir}/runtimeconfig-messaging/build.xml" />
- <ant antfile="${samples.src.dir}/runtimeconfig-remoting/build.xml" />
- <ant antfile="${samples.src.dir}/testdrive-101/build.xml" />
- <ant antfile="${samples.src.dir}/testdrive-chat/build.xml" />
- <ant antfile="${samples.src.dir}/testdrive-datapush/build.xml" />
- <ant antfile="${samples.src.dir}/testdrive-httpservice/build.xml" />
- <ant antfile="${samples.src.dir}/testdrive-remoteobject/build.xml" />
- <ant antfile="${samples.src.dir}/testdrive-update/build.xml" />
- <ant antfile="${samples.src.dir}/testdrive-webservice/build.xml" />
- <ant antfile="${samples.src.dir}/traderdesktop/build.xml" />
- <ant antfile="${samples.src.dir}/inventory/build.xml" />
-
- </target>
-
- <target name="package" depends="compile-swfs" description=" Creates distribution war file">
-
- <mkdir dir="${dist.dir}"/>
-
- <!--
- we don't want flex source naked in WEB-INF as that would lead to overlapping eclipse projects
- instead, zip it up and then put it in the war
- -->
- <zip destfile="${samples.war}/WEB-INF/flex-src/flex-src.zip"
- comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label} Samples Flex Source Code">
- <fileset dir="${samples.war}/WEB-INF/flex-src"
- excludes="**/build*.xml,flex-src.zip"/>
- </zip>
-
- <war file="${dist.dir}/samples.war"
- webxml="${samples.war}/WEB-INF/web.xml">
- <manifest>
- <attribute name="Sealed" value="${manifest.sealed}"/>
- <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Samples Application"/>
- <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
- <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
- </manifest>
- <fileset dir="${samples.war}" >
- <exclude name="**/**/build*.xml" />
- <exclude name="**/generated/**/*"/>
- <exclude name="WEB-INF/jsp/**/*" />
- <exclude name="WEB-INF/sessions/**/*" />
- <exclude name="WEB-INF/flex-src/**/*" />
- <!-- This is included in the war task already -->
- <exclude name="WEB-INF/web.xml" />
- </fileset>
- <fileset dir="${samples.war}" includes="WEB-INF/flex-src/flex-src.zip" />
- </war>
-
- <copy todir="${dist.dir}/sampledb">
- <fileset dir="${basedir}/sampledb" />
- <fileset file="${hsqldb.jar}" />
- </copy>
-
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true" includeEmptyDirs="true">
- <fileset dir="${samples.war}/WEB-INF/lib" includes="${webapp.lib},${webtier.lib},${hsqldb.jar}"/>
- <fileset dir="${samples.war}/WEB-INF/flex/jars" includes="**/*"/>
- <fileset dir="${samples.war}/WEB-INF/flex/locale" includes="**/*"/>
- <fileset dir="${samples.war}/WEB-INF/flex/libs" includes="**/*"/>
- <fileset dir="${samples.war}/WEB-INF/flex" includes="version.properties"/>
- <fileset dir="${classes.dir}" includes="**/*.class"/>
- <fileset dir="${basedir}/sampledb" includes="${hsqldb.jar}"/>
- <fileset file="${dist.dir}/samples.war"/>
- <fileset file="${samples.war}/WEB-INF/flex-src/flex-src.zip"/>
- <fileset dir="${samples.war}/sqladmin"/>
- <fileset dir="${classes.dir}"/>
- </delete>
- </target>
-
- <target name="generated-clean">
- <delete includeEmptyDirs="true" quiet="true">
- <fileset dir="${samples.war}" includes="**/generated/*" />
- </delete>
- <delete includeEmptyDirs="true" quiet="true">
- <fileset dir="${samples.war}" includes="**/generated" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/fb-project-setup.htm
----------------------------------------------------------------------
diff --git a/apps/samples/fb-project-setup.htm b/apps/samples/fb-project-setup.htm
deleted file mode 100755
index ddc387c..0000000
--- a/apps/samples/fb-project-setup.htm
+++ /dev/null
@@ -1,67 +0,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.
--->
-<!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>BlazeDS Flex Builder Integration</title>
-<link href="main.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-
-<h1>Opening the Samples Source Code in Flex Builder 3</h1>
-<h3>Unziping the samples source code </h3>
-<ol>
- <li>Locate <strong>flex-src.zip</strong> in the <strong>WEB-INF\flex-src</strong> directory of the samples web application. For example, on a typical Windows installation using the Tomcat integrated server, flex-src.zip is located in C:\blazeds\tomcat\webapps\samples\WEB-INF\flex-src.</li>
- <li>Unzip flex-src.zip to the root folder of your Flex Builder workspace.</li>
-</ol>
-<h3>Creating Flex Builder projects </h3>
-<p>Create a Flex Builder project for each sample application you are interested in. There are several approaches to create a Flex Builder project for a Flex application that works with BlazeDS. We describe a simple approach here:</p>
-<ol>
- <li>Select <strong>File>New>Project…</strong> in the Flex Builder menu.</li>
- <li> Expand Flex Builder, select <strong>Flex Project</strong> and click Next.</li>
- <li> Provide a project name. Use the exact name of the sample folder. For example testdrive-httpservice.</li>
- <li> If you unzipped flex-src.zip in the root folder of your Flex Builder workspace, keep the <strong>use default location</strong> checkbox checked.</li>
- <li> Select <strong>Web Application</strong> as the application type.</li>
- <li> Select <strong>Java</strong> as the application server type.</li>
- <li> Check use <strong>remote object access service</strong>.</li>
- <li> Uncheck Create combined Java/Flex project using WTP. <strong>Note</strong> this checkbox will only exist if the Eclipse WTP feature is installed.</li>
- <li> Click <strong>Next</strong>.</li>
- <li> Make sure the root folder for LiveCycle Data Services matches the root folder of your BlazeDS web application. If you are using the Tomcat integrated server on Windows, the settings should look similar to this (you may need to adjust the exact folder based on your own settings):</li>
- <blockquote>
- <p>Root Folder: C:\blazeds\tomcat\webapps\samples<br />
- Root URL: <a href="http://localhost:8400/lcds-samples/">http://localhost:8400/samples/</a><br />
- Context Root: /samples</p>
- </blockquote>
- <li>Click <strong>Validate Configuration</strong>, then <strong>Finish</strong>.</li>
-</ol>
-<h3>Adding a linked resource to the server configuration files</h3>
-<p>While working on the client-side of your applications, you may need to look at or change the BlazeDS server-side configuration. For example, you may need to look at existing destinations or create a new one. You can create a linked resource inside a Flex Builder project to make the BlazeDS configuration files easily accessible.</p>
-<p>To create a linked resource to the BlazeDS configuration files: </p>
-<ol>
- <li>Right-click the project name in the project navigation view. </li>
- <li>Select <strong>New>Folder</strong> in the popup menu.</li>
- <li>Specify the name of the folder as it will appear in the navigation view. This name can be different from the name of the folder in the file system. For example type <strong>server-config</strong>. </li>
- <li>Click the <strong>Advanced</strong> button.</li>
- <li>Check <strong>Link to folder in the file system</strong>.</li>
- <li>Click the <strong>Browse</strong> button and select the <strong>flex</strong> folder under the <strong>WEB-INF</strong> directory of your web application. For example, on a typical Windows installation using the Tomcat integrated server, select C:\blazeds\tomcat\webapps\samples\WEB-INF\flex. </li>
- <li>Click <strong>Finish</strong>. The BlazeDS configuration files are now available in your Flex Builder project under the server-config folder. </li>
-</ol>
-
-<p> </p>
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/images/blazeds.png
----------------------------------------------------------------------
diff --git a/apps/samples/images/blazeds.png b/apps/samples/images/blazeds.png
deleted file mode 100755
index 669d4c9..0000000
Binary files a/apps/samples/images/blazeds.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/index.htm
----------------------------------------------------------------------
diff --git a/apps/samples/index.htm b/apps/samples/index.htm
deleted file mode 100755
index e12ec93..0000000
--- a/apps/samples/index.htm
+++ /dev/null
@@ -1,101 +0,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.
--->
-<!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>BlazeDS Samples</title>
-<link href="main.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-
-<h1><img src="images/blazeds.png" width="100" height="105" /></h1>
-<h1>BlazeDS Samples </h1>
-<div class="highlight">
-<h3>Starting the Samples Database </h3>
-<p>You have to <strong>start the sample database</strong> before you can run the BlazeDS samples. The samples use an HSQLDB database that located in the [installdir]/sampledb directory.</p>
-<p>To start the sample database:</p>
-<ol>
- <li>Open a command prompt and go to the [installdir]/sampledb</li>
- <li>Run startdb.bat (Windows) or startdb.sh (Unix-based systems)</li>
-</ol>
-</div>
-<h2>Source Code</h2>
-<p>The source code for all the sample applications is available in samples\WEB-INF\flex-src\flex-src.zip. </p>
-<ul>
- <li>If you want to examine the source code using your favorite code editor, unzip <strong>flex-src.zip</strong> anywhere on your file system. </li>
- <li>If you want to work with and compile the sample applications in <strong>Flash Builder</strong>, read <a href="fb-project-setup.htm">these instructions</a> to set up your Flash Builder projects. </li>
-</ul>
-
-<h2>30 Minute Test Drive</h2>
-<p>The objective of this test drive is to give you, in a very short amount of time, an understanding of how the BlazeDS data services work and what they can do.
-This test drive consists of a series of eight samples kept as concise as possible (typically between 10 and 50 lines of code) to clearly expose features of interest. </p>
-
-<p><a href="testdrive.htm">Take the test drive</a></p>
-
-<h2>Other Samples</h2>
-<ul>
-<li><a href="#inventory">Inventory Management</a></li>
-<li><a href="#traderdesktop">Trader Desktop</a></li>
-<li><a href="#dashboard">Collaboration Dashboard</a></li>
-<li><a href="#runtimeconfig">Runtime Configuration</a></li>
-</ul>
-
-<div class="item">
-<a name="inventory"></a>
-<h3>Inventory Management</h3>
-<p>This application demonstrates how to use the RemoteObject to build a simple CRUD (Create/Update/Delete) application.</p>
-<p>Click <a href="inventory/index.html">here</a> to start the Inventory Management application</p>
-</div>
-
-<div class="item">
-<a name="traderdesktop"></a>
-<h3>Trader Desktop </h3>
-<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 market data to a BlazeDS messaging destination. The Trader Desktop application subscribes to real time updates for the stocks specified in a configurable watch list. This application lets you experiment with different types of channels (streaming, polling) supported by BlazeDS as well as a channel that uses adaptive polling. Using adaptive polling (using a per client outbound message queue processor), you have full control over how messages are handled by queue processors and delivered to individual clients. For example you can specify per-client delays for message delivery, and provide custom logic defining how messages are merged between deliveries.</p>
-<ol>
- <li>Click <a href="traderdesktop/startfeed.jsp">here</a> to start the feed</li>
- <li>Click <a href="traderdesktop/index.html">here</a> to start the Trader Desktop application</li>
- <li>Click <a href="traderdesktop/stopfeed.jsp">here</a> to stop the feed</li>
-</ol>
-</div>
-
-
-<div class="item">
-<a name="dashboard"></a>
-<h3>Collaboration Dashboard</h3>
-<p>The Collaboration Dashboard show how you can use the Message Service to build collaborative applications. To try this sample, open the application in two different browser windows
-and notice how selections made in one window are reflected in the other window. For example, the chart on the left shows total revenue across all regions on a monthly basis.
-When you select a month in this chart, the pie chart in the upper right panel is updated to display a regional breakdown for the selected month.
-If you select a region in the pie chart, the chart in the lower-right panel is updated to display the selected region's results compared to the average for the given time period.</p>
-<p><a href="dashboard/index.html">Run the sample </a></p>
-</div>
-
-<div class="item">
-<a name="runtimeconfig"></a>
-<h3>Runtime Configuration </h3>
-<p>Runtime configuration provides an alternative approach to defining destinations and adapters. In addition to statically defining destinations and adapters in the XML configuration files (remoting-config.xml and messaging-config.xml), you can create destinations and adapters programmatically at runtime. Your runtime destinations and adapters can be injected at server startup, or created as needed during the life cycle of an application. The remoting destination samples provide examples of destinations injected at server startup. The messaging sample provides an example of a destination created as needed. </p>
-<h4>Remoting destination </h4>
-<p><a href="runtimeconfig-remoting/index.html">Run the sample</a> </p>
-<p>See flex.samples.runtimeconfig.EmployeeRuntimeRemotingDestination.java to see how the "runtime-employee-ro" destination is created programmatically.</p>
-<h4>Messaging destination </h4>
-<p><a href="runtimeconfig-messaging/index.html">Run the sample</a> </p>
-<p>See flex.samples.runtimeconfig.ChatRoomService.java to see how the chat room destinations are created programmatically.</p>
-</div>
-
-<p>© 2004-2010 Adobe Systems Incorporated. All rights reserved. </p>
-</body>
-</html>
\ No newline at end of file
[40/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/src/Contact.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/src/Contact.as b/apps/samples-spring/WEB-INF/flex-src/insync04/src/Contact.as
deleted file mode 100755
index 003b0e0..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/src/Contact.as
+++ /dev/null
@@ -1,35 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- [Bindable]
- [RemoteClass(alias="org.springframework.flex.samples.contact.Contact")]
- public class Contact
- {
- public var id:int;
- public var firstName:String;
- public var lastName:String;
- public var email:String;
- public var phone:String;
- public var address:String;
- public var city:String;
- public var state:String;
- public var zip:String;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/src/ContactForm.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/src/ContactForm.mxml b/apps/samples-spring/WEB-INF/flex-src/insync04/src/ContactForm.mxml
deleted file mode 100755
index fe7587b..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/src/ContactForm.mxml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?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:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
- label="{contact.firstName+' '+contact.lastName}">
-
- <fx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
- import mx.controls.Alert;
-
- [Bindable] public var contact:Contact;
-
- private function save():void
- {
- contact.firstName = firstName.text;
- contact.lastName = lastName.text;
- contact.email = email.text;
- contact.phone = phone.text;
- contact.address = address.text;
- contact.city = city.text;
- contact.state = state.text;
- contact.zip = zip.text;
- ro.update(contact);
- }
-
- private function update_resultHandler(event:ResultEvent):void
- {
- Alert.show("Contact " + contact.id + " updated successfully");
- }
-
- private function deleteItem():void
- {
- ro.remove(contact);
- closeItem();
- }
-
- private function closeItem():void
- {
- parent.removeChild(this);
- }
-
- private function remove_resultHandler(event:ResultEvent):void
- {
- contact = null;
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <mx:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <mx:method name="update" result="update_resultHandler(event)"/>
- <mx:method name="remove" result="remove_resultHandler(event)"/>
- </mx:RemoteObject>
- </fx:Declarations>
-
- <mx:Form>
- <mx:FormItem label="Id">
- <mx:TextInput text="{contact.id}" enabled="false"/>
- </mx:FormItem>
- <mx:FormItem label="First Name">
- <mx:TextInput id="firstName" text="{contact.firstName}"/>
- </mx:FormItem>
- <mx:FormItem label="Last Name">
- <mx:TextInput id="lastName" text="{contact.lastName}"/>
- </mx:FormItem>
- <mx:FormItem label="Email">
- <mx:TextInput id="email" text="{contact.email}"/>
- </mx:FormItem>
- <mx:FormItem label="Phone">
- <mx:TextInput id="phone" text="{contact.phone}"/>
- </mx:FormItem>
- <mx:FormItem label="Address">
- <mx:TextInput id="address" text="{contact.address}"/>
- </mx:FormItem>
- <mx:FormItem label="City">
- <mx:TextInput id="city" text="{contact.city}"/>
- </mx:FormItem>
- <mx:FormItem label="State">
- <mx:TextInput id="state" text="{contact.state}"/>
- </mx:FormItem>
- <mx:FormItem label="Zip">
- <mx:TextInput id="zip" text="{contact.zip}"/>
- </mx:FormItem>
- </mx:Form>
-
- <s:HGroup left="8" bottom="8">
- <s:Button label="Close" click="closeItem()"/>
- <s:Button label="Save" click="save()"/>
- <s:Button label="Delete" click="deleteItem()"/>
- </s:HGroup>
-
-</mx:Canvas>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/src/insync04.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/src/insync04.mxml b/apps/samples-spring/WEB-INF/flex-src/insync04/src/insync04.mxml
deleted file mode 100755
index 026021d..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/src/insync04.mxml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*">
-
- <fx:Script>
- <![CDATA[
-
- import mx.collections.ArrayCollection;
- import mx.controls.Alert;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- [Bindable] private var contacts:ArrayCollection;
-
- private function resultHandler(event:ResultEvent):void
- {
- contacts = event.result as ArrayCollection
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
- public function openContact(contact:Contact):void
- {
- var children:Array = tn.getChildren();
- for (var i:int = 0; i<children.length; i++)
- {
- if (ContactForm(children[i]).contact.id == contact.id)
- {
- tn.selectedChild = children[i];
- return;
- }
- }
-
- var form:ContactForm = new ContactForm();
- tn.addChild(form);
- form.contact = contact;
- tn.selectedChild = form;
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <s:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <s:method name="findByName" result="resultHandler(event)"/>
- </s:RemoteObject>
- </fx:Declarations>
-
- <s:controlBarContent>
- <s:TextInput id="searchStr"/>
- <s:Button label="Search" click="ro.findByName(searchStr.text)"/>
- </s:controlBarContent>
-
- <mx:HDividedBox top="8" left="8" right="8" bottom="8">
- <mx:DataGrid id="dg" dataProvider="{contacts}" width="30%" height="100%"
- doubleClickEnabled="{dg.selectedItem != null}"
- doubleClick="openContact(dg.selectedItem as Contact)">
- <mx:columns>
- <mx:DataGridColumn dataField="firstName" headerText="First Name"/>
- <mx:DataGridColumn dataField="lastName" headerText="Last Name"/>
- </mx:columns>
- </mx:DataGrid>
- <mx:TabNavigator id="tn" width="70%" height="100%"/>
- </mx:HDividedBox>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/insync05/.actionScriptProperties
deleted file mode 100755
index 7e9cea9..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="insync05.mxml" projectUUID="af628f17-d14e-4d43-8da0-9c2b08773a27" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="insync05.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/insync05/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/.project b/apps/samples-spring/WEB-INF/flex-src/insync05/.project
deleted file mode 100755
index 7e64a27..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>insync05</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/build.xml b/apps/samples-spring/WEB-INF/flex-src/insync05/build.xml
deleted file mode 100755
index cab206e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="insync05" />
- <property name="application.file" value="insync05" />
- <property name="application.bin.dir" value="${samples-spring.war}/insync05" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync05/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
[20/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/LogManager.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/LogManager.as b/attic/apps/ds-console/console/containers/LogManager.as
new file mode 100755
index 0000000..3d47957
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/LogManager.as
@@ -0,0 +1,189 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console.containers
+{
+ import console.ConsoleManager;
+ import flash.events.Event;
+ import mx.controls.ComboBox;
+ import console.events.ManagementOperationInvokeEvent;
+ import mx.events.ListEvent;
+ import flash.events.MouseEvent;
+ import mx.collections.ArrayCollection;
+
+ public class LogManager extends UpdateListener
+ {
+ private var _manager:ConsoleManager;
+ private var _logMBean:String;
+ private var _logTree:Array;
+ private var display:LogManagerDisplay;
+
+ public static var targetLevels:Array = new Array(
+ {label:"NONE", value:"2000"},
+ {label:"FATAL", value:"1000"},
+ {label:"ERROR", value:"8"},
+ {label:"WARN", value:"6"},
+ {label:"INFO", value:"4"},
+ {label:"DEBUG", value:"2"},
+ {label:"ALL", value:"0"}
+ );
+
+ public function LogManager():void
+ {
+ super();
+
+ display = new LogManagerDisplay;
+ this.addChild(display);
+
+ this.label = "Log Manager";
+
+ _manager = ConsoleManager.getInstance();
+ _manager.registerListener(this, []);
+
+ // On selecting a log target, invoke 'getTargetFilters' to populate the table of filters
+ display.logTargetSelect.addEventListener(ListEvent.CHANGE, selectLogTarget);
+ display.logTargetLevel.dataProvider = targetLevels;
+
+ // Handler for removing a target
+ display.deleteCategory.addEventListener(MouseEvent.CLICK,
+ function(e:Event):void {
+
+ _manager.invokeOperation(
+
+ new ManagementOperationInvokeEvent(_logMBean,
+ "removeFilterForTarget",
+ [display.logTargetSelect.selectedItem, display.currentCategories.selectedItem],
+ ["java.lang.String", "java.lang.String"]),
+
+ function (e:Event):void { display.logTargetSelect.dispatchEvent(
+ new Event(ListEvent.CHANGE)); } );
+ }
+ );
+
+ // Handler for adding a target
+ display.addFilterButton.addEventListener(MouseEvent.CLICK,
+ function(e:Event):void {
+
+ _manager.invokeOperation(
+
+ new ManagementOperationInvokeEvent(_logMBean,
+ "addFilterForTarget",
+ [display.logTargetSelect.selectedItem, display.addFilterTextInput.text],
+ ["java.lang.String", "java.lang.String"]),
+ // Simple callback function to refresh the Log View
+ function (e:Event):void {
+ display.logTargetSelect.dispatchEvent(new Event(ListEvent.CHANGE));
+ display.addFilterTextInput.text = "";
+ }
+ );
+ }
+ );
+
+ // Handler for adding a target
+ display.addCommonFilterButton.addEventListener(MouseEvent.CLICK,
+ function(e:Event):void {
+
+ _manager.invokeOperation(
+
+ new ManagementOperationInvokeEvent(_logMBean,
+ "addFilterForTarget",
+ [display.logTargetSelect.selectedItem, display.commonCategories.selectedItem],
+ ["java.lang.String", "java.lang.String"]),
+ // Simple callback function to refresh the Log View
+ function (e:Event):void {
+ display.logTargetSelect.dispatchEvent(new Event(ListEvent.CHANGE));
+ display.addFilterTextInput.text = "";
+ }
+ );
+ }
+ );
+
+ // Handler for changing the target's level
+ display.logTargetLevel.addEventListener(ListEvent.CHANGE, function(e:Event):void
+ {
+ _manager.invokeOperation(
+
+ new ManagementOperationInvokeEvent(_logMBean,
+ "changeTargetLevel",
+ [display.logTargetSelect.selectedItem, display.logTargetLevel.selectedItem.value],
+ ["java.lang.String", "java.lang.String"]),
+ new Function
+ );
+ }
+ );
+
+ }
+
+ public override function mbeanModelUpdate(model:Object):void
+ {
+ _logTree = _manager.getChildTree("Log");
+ if (_logTree != null && _logTree.length != 0)
+ {
+ _logMBean = _logTree[0]["objectName"]["canonicalName"];
+ // Get the targets for the current application
+ _manager.getAttributes(_logMBean, ["Targets"], this, updateTargets);
+ _manager.getAttributes(_logMBean, ["Categories"], this, updateCommonCats);
+ }
+ }
+
+ public override function appChanged(s:String):void
+ {
+ mbeanModelUpdate(null);
+ }
+
+ public function updateCommonCats(e:Event):void
+ {
+ display.commonCategories.dataProvider = (e["result"] as Array)[0].value;
+ display.commonCategories.selectedIndex = 0;
+ display.commonCategories.dispatchEvent(new Event(ListEvent.CHANGE));
+ }
+
+ public function updateTargets(e:Event):void
+ {
+ var logTargets:Array = (e["result"] as Array)[0].value;
+ display.logTargetSelect.dataProvider = logTargets;
+ display.logTargetSelect.selectedIndex = 0;
+ display.logTargetSelect.dispatchEvent(new Event(ListEvent.CHANGE));
+ }
+
+ public function updateFilters(e:Event):void
+ {
+ display.currentCategories.dataProvider = e["result"] as Array;
+ }
+
+ public function selectLogTarget(e:Event):void
+ {
+ _manager.invokeOperation(new ManagementOperationInvokeEvent(_logMBean,
+ "getTargetFilters", [display.logTargetSelect.selectedItem], ["java.lang.String"]),
+ updateFilters);
+ _manager.invokeOperation(new ManagementOperationInvokeEvent(_logMBean,
+ "getTargetLevel", [display.logTargetSelect.selectedItem], ["java.lang.String"]),
+ handleGetTargetLevel);
+ }
+
+ public function handleGetTargetLevel(e:Event):void
+ {
+ var currentLevelInt:String = e["message"]["body"];
+ for (var i:int = 0; i < targetLevels.length; i++)
+ {
+ if (targetLevels[i].value == currentLevelInt)
+ display.logTargetLevel.selectedIndex = i;
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/LogManagerDisplay.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/LogManagerDisplay.mxml b/attic/apps/ds-console/console/containers/LogManagerDisplay.mxml
new file mode 100755
index 0000000..40e1f6e
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/LogManagerDisplay.mxml
@@ -0,0 +1,54 @@
+<?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:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
+ <mx:HBox width="100%" height="100%">
+ <mx:Form>
+ <mx:FormItem label="Log Target:">
+ <mx:ComboBox id="logTargetSelect" />
+ </mx:FormItem>
+ <mx:FormItem label="Target Level:">
+ <mx:ComboBox id="logTargetLevel"></mx:ComboBox>
+ </mx:FormItem>
+ <mx:HRule width="100%"/>
+ <mx:FormItem label="Add a Custom Category">
+ <mx:TextInput id="addFilterTextInput" />
+ </mx:FormItem>
+ <mx:FormItem>
+ <mx:Button label="Add Category" id="addFilterButton" />
+ </mx:FormItem>
+ </mx:Form>
+ <mx:VBox width="100%">
+ <mx:DataGrid id="currentCategories" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn headerText="Current Categories" dataField="filters" />
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:Button label="Remove Category" id="deleteCategory" />
+ </mx:VBox>
+ <mx:VBox width="100%">
+ <mx:DataGrid id="commonCategories" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn headerText="Common Categories" dataField="common"/>
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:Button label="Add Category" id="addCommonFilterButton" />
+ </mx:VBox>
+ </mx:HBox>
+</mx:VBox>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/Operation.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/Operation.as b/attic/apps/ds-console/console/containers/Operation.as
new file mode 100755
index 0000000..3a10448
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/Operation.as
@@ -0,0 +1,169 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package console.containers
+{
+
+import flash.events.MouseEvent;
+import mx.containers.HBox;
+import mx.controls.Button;
+import mx.controls.Label;
+import mx.controls.TextInput;
+import mx.messaging.management.MBeanOperationInfo;
+import mx.messaging.management.MBeanParameterInfo;
+
+/**
+ * The Operation container is an HBox that renders UI to invoke an operation on
+ * an MBean. When the operationInfo property of an Operation is set, the current
+ * UI for the Operation is torn down, and new UI is rendered based on the new
+ * MBeanOperationInfo metadata provided.
+ * <p>
+ * This container/control should not be instantiated directly. A parent OperationSet
+ * container will create nested Operations based on its MBean metadata.
+ */
+public class Operation extends HBox
+{
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * Constructor.
+ */
+ public function Operation(wrapper:OperationSet)
+ {
+ super();
+
+ _wrapper = wrapper;
+ _values = [];
+ _signature = [];
+ }
+
+ /**
+ * @private
+ * The parent container.
+ */
+ private var _wrapper:OperationSet;
+
+ /**
+ * @private
+ * Array to store references to controls for each argument.
+ */
+ private var _values:Array;
+
+ /**
+ * @private
+ * Array to store the type signature for this operation.
+ */
+ private var _signature:Array;
+
+ //----------------------------------
+ // MBeanOperationInfo
+ //----------------------------------
+
+ /**
+ * @private
+ * Storage for the operation info.
+ */
+ private var _operationInfo:MBeanOperationInfo;
+
+ /**
+ * MBean operation metadata that drives the UI for this component.
+ */
+ public function get operationInfo():MBeanOperationInfo
+ {
+ return _operationInfo;
+ }
+
+ public function set operationInfo(value:MBeanOperationInfo):void
+ {
+ var i:int;
+
+ _operationInfo = value;
+ // Remove any existing children and refs to argument values.
+ _values.splice(0);
+ _signature.splice(0);
+ for (i = numChildren - 1; i >= 0; --i)
+ {
+ removeChildAt(i);
+ }
+
+ // Build UI for this operation.
+ var opName:Button = new Button();
+ opName.label = value.name;
+ opName.addEventListener("click", invokeOperation);
+ addChild(opName);
+
+ var openParen:Label = new Label();
+ openParen.text = " (";
+ addChild(openParen);
+
+ var comma:Label = new Label();
+ comma.text = ", ";
+ var paramName:String;
+ var n:int = value.signature.length;
+ for (i = 0; i < n; ++i)
+ {
+ var pName:Label = new Label();
+ paramName = value.signature[i].name;
+ if (paramName.length > 0)
+ {
+ pName.text = paramName;
+ }
+ else
+ {
+ pName.text = "p" + (i + 1);
+ }
+ addChild(pName);
+ var pValue:TextInput = new TextInput();
+ addChild(pValue);
+ _values[i] = pValue;
+ _signature[i] = value.signature[i].type;
+ if (i != (n - 1))
+ {
+ addChild(comma);
+ }
+ }
+
+ var closeParen:Label = new Label();
+ closeParen.text = " ) ";
+ addChild(closeParen);
+ }
+
+ /**
+ * @private
+ * Calls back into the parent OperationSet to dispatch an
+ * event for this operation invocation request.
+ */
+ private function invokeOperation(e:MouseEvent):void
+ {
+ var argsToPass:Array = [];
+ var n:int = _values.length;
+ for (var i:int = 0; i < n; ++i)
+ {
+ argsToPass.push(_values[i].text);
+ }
+ _wrapper.dispatchInvokeEvent(_operationInfo.name, argsToPass, _signature);
+ }
+}
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/OperationSet.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/OperationSet.as b/attic/apps/ds-console/console/containers/OperationSet.as
new file mode 100755
index 0000000..f3f537a
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/OperationSet.as
@@ -0,0 +1,149 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package console.containers
+{
+
+import console.events.ManagementOperationInvokeEvent;
+
+import mx.containers.*;
+import mx.messaging.management.MBeanInfo;
+
+//--------------------------------------
+// Events
+//--------------------------------------
+
+/**
+ * Broadcast when a request has been made to invoke an Operation within this OperationSet.
+ */
+[Event(name="invoke", type="console.events.ManagementOperationInvokeEvent")]
+
+/**
+ * The OperationSet is a VBox containing an Operation for each operation exposed by a
+ * MBean. When the mbeanInfo property is set, the current UI of the OperationSet is torn
+ * down and new UI is built based upon the MBeanInfo metadata provided.
+ *
+ * <p><b>MXML Syntax</b></p>
+ *
+ * <p>The <code><mx:OperationSet></code> tag inherits all the properties
+ * of its parent classes and adds the following properties:</p>
+ *
+ * <p>
+ * <pre>
+ * <mx:Button
+ * mbeanInfo="<i>No default</i>."
+ * />
+ * </pre>
+ * </p>
+ */
+public class OperationSet extends VBox
+{
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ * Constructor.
+ */
+ public function OperationSet()
+ {
+ super();
+ }
+
+
+
+
+ //----------------------------------
+ // MBeanOperationInfo
+ //----------------------------------
+
+ private var _mbeanName:String;
+ public function set mbeanName(name:String):void
+ {
+ _mbeanName = name;
+ }
+
+ /**
+ * @private
+ * Storage for the Mbean info.
+ */
+ private var _mbeanInfo:MBeanInfo;
+
+ /**
+ * MBean metadata to drive the UI for this component.
+ */
+ public function get mbeanInfo():MBeanInfo
+ {
+ return _mbeanInfo;
+ }
+
+
+ private var _tabnav:TabNavigator;
+ public function set tabnav(p:TabNavigator):void
+ {
+ _tabnav = p;
+ }
+
+ public function set mbeanInfo(value:MBeanInfo):void
+ {
+ var i:int;
+
+ _mbeanInfo = value;
+ // Remove any existing children.
+ for (i = numChildren - 1; i >= 0; --i)
+ {
+ removeChildAt(i);
+ }
+ if (value != null)
+ {
+ var n:int = value.operations.length;
+
+ // If there are no operations for this MBean, disable the Operations tab.
+ if (n == 0)
+ _tabnav.getTabAt(1).enabled = false;
+
+ // Otherwise, build UI for the set of operations exposed by this MBean.
+ else
+ {
+ _tabnav.getTabAt(1).enabled = true;
+ for (i = 0; i < n; ++i)
+ {
+ var op:Operation = new Operation(this);
+ addChild(op);
+ op.operationInfo = value.operations[i];
+ }
+ }
+ }
+ }
+
+ /**
+ * Raises an operation invoke event for a nested Operation.
+ */
+ public function dispatchInvokeEvent(name:String, values:Array, signature:Array):void
+ {
+ var event:ManagementOperationInvokeEvent = new ManagementOperationInvokeEvent(_mbeanName, name, values, signature);
+ dispatchEvent(event);
+ }
+
+}
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/PollableAttributeChart.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/PollableAttributeChart.as b/attic/apps/ds-console/console/containers/PollableAttributeChart.as
new file mode 100755
index 0000000..a8dac5a
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/PollableAttributeChart.as
@@ -0,0 +1,42 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console.containers
+{
+ import mx.charts.LineChart;
+ import mx.charts.series.LineSeries;
+
+ public class PollableAttributeChart extends LineChart
+ {
+ function PollableAttributeChart(provider:Object):void
+ {
+ super();
+
+ dataProvider = provider;
+ this.percentHeight = 100;
+ this.percentWidth = 100;
+
+ var series:LineSeries = new LineSeries;
+ series.dataProvider = provider;
+ series.yField = "value";
+ this.addChild(series);
+
+ initialize();
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/ServerManager.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/ServerManager.as b/attic/apps/ds-console/console/containers/ServerManager.as
new file mode 100755
index 0000000..f0ba870
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/ServerManager.as
@@ -0,0 +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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console.containers
+{
+ import console.ConsoleManager;
+ import mx.collections.ArrayCollection;
+ import mx.events.ListEvent;
+ import flash.events.Event;
+ import mx.charts.LineChart;
+ import mx.charts.series.LineSeries;
+ import mx.utils.ObjectProxy;
+ import flash.utils.setInterval;
+ import mx.collections.ICollectionView;
+ import console.data.Bindable3DHashMap;
+ import flash.events.TextEvent;
+ import console.events.ManagementOperationInvokeEvent;
+ import mx.controls.DataGrid;
+ import mx.events.DataGridEvent;
+ import mx.events.FlexEvent;
+
+ public class ServerManager extends UpdateListener
+ {
+ private var _manager:ConsoleManager;
+ private var display:ServerManagerDisplay;
+ private var dataCache:Bindable3DHashMap;
+ private var pollableAttributes:Object;
+ private var visibleTypes:Array;
+
+ public function ServerManager():void
+ {
+ super();
+ display = new ServerManagerDisplay;
+ this.addChild(display);
+
+ this.label = "Server Management";
+ display.scalarProperties.addEventListener(ListEvent.CHANGE, selectedScalar);
+ display.pollableProperties.addEventListener(ListEvent.CHANGE, selectedPollable);
+ _manager = ConsoleManager.getInstance();
+ _manager.registerListener(this, [{type: ConsoleManager.GENERAL_OPERATION, poll: false},
+ {type: ConsoleManager.GENERAL_SERVER, poll: false},
+ {type: ConsoleManager.GENERAL_POLLABLE, poll: true}]);
+ setupDataCache();
+ }
+
+ public override function dataUpdate(type:int, data:Object):void
+ {
+ var dataArray:ArrayCollection = new ArrayCollection;
+
+ for (var name:String in data)
+ {
+
+ var propertyArrayForMBean:Array = data[name];
+
+ for (var i:int = 0; i < propertyArrayForMBean.length; i++)
+ {
+ dataCache.update(String(type), propertyArrayForMBean[i].name, propertyArrayForMBean[i].value);
+ }
+ }
+
+ if (type == ConsoleManager.GENERAL_POLLABLE)
+ pollableAttributes = data;
+ }
+
+ private function setupDataCache():void
+ {
+ dataCache = new Bindable3DHashMap();
+ dataCache.update(String(ConsoleManager.GENERAL_OPERATION),null,null);
+ dataCache.update(String(ConsoleManager.GENERAL_POLLABLE),null,null);
+ dataCache.update(String(ConsoleManager.GENERAL_SERVER),null,null);
+
+ display.scalarProperties.dataProvider = dataCache.getBindableKeyArray(String(ConsoleManager.GENERAL_SERVER));
+ display.pollableProperties.dataProvider = dataCache.getBindableKeyArray(String(ConsoleManager.GENERAL_POLLABLE));
+ }
+
+ private function invokeOp(mbean:String, operation:String, value:String):void
+ {
+ _manager.invokeOperation(
+ new ManagementOperationInvokeEvent(mbean, operation, [value], ["java.lang.String"]),
+ function (e:Event):void {
+
+ }
+ );
+ }
+
+ private function selectedScalar(e:Event):void
+ {
+ // It's possible that the data has changed since it was clicked because of polling
+ // if the selected item is null, then return.
+ // TODO: Handle this more gracefully.
+ if (display.scalarProperties.selectedItem == -1) return;
+
+ var attr:String = display.scalarProperties.selectedItem.propertyName;
+ var mbean:String = display.scalarProperties.selectedItem.mbeanName;
+ display.selectedProperty.text = attr;
+ display.pollableProperties.selectedIndex = -1;
+ }
+
+ private function selectedPollable(e:Event):void
+ {
+ // It's possible that the data has changed since it was clicked because of polling
+ // if the selected item is null, then return.
+ // TODO: Handle this more gracefully.
+ if (display.pollableProperties.selectedItem == null) return;
+
+ var attr:String = display.pollableProperties.selectedItem.Property
+ display.selectedProperty.text = attr;
+
+ display.attrgraph.dataProvider = dataCache.getBindableDataArray(String(ConsoleManager.GENERAL_POLLABLE), attr);
+ display.attrgraphSeries.dataProvider = dataCache.getBindableDataArray(String(ConsoleManager.GENERAL_POLLABLE), attr);
+ display.scalarProperties.selectedIndex = -1;
+ }
+
+ public override function appChanged(s:String):void
+ {
+ display.attrgraph.dataProvider = null;
+ display.attrgraphSeries.dataProvider = null;
+ display.selectedProperty.text = "None";
+ setupDataCache();
+ _manager.updateData(this);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/ServerManagerDisplay.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/ServerManagerDisplay.mxml b/attic/apps/ds-console/console/containers/ServerManagerDisplay.mxml
new file mode 100755
index 0000000..4161a3b
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/ServerManagerDisplay.mxml
@@ -0,0 +1,54 @@
+<?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:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
+ <mx:HDividedBox width="100%" height="100%">
+ <mx:VBox height="100%" width="400">
+ <mx:DataGrid id="scalarProperties" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn dataField="mbeanName" visible="false" />
+ <mx:DataGridColumn headerText="Scalar Property" dataField="Property" />
+ <mx:DataGridColumn headerText="Value" dataField="Value" />
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:DataGrid id="pollableProperties" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn dataField="mbeanName" visible="false" />
+ <mx:DataGridColumn headerText="Graphable Property" dataField="Property" />
+ <mx:DataGridColumn headerText="Value" dataField="Value" />
+ </mx:columns>
+ </mx:DataGrid>
+ </mx:VBox>
+ <mx:VDividedBox height="100%">
+ <mx:HBox>
+ <mx:Label text="Selected Attribute" />
+ <mx:Text id="selectedProperty" />
+ </mx:HBox>
+ <mx:LineChart id="attrgraph" width="100%" height="100%">
+ <mx:verticalAxis>
+ <mx:LinearAxis id="attrgraphAxis" baseAtZero="false" />
+ </mx:verticalAxis>
+ <mx:series>
+ <mx:LineSeries id="attrgraphSeries" yField="Value" />
+ </mx:series>
+ </mx:LineChart>
+ </mx:VDividedBox>
+ </mx:HDividedBox>
+
+</mx:Panel>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/UpdateListener.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/UpdateListener.as b/attic/apps/ds-console/console/containers/UpdateListener.as
new file mode 100755
index 0000000..ae30465
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/UpdateListener.as
@@ -0,0 +1,109 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console.containers
+{
+ import mx.containers.Canvas;
+ import console.data.Bindable3DHashMap;
+ import mx.collections.ArrayCollection;
+ import mx.messaging.management.ObjectName;
+
+ public class UpdateListener extends Canvas
+ {
+ protected var _name:String;
+ protected var _model:Object;
+
+ /**
+ * Invoked when the names of the mbeans are retrieved from the server.
+ */
+ public function mbeanModelUpdate(mbeanModel:Object):void
+ {
+
+ }
+
+ /**
+ * Invoked when the data for a given type is updated if the implementing class
+ * is registered with the ConsoleManager for the type, and if the implementing class
+ * is set to active in the ConsoleManager.
+ */
+ public function dataUpdate(type:int, data:Object):void
+ {
+
+ }
+
+ /**
+ * Invoked when the selected application has changed. An implementing class might
+ * want to clear any data it is holding onto since the data will be belonging to
+ * objects in an application's MBeans that are no longer being queried.
+ */
+ public function appChanged(s:String):void
+ {
+
+ }
+
+ /**
+ * If the container only wishes to query a select number of MBeans upon dataUpdate, they should be
+ * visible in a map keyed on the display type containing arrays of the MBean names.
+ *
+ * If a null value, or any object that the ConsoleManager can't parse, then all
+ * MBeans for all active types are returned upon dataUpdate.
+ */
+ public function get specificMBeansMap():Object
+ {
+ return null;
+ }
+
+ protected function traverseTreeForObject(node:Object, searchType:String = null, searchObject:String = null):Object
+ {
+ if (node == null)
+ {
+ return null;
+ }
+ else if (node.hasOwnProperty("type"))
+ {
+ // Node is a container of objects of 'type'
+ if (searchType != null)
+ {
+ if (node.type == searchObject)
+ return node;
+ }
+ }
+ else if (node.hasOwnProperty("objectName"))
+ {
+ // Node is a specific object, an instance of parent 'type'
+ if (searchObject != null)
+ {
+ if ((node.objectName as ObjectName).getKeyProperty("id") == searchObject)
+ return node;
+ }
+ }
+
+ // recur
+ if (node.hasOwnProperty("children") && (node.children is Array))
+ {
+ for each (var child:Object in (node.children as Array))
+ {
+ traverseTreeForObject(child, searchType, searchObject);
+ }
+ }
+
+ // not found
+ return null;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/UpdateManager.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/UpdateManager.as b/attic/apps/ds-console/console/containers/UpdateManager.as
new file mode 100755
index 0000000..2883c59
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/UpdateManager.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console.containers
+{
+ public interface UpdateManager
+ {
+ function registerListener(listner:UpdateListener, types:Array):void;
+ function unregisterListener(listner:UpdateListener):void;
+ function activateListener(listener:UpdateListener):void;
+ function deactivateListener(listener:UpdateListener):void;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/data/Bindable3DHashMap.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/data/Bindable3DHashMap.as b/attic/apps/ds-console/console/data/Bindable3DHashMap.as
new file mode 100755
index 0000000..d7b056f
--- /dev/null
+++ b/attic/apps/ds-console/console/data/Bindable3DHashMap.as
@@ -0,0 +1,110 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console.data
+{
+ import mx.collections.ArrayCollection;
+ import mx.utils.ObjectProxy;
+ import flash.events.Event;
+ import mx.events.PropertyChangeEvent;
+ import mx.events.CollectionEvent;
+ import mx.controls.listClasses.ListBase;
+
+ public class Bindable3DHashMap
+ {
+ public var objects:ObjectProxy;
+ public var objectsForKeyArray:ObjectProxy;
+
+ public function Bindable3DHashMap()
+ {
+ objects = new ObjectProxy;
+ objectsForKeyArray = new ObjectProxy;
+ }
+
+ public function updateNoPollable(object:String, key:String, value:*):void
+ {
+ if (!objectsForKeyArray.hasOwnProperty(object))
+ objectsForKeyArray[object] = new ArrayCollection;
+
+ if (!key)
+ return;
+
+ var keysForKeyArray:ArrayCollection = objectsForKeyArray[object] as ArrayCollection;
+
+ var foundKey:Boolean = false;
+ for (var i:int = 0; i < keysForKeyArray.length; i++)
+ {
+ if ((keysForKeyArray[i].hasOwnProperty("Property")) && (keysForKeyArray[i]["Property"] == key))
+ {
+ keysForKeyArray[i]["Value"] = value;
+ foundKey = true;
+ break;
+ }
+ }
+
+ if (!foundKey)
+ keysForKeyArray.addItem({Property: key, Value:value});
+
+ keysForKeyArray.dispatchEvent(new CollectionEvent(CollectionEvent.COLLECTION_CHANGE));
+ }
+
+ public function update(object:String, key:String, value:*):void
+ {
+ if (!objects.hasOwnProperty(object))
+ {
+ objects[object] = new ObjectProxy;
+ }
+
+ if (!key)
+ return;
+
+ var keys:ObjectProxy = objects[object] as ObjectProxy;
+
+ if (!keys.hasOwnProperty(key))
+ keys[key] = new ArrayCollection;
+
+ (keys[key] as ArrayCollection).addItem({Name: key, Value: value});
+ (keys[key] as ArrayCollection).dispatchEvent(new CollectionEvent(CollectionEvent.COLLECTION_CHANGE));
+
+ updateNoPollable(object, key, value);
+ }
+
+ public function getBindableKeyArray(object:String):ArrayCollection
+ {
+ if (!objectsForKeyArray.hasOwnProperty(object))
+ objectsForKeyArray[object] = new ArrayCollection;
+
+ return (objectsForKeyArray[object] as ArrayCollection);
+ }
+
+ public function getBindableDataArray(object:String, key:String):ArrayCollection
+ {
+ if (!objects.hasOwnProperty(object))
+ objects[object] = new ObjectProxy;
+
+ var keys:ObjectProxy = objects[object] as ObjectProxy;
+ return keys[key] as ArrayCollection;
+ }
+
+ public function clearData():void
+ {
+ objects = new ObjectProxy;
+ objectsForKeyArray = new ObjectProxy;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/events/ManagementOperationInvokeEvent.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/events/ManagementOperationInvokeEvent.as b/attic/apps/ds-console/console/events/ManagementOperationInvokeEvent.as
new file mode 100755
index 0000000..548c1c9
--- /dev/null
+++ b/attic/apps/ds-console/console/events/ManagementOperationInvokeEvent.as
@@ -0,0 +1,99 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package console.events
+{
+
+import flash.events.Event;
+
+/**
+ * Used to request that an MBean operation be invoked.
+ */
+public class ManagementOperationInvokeEvent extends Event
+{
+ /**
+ * Constructs an instance of this event with the specified type, target,
+ * and message.
+ */
+ public function ManagementOperationInvokeEvent(mbean:String, name:String, values:Array, signature:Array)
+ {
+ super(INVOKE, false, false);
+ _mbean = mbean;
+ _name = name;
+ _values = values;
+ _signature = signature;
+ }
+
+ /**
+ * The mbean of the operation to invoke.
+ */
+ public function get mbean():String
+ {
+ return _mbean;
+ }
+
+ /**
+ * The name of the operation to invoke.
+ */
+ public function get name():String
+ {
+ return _name;
+ }
+
+ /**
+ * The argument values for the operation.
+ */
+ public function get values():Array
+ {
+ return _values;
+ }
+
+ /**
+ * The type signature for operation arguments.
+ */
+ public function get signature():Array
+ {
+ return _signature;
+ }
+
+ /**
+ * Because this event can be re-dispatched we have to implement clone to
+ * return the appropriate type, otherwise we will get just the standard
+ * event type.
+ *
+ * @return Clone of this <code>ManagementOperationInvokeEvent</code>
+ */
+ override public function clone():Event
+ {
+ return new ManagementOperationInvokeEvent(_mbean, _name, _values, _signature);
+ }
+
+ /**
+ * The event type.
+ */
+ public static const INVOKE:String = "invoke";
+
+ // private members
+ private var _name:String;
+ private var _values:Array;
+ private var _signature:Array;
+ private var _mbean:String;
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/README.txt
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/README.txt b/attic/apps/samples-spring/README.txt
new file mode 100755
index 0000000..714815e
--- /dev/null
+++ b/attic/apps/samples-spring/README.txt
@@ -0,0 +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.
+
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/classes/commons-logging.properties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/classes/commons-logging.properties b/attic/apps/samples-spring/WEB-INF/classes/commons-logging.properties
new file mode 100755
index 0000000..b8a3e1f
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/classes/commons-logging.properties
@@ -0,0 +1,19 @@
+# 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.
+
+# suppress logging for 3rd-party libraries using commons-logging
+# Flex logging is not configured here. It is configured through in the logging section of flex-config.xml
+org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-servlet.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-servlet.xml b/attic/apps/samples-spring/WEB-INF/flex-servlet.xml
new file mode 100755
index 0000000..5f2addc
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-servlet.xml
@@ -0,0 +1,70 @@
+<?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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:flex="http://www.springframework.org/schema/flex"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/flex
+ http://www.springframework.org/schema/flex/spring-flex-1.5.xsd">
+
+ <flex:message-broker>
+ <flex:message-service
+ default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" />
+ <flex:secured />
+ </flex:message-broker>
+
+ <!-- Expose the productService bean for BlazeDS remoting -->
+ <flex:remoting-destination ref="productService" />
+
+ <!-- Expose the contactService bean for BlazeDS remoting -->
+ <flex:remoting-destination ref="contactService" />
+
+ <!-- Expose the securedProductService bean for BlazeDS remoting -->
+ <flex:remoting-destination ref="securedProductService" />
+
+ <!-- Helper for getting the currently authenticated user -->
+ <bean id="securityHelper" class="org.springframework.flex.samples.secured.Security3Helper">
+ <flex:remoting-destination/>
+ </bean>
+
+ <!-- Messaging destinations -->
+ <flex:message-destination id="chat" />
+ <flex:message-destination id="simple-feed" />
+ <flex:message-destination id="market-feed" allow-subtopics="true" subtopic-separator="." />
+
+ <!-- MessageTemplate makes it easy to publish messages -->
+ <bean id="defaultMessageTemplate" class="org.springframework.flex.messaging.MessageTemplate" />
+
+ <!-- Pojo used to start and stop the data feed that pushes data in the 'simple-feed' destination -->
+ <bean id="simpleFeedStarter" class="org.springframework.flex.samples.simplefeed.SimpleFeed">
+ <constructor-arg ref="defaultMessageTemplate" />
+ <flex:remoting-destination />
+ </bean>
+
+ <!-- Pojo used to start and stop the data feed that pushes data in the 'market-feed' destination -->
+ <bean id="marketFeedStarter" class="org.springframework.flex.samples.marketfeed.MarketFeed">
+ <constructor-arg ref="defaultMessageTemplate" />
+ <constructor-arg value="stocklist.xml" />
+ <flex:remoting-destination />
+ </bean>
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties
new file mode 100755
index 0000000..07c42ee
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="chat.mxml" projectUUID="46e6c4ea-bda5-466a-9d9a-a020928ae0f8" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="chat.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/chat/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/chat/.project b/attic/apps/samples-spring/WEB-INF/flex-src/chat/.project
new file mode 100755
index 0000000..648b1c7
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/chat/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>chat</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/chat/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/chat/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/chat/build.xml
new file mode 100755
index 0000000..22a305f
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/chat/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="chat" />
+ <property name="application.file" value="chat" />
+ <property name="application.bin.dir" value="${samples-spring.war}/chat" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/chat/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[50/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index bbd3db6..26a8eef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,9 +2,6 @@
.settings
.classpath
.project
-.manager
-.scala_dependencies
-.cache
# idea conf files
.idea
@@ -14,209 +11,4 @@
# building
target
-[Bb]uild/
-null
-tmp
-temp
-dist
-test-output
-build.log
-release
-out
-gen
-local.properties
-
-#Apache Flex Projects
-lib/
-libs/
-in/
-swfobject/
-flex2/
-thirdparty/
-META-INF/
-tempDoc/
-air/
-
-*.pbj
-*.vms
-*.ser
-*.mxp
-bundles.properties
-css_*.properties
-FXGException_*.properties
-FXGLog_*.properties
-FABridge.js
-frameworks/projects/spark/manifest.xml
-env.properties
-local.properties
-packages.dita
-rat.report
-airsdk.xml
-
-#OS junk files
-[Tt]humbs.db
-*.DS_Store
-
-#Visual Studio files
-*.[Oo]bj
-*.user
-*.aps
-*.pch
-*.vspscc
-*.vssscc
-*_i.c
-*_p.c
-*.ncb
-*.suo
-*.tlb
-*.tlh
-*.bak
-*.[Cc]ache
-*.ilk
-*.log
-*.lib
-*.sbr
-*.sdf
-ipch/
-obj/
-[Bb]in
-[Dd]ebug*/
-[Rr]elease*/
-Ankh.NoLoad
-
-#Tooling
-_ReSharper*/
-*.resharper
-[Tt]est[Rr]esult*
-
-#CVS files
-.svn
-.git
-
-# Office Temp Files
-~$*
-
-#Binaries
-*.dll
-*.bin
-*.com
-*.exe
-*.class
-*.jar
-*.swf
-*.swc
-
-#Compressed Files
-*.zip
-*.rar
-*.tar
-
-/asdoc-output/
-
-#mustellarunner
-*.patch
-*.reply
-mailbody.txt
-gitstatus.txt
-
-#AIR SDK
-frameworks/projects/air/
-runtimes/
-templates/air/
-samples/badge/
-samples/icons/
-templates/air/
-templates/extensions/
-templates/sdk/
-install/android
-AIR SDK Readme.txt
-AIR SDK license.pdf
-air-sdk-description.xml
-samples/descriptor-sample.xml
-include/FlashRuntimeExtensions.h
-
-#BlazeDS generated/copied
-apps/blazeds/WEB-INF/flex/version.properties
-apps/ds-console/history/
-apps/ds-console/index.html
-apps/ds-console/swfobject.js
-apps/samples/WEB-INF/classes/
-apps/samples/WEB-INF/flex/version.properties
-asdoc/
-frameworks/air-config-template.xml
-frameworks/air-config.xml
-frameworks/airmobile-config-template.xml
-frameworks/airmobile-config.xml
-frameworks/apache-manifest.xml
-frameworks/build_framework.xml
-frameworks/downloads.xml
-frameworks/experimental-manifest.xml
-frameworks/experimental-mobile-manifest.xml
-frameworks/flash-unicode-table.xml
-frameworks/flex-config-template.xml
-frameworks/flex-config.xml
-frameworks/flex-sdk-description.xml
-frameworks/locale/
-frameworks/metadata.xml
-frameworks/mx-manifest.xml
-frameworks/mxml-2009-manifest.xml
-frameworks/mxml-manifest.xml
-frameworks/spark-manifest.xml
-frameworks/tests/
-frameworks/themes/
-modules/core/classes/
-modules/core/src/ExcludeDoclet.java
-qa/resources/config/air-config.xml
-qa/resources/config/flex-config.xml
-resources/security/tomcat/TomcatValve.java
-servers/apache-tomcat-6.0.29/
-templates/
-apps/team/WEB-INF/flex/air-config.xml
-apps/team/WEB-INF/flex/apache-manifest.xml
-apps/team/WEB-INF/flex/experimental-manifest.xml
-apps/team/WEB-INF/flex/experimental-mobile-manifest.xml
-apps/team/WEB-INF/flex/flash-unicode-table.xml
-apps/team/WEB-INF/flex/flex-config.xml
-apps/team/WEB-INF/flex/flex-sdk-description.xml
-apps/team/WEB-INF/flex/flex-webtier-config.xml
-apps/team/WEB-INF/flex/locale/
-apps/team/WEB-INF/flex/mx-manifest.xml
-apps/team/WEB-INF/flex/mxml-2009-manifest.xml
-apps/team/WEB-INF/flex/mxml-manifest.xml
-apps/team/WEB-INF/flex/spark-manifest.xml
-apps/team/WEB-INF/flex/themes/
-apps/team/WEB-INF/web.xml
-apps/team/history/
-qa/apps/qa-manual/WEB-INF/flex/apache-manifest.xml
-qa/apps/qa-manual/WEB-INF/flex/experimental-manifest.xml
-qa/apps/qa-manual/WEB-INF/flex/experimental-mobile-manifest.xml
-qa/apps/qa-manual/WEB-INF/flex/flash-unicode-table.xml
-qa/apps/qa-manual/WEB-INF/flex/flex-sdk-description.xml
-qa/apps/qa-manual/WEB-INF/flex/locale/
-qa/apps/qa-manual/WEB-INF/flex/mx-manifest.xml
-qa/apps/qa-manual/WEB-INF/flex/mxml-2009-manifest.xml
-qa/apps/qa-manual/WEB-INF/flex/mxml-manifest.xml
-qa/apps/qa-manual/WEB-INF/flex/spark-manifest.xml
-qa/apps/qa-manual/WEB-INF/flex/themes/
-qa/apps/qa-manual/WEB-INF/flex/version.properties
-qa/apps/qa-manual/WEB-INF/src/qa/utils/mxml/
-qa/apps/qa-manual/WEB-INF/web.xml
-qa/apps/qa-manual/history/
-qa/apps/qa-regress/WEB-INF/classes/
-qa/apps/qa-regress/WEB-INF/flex/apache-manifest.xml
-qa/apps/qa-regress/WEB-INF/flex/experimental-manifest.xml
-qa/apps/qa-regress/WEB-INF/flex/experimental-mobile-manifest.xml
-qa/apps/qa-regress/WEB-INF/flex/flash-unicode-table.xml
-qa/apps/qa-regress/WEB-INF/flex/flex-sdk-description.xml
-qa/apps/qa-regress/WEB-INF/flex/locale/
-qa/apps/qa-regress/WEB-INF/flex/mx-manifest.xml
-qa/apps/qa-regress/WEB-INF/flex/mxml-2009-manifest.xml
-qa/apps/qa-regress/WEB-INF/flex/mxml-manifest.xml
-qa/apps/qa-regress/WEB-INF/flex/spark-manifest.xml
-qa/apps/qa-regress/WEB-INF/flex/themes/
-qa/apps/qa-regress/WEB-INF/flex/version.properties
-qa/apps/qa-regress/WEB-INF/src/qa/utils/
-qa/apps/qa-regress/WEB-INF/web.xml
-qa/apps/qa-regress/WEB-INF/web.xml.spring
-qa/apps/qa-regress/history/
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/ApproveBlazeDS.xml
----------------------------------------------------------------------
diff --git a/ApproveBlazeDS.xml b/ApproveBlazeDS.xml
deleted file mode 100644
index ec88d2e..0000000
--- a/ApproveBlazeDS.xml
+++ /dev/null
@@ -1,385 +0,0 @@
-<?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="ApproveApacheFlexBlazeDS" default="main" basedir=".">
-
-
- <!-- Required for OSX 10.6 / Snow Leopard Performance. -->
- <!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
- <!-- local.d32 is set/used in build.properties so this needs to be done first. -->
- <condition property="local.d32" value="-d32">
- <and>
- <os family="windows"/>
- <equals arg1="${sun.arch.data.model}" arg2="64"/>
- <equals arg1="${os.arch}" arg2="x86_64"/>
- <equals arg1="${ant.java.version}" arg2="1.6"/>
- </and>
- </condition>
-
- <condition property="isMac" value="mac">
- <os family="mac" />
- </condition>
- <condition property="isWindows" value="windows">
- <os family="windows" />
- </condition>
- <condition property="isLinux" value="linux">
- <and>
- <os family="unix" />
- <not>
- <isset property="isMac" />
- </not>
- </and>
- </condition>
- <condition property="package.suffix" value="zip">
- <os family="windows" />
- </condition>
- <property name="package.suffix" value="tar.gz" />
-
- <property name="rat.report" value="${basedir}/rat-report.txt"/>
- <property name="apache.rat.jar" value="apache-rat-0.8.jar" />
- <property name="apache.rat.tasks.jar" value="apache-rat-tasks-0.8.jar" />
- <property name="apache.rat.url" value="http://people.apache.org/~aharui/rat" />
-
- <property name="mac.text.display" value="cat" />
- <property name="win.text.display" value="type" />
- <property name="linux.text.display" value="cat" />
-
- <property file="${basedir}/approveblazeds.properties"/>
- <property environment="env"/>
-
- <property name="build.target" value="main" />
-
- <condition property="do.copy.downloads" >
- <isset property="download.cache.dir" />
- </condition>
-
- <fail message="The ANT_HOME environment variable is not set."
- unless="env.ANT_HOME"/>
-
- <available file="${env.FLEX_HOME}"
- type="dir"
- property="FLEX_HOME" value="${env.FLEX_HOME}" />
-
- <fail message="The FLEX_HOME property is not set in environment or command-line."
- unless="FLEX_HOME"/>
-
- <available file="${env.AIR_HOME}"
- type="dir"
- property="AIR_HOME" value="${env.AIR_HOME}" />
-
- <fail message="The AIR_HOME property is not set in environment or command-line."
- unless="AIR_HOME"/>
-
- <available file="${env.ANT_HOME}/lib/${apache.rat.jar}"
- type="file"
- property="apache.rat.found"/>
- <available file="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}"
- type="file"
- property="apache.rat.tasks.found"/>
-
- <fail message="The release version is not set. Specify -Drelease.version=<release version (e.g. 3.1, 3.2, etc)>"
- unless="release.version"/>
-
- <fail message="The folder number is not set. Specify -Dfolder.number=<folder number (e.g. 1001, 1002, etc)>"
- unless="folder.number"/>
-
- <property name="package.url.path" value="https://repository.apache.org/content/repositories/orgapacheflex-${folder.number}/org/apache/flex/blazeds/blazeds/${release.version}" />
- <property name="package.url.name" value="blazeds-${release.version}-source-release" />
-
- <condition property="zip.compressed">
- <equals arg1="zip" arg2="${package.suffix}" />
- </condition>
-
- <target name="display-text-mac" if="isMac">
- <echo>========================= Begin ${file} ==============================</echo>
- <exec executable="${mac.text.display}" >
- <arg value="${file}" />
- </exec>
- <echo>========================= End ${file} ==============================</echo>
- </target>
- <target name="display-text-win" if="isWindows">
- <pathconvert targetos="windows" property="winfile">
- <path path="${file}" />
- </pathconvert>
- <echo>========================= Begin ${winfile} ==============================</echo>
- <exec executable="cmd.exe" >
- <arg value="/c" />
- <arg value="${win.text.display}" />
- <arg value="${winfile}" />
- </exec>
- <echo>========================= End ${winfile} ==============================</echo>
- </target>
- <target name="display-text-linux" if="isLinux">
- <echo>========================= Begin ${file} ==============================</echo>
- <exec executable="${linux.text.display}" >
- <arg value="${file}" />
- </exec>
- <echo>========================= End ${file} ==============================</echo>
- </target>
-
- <target name="install-rat" depends="install-rat.jar,install-rat.tasks.jar" />
- <target name="install-rat.jar" unless="apache.rat.found">
- <get src="${apache.rat.url}/${apache.rat.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.jar}" />
- </target>
- <target name="install-rat.tasks.jar" unless="apache.rat.tasks.found">
- <get src="${apache.rat.url}/${apache.rat.tasks.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}" />
- </target>
-
- <target name="rat-taskdef" description="Rat taskdef">
- <typedef resource="org/apache/rat/anttasks/antlib.xml"
- uri="antlib:org.apache.rat.anttasks"
- classpathref="anttask.classpath"/>
- </target>
-
- <target name="main" depends="install-rat,download,check-sigs,uncompress,rat-check,check-notices,build,approve" description="Perform required release approval steps">
- </target>
-
- <target name="main-no-download" depends="install-rat,check-sigs,uncompress,rat-check,check-notices,build,approve" description="Perform required release approval steps">
- </target>
-
- <target name="test" >
- <echo>${rat.report}.bin.txt</echo>
- <replaceregexp file="${rat.report}.bin.txt" match="..AL.*" replace="" byline="true"/>
- </target>
-
- <target name="display-text" >
- <antcall target="display-text-mac" />
- <antcall target="display-text-win" />
- <antcall target="display-text-linux" />
- </target>
-
- <target name="display-text-test" >
- <antcall target="display-text" >
- <param name="file" value="${basedir}/rat-report.txt" />
- </antcall>
- </target>
-
- <target name="download" depends="download-asc" description="download the release package">
- <get src="${package.url.path}/${package.url.name}.${package.suffix}"
- dest="${basedir}/${package.url.name}.${package.suffix}" />
- <get src="${package.url.path}/${package.url.name}.${package.suffix}.md5"
- dest="${basedir}/${package.url.name}.${package.suffix}.md5" />
- </target>
-
- <target name="download-asc" unless="no.asc" description="download the release package">
- <get src="${package.url.path}/${package.url.name}.${package.suffix}.asc"
- dest="${basedir}/${package.url.name}.${package.suffix}.asc" />
- </target>
-
- <target name="check-md5" description="check md5">
- <echo message="Checking MD5..."/>
- <replace file="${basedir}/${package.url.name}.${package.suffix}.md5"
- token=" " />
- <checksum file="${basedir}/${package.url.name}.${package.suffix}" algorithm="md5" verifyproperty="md5.ok" />
- <condition property="MD5Invalid">
- <not>
- <equals arg1="${md5.ok}" arg2="true" />
- </not>
- </condition>
- <fail message="MD5 checksum did not match" if="MD5Invalid" />
- </target>
-
- <target name="check-sigs" depends="check-md5" unless="no.asc" description="check md5 and gpg sigs">
- <exec executable="gpg" failonerror="true">
- <arg value="--verify" />
- <arg value="${basedir}/${package.url.name}.${package.suffix}.asc" />
- <arg value="${basedir}/${package.url.name}.${package.suffix}" />
- </exec>
- </target>
-
-
- <target name="uncompress" depends="pre-clean, untar-file, unzip-file" />
-
- <target name="pre-clean" description="remove old uncompressed package" >
- <delete dir="${basedir}/${package.url.name}" failonerror="false" />
- </target>
-
- <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
- <untar src="${basedir}/${package.url.name}.${package.suffix}"
- dest="${basedir}/${package.url.name}" compression="gzip"/>
- </target>
-
- <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
- <unzip src="${basedir}/${package.url.name}.${package.suffix}"
- dest="${basedir}/${package.url.name}"/>
- </target>
-
- <target name="rat-check" >
-
- <echo message="Checking files at ${basedir}/${package.url.name}, report is ${rat.report}"/>
-
- <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
- reportFile="${rat.report}">
- <fileset dir="${basedir}/${package.url.name}">
- <!-- exclude media (png, gif, jpg, mp3, flv) -->
- <exclude name="**/*.png"/>
- <exclude name="**/*.gif"/>
- <exclude name="**/*.jpg"/>
- <exclude name="**/*.mp3"/>
- <exclude name="**/*.flv"/>
- <exclude name="installer/build.number"/>
- <exclude name="**/swfobject.js"/>
- <exclude name="**/DoNotDeleteUntilFile.txt" />
- <exclude name="CONTRIBUTORS"/>
- <exclude name="CONTRIBUTING"/>
- </fileset>
- </rat:report>
- <antcall target="display-text" >
- <param name="file" value="${rat.report}" />
- </antcall>
- <input
- message="Check that there are no unknown or unapproved licenses or archives. Is it ok?"
- validargs="y,n"
- defaultvalue="y"
- addproperty="rat.license.ok"/>
- <echo>filtering out AL files to make it easier to see binary files</echo>
- <copy file="${rat.report}" tofile="${rat.report}.bin.txt" />
- <replaceregexp file="${rat.report}.bin.txt" match="..AL.*" replace="" byline="true"/>
- <antcall target="display-text" >
- <param name="file" value="${rat.report}.bin.txt" />
- </antcall>
- <input
- message="Check that there are no unexpected binaries. Is it ok?"
- validargs="y,n"
- defaultvalue="n"
- addproperty="rat.binaries.ok"/>
- </target>
-
- <target name="check-notices" description="open each notice file for review, grep for a few things" >
- <fail message="README not in package">
- <condition>
- <not>
- <available file="${basedir}/${package.url.name}/blazeds-${release.version}/README" />
- </not>
- </condition>
- </fail>
- <fail message="RELEASE_NOTES not in package">
- <condition>
- <not>
- <available file="${basedir}/${package.url.name}/blazeds-${release.version}/RELEASE_NOTES" />
- </not>
- </condition>
- </fail>
- <fail message="NOTICE not in package">
- <condition>
- <not>
- <available file="${basedir}/${package.url.name}/blazeds-${release.version}/NOTICE" />
- </not>
- </condition>
- </fail>
- <fail message="LICENSE not in package">
- <condition>
- <not>
- <available file="${basedir}/${package.url.name}/blazeds-${release.version}/LICENSE" />
- </not>
- </condition>
- </fail>
- <antcall target="display-text" >
- <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/README" />
- </antcall>
- <input
- message="Check the README for version numbers, spelling, grammar, accuracy. Is it ok?"
- validargs="y,n"
- defaultvalue="y"
- addproperty="readme.ok"/>
-
- <antcall target="display-text" >
- <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/RELEASE_NOTES" />
- </antcall>
- <input
- message="Check the RELEASE_NOTES for copyright years, spelling, grammar, accuracy. Is it ok?"
- validargs="y,n"
- defaultvalue="y"
- addproperty="releasenotes.ok"/>
-
- <antcall target="display-text" >
- <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/NOTICE" />
- </antcall>
- <input
- message="Check the NOTICE for required notices from third-parties. Is it ok?"
- validargs="y,n"
- defaultvalue="y"
- addproperty="notice.ok"/>
-
- <antcall target="display-text" >
- <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/LICENSE" />
- </antcall>
- <input
- message="Check the LICENSE for the Apache License and third-party licenses. Is it ok?"
- validargs="y,n"
- defaultvalue="y"
- addproperty="license.ok"/>
- </target>
-
- <target name="build" depends="copy.downloads">
- <input
- message="The final step is to run the build and any tests the build script runs. This can take several minutes. Press y to start the build."
- validargs="y"
- defaultvalue="y" />
- <exec dir="${basedir}/${package.url.name}/blazeds-${release.version}" executable="mvn" >
- <arg value="install" />
- </exec>
- </target>
-
- <target name="copy.downloads" if="${do.copy.downloads}" description="instead of actually downloading all of the dependencies, you can save lots of time by just copying from some other folder in some other SDK.">
- <echo>Copying downloads</echo>
- <copy todir="${basedir}/${package.url.name}/in" >
- <fileset dir="${download.cache.dir}" />
- </copy>
- </target>
-
- <target name="approve" >
- <condition property="vote" value="+1">
- <and>
- <equals arg1="${rat.license.ok}" arg2="y" />
- <equals arg1="${rat.binaries.ok}" arg2="y" />
- <equals arg1="${readme.ok}" arg2="y" />
- <equals arg1="${releasenotes.ok}" arg2="y" />
- <equals arg1="${notice.ok}" arg2="y" />
- <equals arg1="${license.ok}" arg2="y" />
- </and>
- </condition>
- <property name="vote" value="-1" />
- <echo>
-${vote}
-Package ${package.url.path}/${package.url.name}.${package.suffix}
-Java ${ant.java.version}
-OS: ${os.name} ${os.arch} ${os.version}
-Source kit signatures match: y
-Source kit builds: y
-README is ok: ${readme.ok}
-RELEASE_NOTES is ok: ${releasenotes.ok}
-NOTICE is ok: ${notice.ok}
-LICENSE is ok: ${license.ok}
-No unapproved licenses or archives: ${rat.license.ok}
-No unapproved binaries: ${rat.binaries.ok}
- </echo>
- <fail>
- <condition>
- <equals arg1="-1" arg2="${vote}"/>
- </condition>
- </fail>
- <antcall target="no-asc" />
- </target>
-
- <target name="no-asc" if="no.asc" >
- <echo>PGP signature not checked</echo>
- </target>
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/README
----------------------------------------------------------------------
diff --git a/README b/README
index 28e3980..ab79c2f 100644
--- a/README
+++ b/README
@@ -4,48 +4,21 @@ Apache Flex BlazeDS
Apache Flex SDK is an application development framework for easily building
Flash-based applications for mobile devices, web browsers, and desktops.
- Apache Flex BlazeDS is the server-based Java remoting and web messaging
- technology that enables developers to easily connect to back-end distributed
- data and push data in real-time to Adobe® Flex® and Adobe AIR™ applications
+ Apache Flex BlazeDS is the server-based Java remoting and web messaging
+ technology that enables developers to easily connect to back-end distributed
+ data and push data in real-time to Adobe® Flex® and Adobe AIR™ applications
for more responsive rich Internet application (RIA) experiences..
- Apache Flex BlazeDS 4.7 is the initial release of BlazeDS from the Apache
- Software Foundation. Prior to this, releases were provided by Adobe
- Systems Inc. This version adds new features and implements bug fixes
- that were unavailable in previous versions. It is compatible with most code
- written to target Adobe Flex 4.6.
+ Apache Flex BlazeDS 4.7.1 is an update to the initial release of BlazeDS
+ from the Apache Software Foundation. Prior to this, releases were provided
+ by Adobe Systems Inc. It is compatible with most code written to target Adobe
+ Flex 4.6.
For detailed information about Apache Flex please visit
http://flex.apache.org/
- Apache Flex BlazeDS is a large project with many pieces. The software is
- implemented partially in ActionScript and partially in Java.
- Currently supported platforms include:
-
- Microsoft Windows
- Mac OS X
- Apple iOS
- Google Android
- RIM BlackBerry
- Linux
-
- Apache Flex is the software evolution of the popular Adobe BlazeDS project.
-
- The community surrounding Flex is vast, diverse, distributed globally, and
- with all levels of proficiency in software development.
-
- There has been more that 30,000 installs of Apache Flex. The Apache Flex web
- site gets 3 quarters of a million page views a year and more than 250,000
- unique visitors a year.
-
-
-Getting the convenience packages for Apache Flex
-================================================
-
- TBD
-
-Getting the latest sources via git
+Getting the latest sources via Git
==================================
Getting the source code is the recommended way to get Apache Flex BlazeDS.
@@ -57,22 +30,11 @@ Getting the latest sources via git
cd blazeds
git checkout develop
- Apache Flex BlazeDS also requires source code from other Apache Flex git
- repositories. To get the latest source via git for the Apache Flex SDK
- use the following command:
-
- git clone https://git-wip-us.apache.org/repos/asf/flex-sdk.git sdk
- cd sdk
- git checkout develop
-
- Linux support is currently experimental and you may run into issues. Apache
- Flex would like to see a fully supported Linux release, but we need support
- from the community in order to do that. Please help out if you can.
-
For further information visit http://flex.apache.org/download-source.html
-Building Apache Flex BlazeDS 4.7
-================================
+
+Building Apache Flex BlazeDS 4.7.1
+==================================
Apache Flex BlazeDS is a large project. It requires some build tools which must be
installed prior to building BlazeDS and it depends on some external software
@@ -87,353 +49,100 @@ Building Apache Flex BlazeDS 4.7
Linux support is currently experimental and while it is possible to compile
BlazeDS it has not been fully tested so you may run into issues.
+
Install Prerequisites
---------------------
- Before building BlazeDS you must install the following software and set the
- corresponding environment variables using absolute file paths. Relative
- file paths will result in build errors.
-
- The environment variables PLAYERGLOBAL_HOME, AIR_HOME, FLASHPLAYER_DEBUGGER,
- FLEX_HOME can also be set in the property file
- called env.properties. See the env-template.properties file for
- instructions.
-
- The Adobe Flash Player playerglobal.swc is needed to compile all the
- ActionScript components. The Adobe Flash Player
- content debugger is used by checkintests and other pieces of the test
- subsystem to run compiled applications.
+ Before building the Apache Flex BlazeDS you must install the following software
+ and set the corresponding environment variables using absolute file paths.
+ Relative file paths will result in build errors.
==================================================================================
SOFTWARE ENVIRONMENT VARIABLE (absolute paths)
==================================================================================
Java SDK 1.6 or greater (*1) JAVA_HOME
- (for Java 1.7 see note at (*2))
- Ant 1.7.1 or greater (*1) ANT_HOME
- (for Java 1.7 see note at (*2))
-
- Adobe AIR Integration Kit (*3) AIR_HOME
-
- Adobe Flash Player Content Debugger (*4) FLASHPLAYER_DEBUGGER
-
- Adobe Flash Player playerglobal swcs (*5) PLAYERGLOBAL_HOME
-
- Apache Flex SDK (*6) FLEX_HOME
+ Maven 2.2.0 or greater (*1) MAVEN_HOME
==================================================================================
- *1) The bin directories for ANT_HOME and JAVA_HOME should be added to your
+ *1) The bin directories for MAVEN_HOME and JAVA_HOME should be added to your
PATH.
On Windows, set PATH to
- PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin
+ PATH=%PATH%;%MAVEN_HOME%\bin;%JAVA_HOME%\bin
On the Mac (bash), set PATH to
- export PATH="$PATH:$ANT_HOME/bin:$JAVA_HOME/bin"
-
- On Linux make sure you path include ANT_HOME and JAVA_HOME.
-
- *2) If you are using Java SDK 1.7 or greater on a Mac you must use Ant 1.8
- or greater. If you use Java 1.7 with Ant 1.7, ant reports the java
- version as 1.6 so the JVM args for the data model (-d32/-d64) will not
- be set correctly and you will get compile errors.
-
- *3) The Adobe AIR integration kit for Windows can be downloaded from:
- http://airdownload.adobe.com/air/win/download/13.0/AdobeAIRSDK.zip
-
- The Adobe AIR integration kit for Mac can be downloaded from:
- http://airdownload.adobe.com/air/mac/download/13.0/AdobeAIRSDK.tbz2
-
- The Adobe AIR integration kit for Linux can be downloaded from:
- http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRSDK.tbz2
-
- This version of Apache Flex was certified for use with AIR 13.0, and
- should be compatible with other versions of AIR newer than 3.1. However
- it hasn't been fully tested on AIR 3.2, 3.3, 3.5, 3.6 or 3.7.
-
- Download the AIR SDK for your platform and unzip it. Set AIR_HOME to the
- absolute path of the AIR SDK directory.
-
- *4) The Adobe Flash Player content debuggers can be found here:
- http://www.adobe.com/support/flashplayer/downloads.html
-
- This version of Apache Flex was certified for use with Adobe Flash
- Player 11.1, and is compatible with versions 10.2 through 13.0. It has
- been tested with versions 11.1, 11.7, 11.8, 11.9 and 12.0 on Windows
- and Mac. It has been compiled against other Adobe Flash Player versions
- but has not been fully tested. It has not been fully tested on Linux.
-
- On Windows, set FLASHPLAYER_DEBUGGER to the absolute path including the
- filename of the FlashPlayerDebugger.exe. Note the filename of flash
- player debugger maybe different.
- e.g. C:\MyPath\FlashPlayerDebugger.exe
-
- On the Mac, set FLASHPLAYER_DEBUGGER to the absolute path of
- Flash Player Debugger.app/Contents/MacOS/Flash Player Debugger
-
- On Linux, set FLASHPLAYER_DEBUGGER to the absolute path of
- flashplayerdebugger
+ export PATH="$PATH:$MAVEN_HOME/bin:$JAVA_HOME/bin"
- *5) The Adobe Flash Player playerglobal.swc for 11.1 can be downloaded from:
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_1.swc
+ On Linux make sure you path include MAVEN_HOME and JAVA_HOME.
- Use URL above to download playerglobal11_1.swc. Create the directory,
- player/11.1 and copy playerglobal11_1.swc to
- player/11.1/playerglobal.swc.
-
- Set PLAYERGLOBAL_HOME to the absolute path of the player directory (not
- including the version subdirectory). The target-player option controls
- which PLAYERGLOBAL_HOME subdirectory is used.
-
- Other more recent versions of Adobe Flash Player playerglobal.swc can be
- downloaded from:
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_2.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_3.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_4.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_5.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_6.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_7.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_8.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_9.swc
- http://download.macromedia.com/get/flashplayer/updaters/12/playerglobal12_0.swc
- http://download.macromedia.com/get/flashplayer/updaters/13/playerglobal13_0.swc
-
- These can be used with Apache Flex but not all have not been fully
- tested.
-
- *6) The Apache Flex SDK is required to build some of the ActionScript code.
-
- Set FLEX_HOME to the absolute path of Apache Flex SDK.
-
-FlashPlayer Configuration
--------------------------
-
- For testing, the Adobe Flash Player's mm.cfg file must have the following
- entries
-
- ErrorReportingEnable=1
- TraceOutputFileEnable=1
-
- and a FlashPlayerTrust file must allow local SWFs to access local files.
-
-
-Adobe Flash Player Version Support
-----------------------------------
-
- Apache Flex BlazeDS defaults to using the Adobe Flash Player 11.1. The SDK
- can be used with Flash Player versions 10.2, 10.3, 11.0, 11.1, 11.2, 11.3,
- 11.4, 11.5, 11.6, 11.7, 11.8, 11.9, 12.0 and 13.0.
-
- It is recommended that you update to the latest version of Adobe Flash
- Player. Newer versions of the Adobe Flash player address security
- vulnerabilities, fix bugs/issues, increase stability, and implement new
- features.
-
- To use the SDK for another version of the Adobe Flash Player either:
-
- Change the flex-config.xml configuration file to specify another version of
- the Adobe Flash Player.
-
- OR
-
- Change the playerglobal.version in the build.properties file to have a value
- other than "11.1". For this change to take effect the SDK needs to be
- recompiled. For example to compile against the latest version of the Adobe
- Flash Player set the value of playerglobal.version to be "12.0" like so:
-
- playerglobal.version = 13.0
-
- OR
-
- Compile the SDK with a -Dplayerglobal.version=<version> option, where
- <version> is the Adobe Flash Player version to compile the SDK against.
-
-
- Different versions of the Adobe Flash Player require different versions of
- playerglobal.swc.
-
- These can be found at:
-
- http://download.macromedia.com/get/flashplayer/installers/archive/playerglobal/playerglobal10_2.swc
- http://download.macromedia.com/get/flashplayer/installers/archive/playerglobal/playerglobal10_3.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_0.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_1.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_2.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_3.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_4.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_5.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_6.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_7.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_8.swc
- http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_9.swc
- http://download.macromedia.com/get/flashplayer/updaters/12/playerglobal12_0.swc
- http://download.macromedia.com/get/flashplayer/updaters/13/playerglobal13_0.swc
-
- Copy the target playerglobal.swc to the directory:
-
- frameworks/libs/player/<version>/playerglobal.swc
-
- Where <version> is the major and minor version numbers of the Adobe Flash
- Player separated by a period or full stop.
-
- If all of the playerglobal swcs where installed the frameworks/libs/player
- directory structure would look like this.
-
- /frameworks
- /libs
- /player
- /10.2
- /playerglobal.swc
- /10.3
- /playerglobal.swc
- /11.0
- /playerglobal.swc
- /11.2
- /playerglobal.swc
- /11.2
- /playerglobal.swc
- /11.3
- /playerglobal.swc
- /11.4
- /playerglobal.swc
- /11.5
- /playerglobal.swc
- /11.6
- /playerglobal.swc
- /11.7
- /playerglobal.swc
- /11.8
- /playerglobal.swc
- /11.9
- /playerglobal.swc
- /12.0
- /playerglobal.swc
- /13.0
- /playerglobal.swc
-
- Apache Flex has been tested with Adobe Flash Player 11.1, 11.5, 11.7, 11.8,
- 11.9, 12.0 nd 13.0 on Windows and Mac.
-
- Apache Flex has not been tested on Linux so some issue may exist in this
- release.
-
- It compiles against other Adobe Flash Player versions and is expected to
- work but their may be some issues, particularly with the earlier 10.2 and
- 10.3 versions of the Adobe Flash Player.
Software Dependencies
---------------------
- Apache Flex uses third-party code that will be downloaded as part of the
- Apache Flex build. In addition, there is some optional third-party code
- that you can choose to download if you would like to take advantage of the
- features offered and you agree to the license terms.
-
- The Apache Version 2.0 license is in the LICENSE file.
-
- The following dependencies have licenses which are, or are compatible with,
- the Apache Version 2.0 license. You will not be prompted to acknowledge the
- download. Most of the jars are installed in lib/external.
-
- activemq - http://archive.apache.org/dist/activemq/apache-activemq/5.3.1/apache-activemq-5.3.1-bin.zip
- codec - http://archive.apache.org/dist/commons/codec/binaries/commons-codec-1.5-bin.zip
- commons-collections - http://archive.apache.org/dist/commons/collections/binaries/commons-collections-3.1.tar.gz
- commons-fileupload - http://archive.apache.org/dist/commons/fileupload/binaries/commons-fileupload-1.1.zip
- commons-httpclient - http://archive.apache.org/dist/httpcomponents/commons-httpclient/binary/commons-httpclient-3.1.zip
- commons-logging - http://archive.apache.org/dist/commons/logging/binaries/commons-logging-1.1.1-bin.zip
- hsqldb - http://downloads.sourceforge.net/project/hsqldb/hsqldb/hsqldb_1_8_0/hsqldb_1_8_0_10.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fhsqldb%2Ffiles%2Fhsqldb%2Fhsqldb_1_8_0%2F&ts=1378509998&use_mirror=softlayer-dal
- jms - http://downloads.sourceforge.net/project/openjms/openjms/openjms-0.7.6.1/openjms-0.7.6.1.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopenjms%2Ffiles%2Fopenjms%2Fopenjms-0.7.6.1%2F&ts=1378512874&use_mirror=hivelocity
- log4j - http://archive.apache.org/dist/logging/log4j/1.2.14/logging-log4j-1.2.14.zip
- spring-framework - http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.0.3.RELEASE.zip
- spring-security - http://s3.amazonaws.com/dist.springframework.org/release/SEC/spring-security-3.0.3.RELEASE.zip
- spring-flex - http://repo1.maven.org/maven2/org/springframework/flex/spring-flex-core/1.5.2.RELEASE/spring-flex-core-1.5.2.RELEASE.jar
- jakarta-taglibs - http://archive.apache.org/dist/jakarta/taglibs/standard/binaries/jakarta-taglibs-standard-1.1.2.zip
- aopalliance - http://downloads.sourceforge.net/project/aopalliance/aopalliance/1.0/aopalliance.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Faopalliance%2Ffiles%2Faopalliance%2F1.0%2F&ts=1378515484&use_mirror=softlayer-dal
- backport - http://downloads.sourceforge.net/project/backport-jsr166/backport-jsr166/2.2/backport-util-concurrent-2.2.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fbackport-jsr166%2Ffiles%2Fbackport-jsr166%2F2.2%2F&ts=1378515970&use_mirror=heanet
- cglib - http://downloads.sourceforge.net/project/cglib/cglib2/cglib%202.1_03/cglib-nodep-2.1_3.jar?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fcglib%2Ffiles%2Fcglib2%2Fcglib%25202.1_03%2F&ts=1378516297&use_mirror=hivelocity
- jackson-core - http://repository.codehaus.org/org/codehaus/jackson/jackson-core-asl/1.0.0/jackson-core-asl-1.0.0.jar
- tomcat - http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.zip
- xalan - http://archive.apache.org/dist/xml/xalan-j/binaries/xalan-j_2_6_0-bin.tar.gz
- xerces - http://archive.apache.org/dist/xerces/j/Xerces-J-bin.2.9.1.zip
- ExcludeDoclet.java - http://sixlegs.com/misc/ExcludeDoclet.java
- mx4j - http://repo1.maven.org/maven2/mx4j/mx4j-jmx/1.1.1/mx4j-jmx-1.1.1.jar
- axis - http://archive.apache.org/dist/axis/axis/java/1.4/axis-bin-1_4.zip
- testng - http://mirrors.ibiblio.org/pub/mirrors/maven2/org/testng/testng/5.8/testng-5.8-jdk15.jar
+ Apache BlazeDS uses a variety of third party libraries. A detailed summary
+ of all of these dependencies is listed in the releases DEPENDENCIES file.
+
Using the Binary Distribution
-----------------------------
- TBD
-
-Building the Framework in a Binary Distribution
------------------------------------------------
-
- The source for most of the framework is included in the binary distribution.
- It can be useful if you wish to debug and/or extend components.
-
- When you have all the prerequisites in place and the environment variables
- set, (see Install Prerequisites above), use
-
- cd <blazeds.dir>
- ant main (or just ant since the default target is main)
-
- to download the third-party dependencies and build BlazeDS. You
- may be prompted to acknowledge some of the downloads. Since the third-party
- dependencies take a little while to download and they don't change very
- often, they are not cleaned with the regular clean target.
-
- To clean the build, of everything other than the downloaded third-party
- dependencies use
-
- ant clean
-
- To clean the build, of everything, including the downloaded third-party
- dependencies use
-
- ant super-clean (which is just thirdparty-clean followed by clean)
-
-Building the Source in the Source Distribution
+ Binary artifacts of Apache BlazeDS are available on Apache's public Maven
+ repositories.
+
+ By adding a Dependency to the following Maven artifact the binary
+ version of Apache BlazeDS will automatically be downloaded.
+
+ <dependency>
+ <groupId>org.apache.flex.blazeds</groupId>
+ <artifactId>flex-messaging-common</artifactId>
+ <version>4.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.blazeds</groupId>
+ <artifactId>flex-messaging-core</artifactId>
+ <version>4.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.blazeds</groupId>
+ <artifactId>flex-messaging-opt</artifactId>
+ <version>4.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.blazeds</groupId>
+ <artifactId>flex-messaging-proxy</artifactId>
+ <version>4.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.flex.blazeds</groupId>
+ <artifactId>flex-messaging-remoting</artifactId>
+ <version>4.7.1</version>
+ </dependency>
+
+
+Building the Source
----------------------------------------------
When you have all the prerequisites in place and the environment variables
set (see Install Prerequisites above), use
- cd <blazeds.dir>
- ant main (or just ant since the default target is main)
-
- to download the thirdparty dependencies and build the source. You may be
- prompted to acknowledge and/or confirm some of the downloads. Since the
- third-party dependencies take a little while to download and they don't
- change very often, they are not cleaned with the regular clean target.
-
- To clean the build, of everything other than the downloaded third-party
- dependencies use
-
- ant clean
-
- To clean the build, of everything, including the downloaded third-party
- dependencies use
-
- ant super-clean (which is just thirdparty-clean followed by clean)
-
- To generate a source distribution package and a binary distribution package
- use
-
- ant -Dbuild.number=<YYYYMMDD> -Dbuild.noprompt= release
-
- The packages can be found in the "out" subdirectory.
+ cd <flex-blazeds.dir>
+ mvn install
- To build the ASDoc package
+ Notice that you have to enter the modules directory in order to able to
+ execute the Maven build as the rest of the project still contains an
+ outdated and no longer maintained ANT build. This will be removed in
+ future versions.
- ant asdoc-package
- To get a brief listing of all the targets type
+Running Tests
+-------------
- ant -projecthelp
+ The testsuite is automatically executed during a normal maven build.
Thanks for using Apache Flex BlazeDS. Enjoy!
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/RELEASE_NOTES
----------------------------------------------------------------------
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index 48159ce..079269c 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -1,7 +1,17 @@
+Apache Flex BlazeDS 4.7.1
+=======================
+
+Apache Flex BlazeDS 4.7.1 is an update to 4.7.0 to allow configuration control
+over XML Entity processing.
+
+Known Issues
+_____________
+FLEX-34648 Memory Leak occurred in AsyncMessage when sending alot of
+
Apache Flex BlazeDS 4.7
-=================
+=======================
-Apache Flex BlazeDS 4.7 is the first release of BlazeDS from Apache. Earlier
+Apache Flex BlazeDS 4.7 is the first release of BlazeDS from Apache. Earlier
releases were provided by Adobe Systems Inc.
Known Issues
@@ -10,9 +20,12 @@ _____________
Differences from Adobe BlazeDS 4.6 include:
-TBD
+- No functional differences the only changes that were made were adding code to make the
+ test-suite run against a server instance brought up by the test-suite itself making it
+ self sufficient. The Adobe version relied on the availability of a running BlazeDS server
+ instance.
-Please report new issues to our bugbase at:
+Please report new issues to our bug tracker at:
https://issues.apache.org/jira/browse/FLEX
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/WEB-INF/classes/commons-logging.properties
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/WEB-INF/classes/commons-logging.properties b/apps/blazeds-spring/WEB-INF/classes/commons-logging.properties
deleted file mode 100755
index 46c3be4..0000000
--- a/apps/blazeds-spring/WEB-INF/classes/commons-logging.properties
+++ /dev/null
@@ -1,19 +0,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.
-
-# suppress logging for 3rd-party libraries using commons-logging
-# Flex logging is not configured here. It is configured through in the logging section of flex-config.xml
-org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
-org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/WEB-INF/flex-servlet.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/WEB-INF/flex-servlet.xml b/apps/blazeds-spring/WEB-INF/flex-servlet.xml
deleted file mode 100755
index 21d1e5a..0000000
--- a/apps/blazeds-spring/WEB-INF/flex-servlet.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:flex="http://www.springframework.org/schema/flex"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/flex
- http://www.springframework.org/schema/flex/spring-flex-1.5.xsd">
-
- <flex:message-broker>
- <flex:message-service
- default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" />
- <flex:secured />
- </flex:message-broker>
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/WEB-INF/flex/messaging-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/WEB-INF/flex/messaging-config.xml b/apps/blazeds-spring/WEB-INF/flex/messaging-config.xml
deleted file mode 100755
index 34f4d3f..0000000
--- a/apps/blazeds-spring/WEB-INF/flex/messaging-config.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?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.
-
--->
-<service id="message-service"
- class="flex.messaging.services.MessageService">
-
- <adapters>
- <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
- <!-- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/> -->
- </adapters>
-
- <default-channels>
- <channel ref="my-polling-amf"/>
- </default-channels>
-
-</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/WEB-INF/flex/proxy-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/WEB-INF/flex/proxy-config.xml b/apps/blazeds-spring/WEB-INF/flex/proxy-config.xml
deleted file mode 100755
index 9335e6c..0000000
--- a/apps/blazeds-spring/WEB-INF/flex/proxy-config.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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.
-
--->
-<service id="proxy-service"
- class="flex.messaging.services.HTTPProxyService">
-
- <properties>
- <connection-manager>
- <max-total-connections>100</max-total-connections>
- <default-max-connections-per-host>2</default-max-connections-per-host>
- </connection-manager>
- <allow-lax-ssl>true</allow-lax-ssl>
- </properties>
-
- <adapters>
- <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
- <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
- </adapters>
-
- <default-channels>
- <channel ref="my-amf"/>
- </default-channels>
-
- <destination id="DefaultHTTP">
- </destination>
-
-</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/WEB-INF/flex/remoting-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/WEB-INF/flex/remoting-config.xml b/apps/blazeds-spring/WEB-INF/flex/remoting-config.xml
deleted file mode 100755
index 88a4a1f..0000000
--- a/apps/blazeds-spring/WEB-INF/flex/remoting-config.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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.
-
--->
-<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>
-
-</service>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/WEB-INF/flex/services-config.xml b/apps/blazeds-spring/WEB-INF/flex/services-config.xml
deleted file mode 100755
index 289fbfe..0000000
--- a/apps/blazeds-spring/WEB-INF/flex/services-config.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?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.
-
--->
-<services-config>
-
- <services>
- <service-include file-path="remoting-config.xml" />
- <service-include file-path="proxy-config.xml" />
- <service-include file-path="messaging-config.xml" />
- </services>
-
- <security>
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
- <!-- Uncomment the correct app server
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
- <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
- <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
- <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
- -->
-
- <!--
- <security-constraint id="basic-read-access">
- <auth-method>Basic</auth-method>
- <roles>
- <role>guests</role>
- <role>accountants</role>
- <role>employees</role>
- <role>managers</role>
- </roles>
- </security-constraint>
- -->
- </security>
-
- <channels>
-
- <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
- </channel-definition>
-
- <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
- <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
- <properties>
- <add-no-cache-headers>false</add-no-cache-headers>
- </properties>
- </channel-definition>
-
- <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>4</polling-interval-seconds>
- </properties>
- </channel-definition>
-
- <!--
- <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
- </channel-definition>
-
- <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
- <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
- <properties>
- <add-no-cache-headers>false</add-no-cache-headers>
- </properties>
- </channel-definition>
- -->
- </channels>
-
- <logging>
- <target class="flex.messaging.log.ConsoleTarget" level="Error">
- <properties>
- <prefix>[BlazeDS] </prefix>
- <includeDate>false</includeDate>
- <includeTime>false</includeTime>
- <includeLevel>false</includeLevel>
- <includeCategory>false</includeCategory>
- </properties>
- <filters>
- <pattern>Endpoint.*</pattern>
- <pattern>Service.*</pattern>
- <pattern>Configuration</pattern>
- </filters>
- </target>
- </logging>
-
- <system>
- <redeploy>
- <enabled>false</enabled>
- <!--
- <watch-interval>20</watch-interval>
- <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
- <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
- -->
- </redeploy>
- </system>
-
-</services-config>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/WEB-INF/spring/app-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/WEB-INF/spring/app-config.xml b/apps/blazeds-spring/WEB-INF/spring/app-config.xml
deleted file mode 100755
index b78ba74..0000000
--- a/apps/blazeds-spring/WEB-INF/spring/app-config.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:security="http://www.springframework.org/schema/security"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
- http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/WEB-INF/spring/infrastructure-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/WEB-INF/spring/infrastructure-config.xml b/apps/blazeds-spring/WEB-INF/spring/infrastructure-config.xml
deleted file mode 100755
index 5cbe9ab..0000000
--- a/apps/blazeds-spring/WEB-INF/spring/infrastructure-config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/WEB-INF/spring/security-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/WEB-INF/spring/security-config.xml b/apps/blazeds-spring/WEB-INF/spring/security-config.xml
deleted file mode 100755
index 06edb10..0000000
--- a/apps/blazeds-spring/WEB-INF/spring/security-config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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.
-
--->
-<beans:beans xmlns="http://www.springframework.org/schema/security"
- xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
-
- <http entry-point-ref="entryPoint">
- <anonymous enabled="false"/>
- </http>
-
- <beans:bean id="entryPoint" class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>
-
- <authentication-manager>
- <authentication-provider>
- <user-service>
- <user name="john" password="john" authorities="ROLE_USER" />
- <user name="admin" password="admin" authorities="ROLE_USER, ROLE_ADMIN" />
- <user name="guest" password="guest" authorities="ROLE_GUEST" />
- </user-service>
- </authentication-provider>
- </authentication-manager>
-
-</beans:beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/WEB-INF/web.xml b/apps/blazeds-spring/WEB-INF/web.xml
deleted file mode 100755
index ec5c772..0000000
--- a/apps/blazeds-spring/WEB-INF/web.xml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?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.
-
--->
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
-
- <display-name>BlazeDS Spring Integration Application</display-name>
- <description>BlazeDS Spring Integration Application</description>
-
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>
- /WEB-INF/spring/*-config.xml
- </param-value>
- </context-param>
-
- <filter>
- <filter-name>springSecurityFilterChain</filter-name>
- <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>springSecurityFilterChain</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <!-- Http Flex Session attribute and binding listener support -->
- <listener>
- <listener-class>flex.messaging.HttpFlexSession</listener-class>
- </listener>
-
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
-
- <!-- Spring Dispatcher Servlet -->
- <servlet>
- <servlet-name>flex</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
-<!-- begin rds
- <servlet>
- <servlet-name>RDSDispatchServlet</servlet-name>
- <display-name>RDSDispatchServlet</display-name>
- <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
- <init-param>
- <param-name>useAppserverSecurity</param-name>
- <param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>messageBrokerId</param-name>
- <param-value>_messageBroker</param-value>
- </init-param>
- <load-on-startup>10</load-on-startup>
- </servlet>
-
- <servlet-mapping id="RDS_DISPATCH_MAPPING">
- <servlet-name>RDSDispatchServlet</servlet-name>
- <url-pattern>/CFIDE/main/ide.cfm</url-pattern>
- </servlet-mapping>
-end rds -->
-
- <servlet-mapping>
- <servlet-name>flex</servlet-name>
- <url-pattern>/messagebroker/*</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- <welcome-file>index.htm</welcome-file>
- </welcome-file-list>
-
- <!-- for WebSphere deployment, please uncomment -->
- <!--
- <resource-ref>
- <description>Flex Messaging WorkManager</description>
- <res-ref-name>wm/MessagingWorkManager</res-ref-name>
- <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
- -->
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/build.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/build.xml b/apps/blazeds-spring/build.xml
deleted file mode 100755
index dc3b1c4..0000000
--- a/apps/blazeds-spring/build.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?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="blazeds-spring.war/build.xml" default="main" basedir="../..">
-
- <property file="${basedir}/build.properties" />
- <property name="blazeds-spring.war" value="${basedir}/apps/blazeds-spring" />
- <property name="dist.dir" value="${basedir}/dist" />
- <property name="src.dir" value="${blazeds-spring.war}/WEB-INF/src"/>
- <property name="classes.dir" value="${blazeds-spring.war}/WEB-INF/classes"/>
-
- <path id="classpath">
- <fileset dir="${blazeds-spring.war}/WEB-INF/lib" includes="**/*.jar" />
- </path>
-
- <target name="main" depends="clean,compile" />
-
- <target name="prepare">
- <mkdir dir="${blazeds-spring.war}/WEB-INF/src" />
- <mkdir dir="${blazeds-spring.war}/WEB-INF/lib" />
- <mkdir dir="${blazeds-spring.war}/WEB-INF/classes" />
- </target>
-
- <target name="run-depend" if="src.depend">
- <echo message="Removing class files that changed and dependent class files." />
- <depend cache="${classes.dir}" srcdir="${src.dir}" destdir="${classes.dir}" />
- </target>
-
- <target name="copy-resources">
- <copy todir="${blazeds-spring.war}/WEB-INF/lib">
- <fileset dir="${basedir}/lib" includes="${webapp.ce.lib}" />
- <fileset dir="${basedir}/lib/spring" includes="**/*" />
- <fileset dir="${basedir}/lib/aspectj" includes="**/*" />
- </copy>
- <copy todir="${classes.dir}">
- <fileset dir="${basedir}/lib" includes="${webapp.classes}" />
- </copy>
-
- <propertyfile file="${blazeds-spring.war}/WEB-INF/flex/version.properties">
- <entry key="build" value="${manifest.Implementation-Version}.${build.number}"/>
- <entry key="minimumSDKVersion" value="${min.sdk.version}"/>
- </propertyfile>
-
- </target>
-
- <target name="compile" depends="prepare,run-depend,copy-resources" description="compile">
- <javac source="1.4" debug="${src.debug}" destdir="${classes.dir}" srcdir="${src.dir}" classpathref="classpath" />
- </target>
-
- <target name="package" description=" Creates distribution war file">
- <mkdir dir="${dist.dir}" />
- <war file="${dist.dir}/blazeds-spring.war" webxml="${blazeds-spring.war}/WEB-INF/web.xml">
- <manifest>
- <attribute name="Sealed" value="${manifest.sealed}" />
- <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - BlazeDS Spring Integration Application" />
- <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}" />
- <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}" />
- </manifest>
- <fileset dir="${blazeds-spring.war}">
- <exclude name="build.xml" />
- <exclude name="WEB-INF/src/**/*.java" />
- <exclude name="WEB-INF/jsp/**/*" />
- <exclude name="WEB-INF/sessions/**/*" />
- <!-- This is included in the war task already -->
- <exclude name="WEB-INF/web.xml" />
- </fileset>
- </war>
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true">
- <fileset dir="${blazeds-spring.war}/WEB-INF/lib" includes="**/*" />
- </delete>
- <delete quiet="true">
- <fileset dir="${classes.dir}" includes="**/*.class"/>
- </delete>
- <delete quiet="true" file="${dist.dir}/blazeds-spring.war" />
- </target>
-
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds-spring/index.htm
----------------------------------------------------------------------
diff --git a/apps/blazeds-spring/index.htm b/apps/blazeds-spring/index.htm
deleted file mode 100755
index 8ce9112..0000000
--- a/apps/blazeds-spring/index.htm
+++ /dev/null
@@ -1,50 +0,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.
--->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Welcome to BlazeDS</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<style>
-body, pre { font-family:Tahoma,Helvetica,sans-serif; font-size:10pt; }
-div.indent { margin-left: 20;}
-span.reference { font-weight: bold }
-span.header {white-space:nowrap }
-span.title {font-size:12pt; color:blue}
-span.highlight { background-color: #FFFFB7 }
-table.code { font-family: courier; font-size: 9pt;}
-span.fade { color:#666666; font-size:11px }
-</style>
-</head>
-<body>
-<span class="title">Welcome to BlazeDS</span>
-<br>
- <br>
-This is an empty BlazeDS application that serves as a template for creating your custom BlazeDS Spring application.
-<!--
-<br> <br>
-If you're looking for sample Flex applications, check with the system administrator for the URL where the samples are deployed.
--->
-<br>
- <br>
-Visit the <a href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS">product page</a> for documentation and further information.
-</body>
-</html>
-
-
-
-
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds/WEB-INF/classes/commons-logging.properties
----------------------------------------------------------------------
diff --git a/apps/blazeds/WEB-INF/classes/commons-logging.properties b/apps/blazeds/WEB-INF/classes/commons-logging.properties
deleted file mode 100755
index 46c3be4..0000000
--- a/apps/blazeds/WEB-INF/classes/commons-logging.properties
+++ /dev/null
@@ -1,19 +0,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.
-
-# suppress logging for 3rd-party libraries using commons-logging
-# Flex logging is not configured here. It is configured through in the logging section of flex-config.xml
-org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
-org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds/WEB-INF/flex/messaging-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds/WEB-INF/flex/messaging-config.xml b/apps/blazeds/WEB-INF/flex/messaging-config.xml
deleted file mode 100755
index 34f4d3f..0000000
--- a/apps/blazeds/WEB-INF/flex/messaging-config.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?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.
-
--->
-<service id="message-service"
- class="flex.messaging.services.MessageService">
-
- <adapters>
- <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
- <!-- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/> -->
- </adapters>
-
- <default-channels>
- <channel ref="my-polling-amf"/>
- </default-channels>
-
-</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds/WEB-INF/flex/proxy-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds/WEB-INF/flex/proxy-config.xml b/apps/blazeds/WEB-INF/flex/proxy-config.xml
deleted file mode 100755
index 9335e6c..0000000
--- a/apps/blazeds/WEB-INF/flex/proxy-config.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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.
-
--->
-<service id="proxy-service"
- class="flex.messaging.services.HTTPProxyService">
-
- <properties>
- <connection-manager>
- <max-total-connections>100</max-total-connections>
- <default-max-connections-per-host>2</default-max-connections-per-host>
- </connection-manager>
- <allow-lax-ssl>true</allow-lax-ssl>
- </properties>
-
- <adapters>
- <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
- <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
- </adapters>
-
- <default-channels>
- <channel ref="my-amf"/>
- </default-channels>
-
- <destination id="DefaultHTTP">
- </destination>
-
-</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds/WEB-INF/flex/remoting-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds/WEB-INF/flex/remoting-config.xml b/apps/blazeds/WEB-INF/flex/remoting-config.xml
deleted file mode 100755
index 88a4a1f..0000000
--- a/apps/blazeds/WEB-INF/flex/remoting-config.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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.
-
--->
-<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>
-
-</service>
\ No newline at end of file
[18/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/src/Customer.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/src/Customer.as b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/src/Customer.as
new file mode 100755
index 0000000..4bc66ad
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/src/Customer.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ [Bindable]
+ public class Customer
+ {
+ public var firstName:String;
+ public var lastName:String;
+ public var usCitizen:Boolean;
+ public var address:String;
+ public var city:String;
+ public var state:String;
+ public var zip:String;
+ public var officePhone:String;
+ public var cellPhone:String;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/src/collaboration.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/src/collaboration.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/src/collaboration.mxml
new file mode 100755
index 0000000..1a445a2
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/src/collaboration.mxml
@@ -0,0 +1,147 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ applicationComplete="init()" xmlns:local="*">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.events.IndexChangedEvent;
+ import mx.messaging.messages.AsyncMessage;
+ import mx.utils.UIDUtil;
+ import mx.messaging.events.MessageEvent;
+ import mx.events.PropertyChangeEvent;
+
+ private var userId:String; // Unique user id
+
+ private function init():void
+ {
+ userId = UIDUtil.createUID(); // Generate unique user id
+ customer.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
+ consumer.subscribe();
+ }
+
+ private function propertyChangeHandler(event:PropertyChangeEvent):void
+ {
+ sendMessage("propertyChange", {property: event.property, value: event.newValue});
+ }
+
+ private function accordionChangeHandler(event:IndexChangedEvent):void
+ {
+ sendMessage("accordionChange", {selectedIndex: event.newIndex});
+ }
+
+ private function messageHandler(event:MessageEvent):void
+ {
+ var remoteUserId:String = event.message.body.userId;
+ // If the message was sent by this user, don't handle it
+ if (remoteUserId == userId)
+ {
+ return;
+ }
+
+ var data:Object = event.message.body.data
+ switch (event.message.body.action)
+ {
+ case "accordionChange":
+ accordion.selectedIndex = data.selectedIndex;
+ return;
+ case "propertyChange":
+ customer.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler); // avoid circularity
+ customer[data.property] = data.value;
+ customer.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
+ return;
+ }
+ }
+
+ private function sendMessage(action:String, data:Object = null):void
+ {
+ var message:AsyncMessage = new AsyncMessage();
+ message.body.userId = userId;
+ message.body.action = action;
+ message.body.data = data;
+ producer.send(message);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <local:Customer id="customer"/>
+
+ <mx:ChannelSet id="cs">
+ <mx:StreamingAMFChannel uri="/samples-spring/messagebroker/streamingamf"/>
+ <mx:AMFChannel uri="/samples-spring/messagebroker/amflongpolling"/>
+ <mx:AMFChannel uri="/samples-spring/messagebroker/amfpolling"/>
+ </mx:ChannelSet>
+
+ <mx:Producer id="producer" destination="chat" channelSet="{cs}"/>
+ <mx:Consumer id="consumer" destination="chat" channelSet="{cs}" message="messageHandler(event)"/>
+ </fx:Declarations>
+
+
+ <s:Panel title="Customer Information" top="12" bottom="12" left="12" right="12">
+
+ <mx:Accordion id="accordion" width="100%" height="100%" openDuration="0"
+ change="accordionChangeHandler(event)">
+
+ <mx:Form label="General">
+ <mx:FormItem label="First Name">
+ <s:TextInput id="firstName" text="@{customer.firstName}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Last Name">
+ <s:TextInput id="lastName" text="@{customer.lastName}"/>
+ </mx:FormItem>
+ <mx:FormItem>
+ <s:CheckBox id="usCitizen" selected="@{customer.usCitizen}" label="US Citizen"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ <mx:Form label="Address">
+ <mx:FormItem label="Address">
+ <s:TextInput id="address" text="@{customer.address}"/>
+ </mx:FormItem>
+ <mx:FormItem label="City">
+ <s:TextInput id="city" text="@{customer.city}"/>
+ </mx:FormItem>
+ <mx:FormItem label="State">
+ <s:TextInput id="state" text="@{customer.state}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Zip">
+ <s:TextInput id="zip" text="@{customer.zip}"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ <mx:Form label="Phone">
+ <mx:FormItem label="Office">
+ <s:TextInput id="officePhone" text="@{customer.officePhone}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Cell">
+ <s:TextInput id="cellPhone" text="@{customer.cellPhone}"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ </mx:Accordion>
+
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.actionScriptProperties
new file mode 100755
index 0000000..a41f40d
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="companymgr.mxml" projectUUID="7412f889-9564-46a9-9bb0-2aeee9a54877" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="companymgr.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.project b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.project
new file mode 100755
index 0000000..503246a
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>companymgr</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/build.xml
new file mode 100755
index 0000000..d5cdbe4
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="companymgr" />
+ <property name="application.file" value="companymgr" />
+ <property name="application.bin.dir" value="${samples-spring.war}/companymgr" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/companymgr/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[31/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/dashboard/src/dashboard.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/dashboard/src/dashboard.mxml b/apps/samples/WEB-INF/flex-src/dashboard/src/dashboard.mxml
deleted file mode 100755
index 1be8190..0000000
--- a/apps/samples/WEB-INF/flex-src/dashboard/src/dashboard.mxml
+++ /dev/null
@@ -1,209 +0,0 @@
-<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns="*"
- pageTitle="Collaborative Dashboard"
- creationComplete="initApp()">
-
-
- <fx:Style source="main.css"/>
-
- <fx:Script>
- <![CDATA[
-
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.messages.IMessage;
- import mx.collections.ArrayCollection;
- import mx.messaging.events.MessageEvent;
- import mx.rpc.events.ResultEvent;
-
- [Bindable]
- public var slicedMonthData:ArrayCollection;
-
- [Bindable]
- public var slicedRegionData:ArrayCollection;
-
- private var monthData:Array;
- private var regionData:Array;
-
- private function initApp():void
- {
- consumer.subscribe();
- srv.send();
- slicedMonthData = new ArrayCollection();
- slicedRegionData = new ArrayCollection();
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- monthData = event.result.list.month.source as Array;
- slider.maximum = monthData.length - 1;
- slider.values = [0, monthData.length - 1];
- slicedMonthData.source = monthData;
- regionBreakdown.month = monthData[0];
-
- regionData = new Array(monthData.length);
- var monthTotal:Number;
-
- for (var i:Number = 0; i < monthData.length; i++)
- {
- regionData[i] = {name: monthData[i].name, average: 0, revenue: 0};
- var regions:Array = monthData[i].region.source;
- monthTotal = 0;
- for (var j:Number = 0; j < regions.length; j++)
- {
- monthTotal += regions[j].revenue;
- }
- regionData[i].average = monthTotal/monthData[i].region.length
- }
- slicedRegionData.source = regionData.slice(slider.values[0], slider.values[1]);
- }
-
- private function getSliderLabel(value:String):String
- {
- return monthData[parseInt(value)].name;
- }
-
- // Send messages when user's selection changes
- private function monthChange():void
- {
- var message:IMessage = new AsyncMessage();
- message.body = {month: timeline.selectedMonth};
- producer.send(message);
- }
-
- private function rangeChange():void
- {
- var message:IMessage = new AsyncMessage();
- message.body = {min: slider.values[0], max: slider.values[1]+1};
- producer.send(message);
- }
-
- private function regionChange():void
- {
- var message: IMessage = new AsyncMessage();
- message.body = {region: regionBreakdown.selectedRegion};
- producer.send(message);
- }
-
- // Handle incoming messages
- private function messageHandler(event:MessageEvent):void
- {
- var body:Object = event.message.body;
-
- if (body.min != null) //range
- {
- slider.values = [body.min, body.max - 1];
-
- if (monthData != null)
- slicedMonthData.source = monthData.slice(body.min, body.max);
- if (regionData != null)
- slicedRegionData.source = regionData.slice(body.min, body.max);
-
- }
- else if (body.month != null) //month in timeline
- {
- regionBreakdown.month = body.month;
- }
- else if (body.region != null) //region from breakdown
- {
- regionBreakdown.selectedRegion = body.region;
- regionDetail.region = body.region.name;
-
- for (var i: Number = 0; i < monthData.length; i++)
- {
- var regions: Array = monthData[i].region.source;
- for (var j: Number = 0; j < regions.length; j++)
- {
- if (regions[j].name == body.region.name)
- {
- regionData[i].revenue = regions[j].revenue;
- break;
- }
- }
- }
- slicedRegionData.source = regionData.slice(slider.values[0], slider.values[1] + 1);
- }
- }
-
- private function toggleSeries():void
- {
- var message: IMessage = new AsyncMessage();
- if (currentState=="series")
- {
- currentState = "";
- message.body.series = false;
- }
- else
- {
- currentState = "series";
- message.body.series = true;
- }
- producer.send(message);
- }
-
- private function dataGridCurrencyFormat(item:Object, column:Object):String
- {
- return cf.format(item[column.dataField]);
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <mx:Producer id="producer" destination="dashboard"/>
- <mx:Consumer id="consumer" destination="dashboard" message="messageHandler(event)"/>
-
- <mx:HTTPService id="srv" url="results.xml" useProxy="false" result="resultHandler(event)"/>
-
- <mx:CurrencyFormatter id="cf"/>
- </fx:Declarations>
-
- <mx:HBox width="100%" verticalAlign="middle" horizontalAlign="right" paddingRight="40">
- <mx:Label text="Welcome, Guest |"/>
- <mx:ComboBox id="cb">
- <mx:dataProvider>
- <fx:String>Revenue Timeline</fx:String>
- </mx:dataProvider>
- </mx:ComboBox>
- </mx:HBox>
-
- <mx:HDividedBox width="100%" height="100%">
-
- <mx:Panel id="timelinePanel" title="Revenue Timeline" width="100%" height="100%">
- <RevenueTimeline id="timeline" revenueData="{slicedMonthData.source}"
- monthChange="monthChange()"/>
- <mx:ControlBar horizontalGap="4">
- <mx:ToggleButtonBar dataProvider="{timeline}"/>
- <mx:Spacer width="10"/>
- <mx:Label text="Range:"/>
- <mx:HSlider id="slider" width="150" thumbCount="2" snapInterval="1" minimum="0"
- dataTipFormatFunction="getSliderLabel"
- change="rangeChange()"/>
- </mx:ControlBar>
- </mx:Panel>
-
- <mx:VDividedBox width="100%" height="100%">
- <RegionBreakdown id="regionBreakdown" regionChange="regionChange()" width="100%" height="50%" />
- <RegionDetail id="regionDetail" revenueData="{slicedRegionData.source}" width="100%" height="50%" />
- </mx:VDividedBox>
-
- </mx:HDividedBox>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/dashboard/src/icon_chart.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/dashboard/src/icon_chart.png b/apps/samples/WEB-INF/flex-src/dashboard/src/icon_chart.png
deleted file mode 100755
index 7abe2f1..0000000
Binary files a/apps/samples/WEB-INF/flex-src/dashboard/src/icon_chart.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/dashboard/src/icon_grid.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/dashboard/src/icon_grid.png b/apps/samples/WEB-INF/flex-src/dashboard/src/icon_grid.png
deleted file mode 100755
index a44f0bc..0000000
Binary files a/apps/samples/WEB-INF/flex-src/dashboard/src/icon_grid.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/dashboard/src/main.css
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/dashboard/src/main.css b/apps/samples/WEB-INF/flex-src/dashboard/src/main.css
deleted file mode 100755
index 1c3d051..0000000
--- a/apps/samples/WEB-INF/flex-src/dashboard/src/main.css
+++ /dev/null
@@ -1,35 +0,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.
- */
-@namespace mx "library://ns.adobe.com/flex/mx";
-
-mx|Application {
- paddingTop: 12;
- verticalGap: 12;
-}
-
-mx|Panel {
- cornerRadius: 6;
- panelBorderStyle: "roundCorners";
-}
-
-mx|Button {
- cornerRadius: 4;
-}
-
-mx|HSlider {
- showTrackHighlight: true;
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/dashboard/src/results.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/dashboard/src/results.xml b/apps/samples/WEB-INF/flex-src/dashboard/src/results.xml
deleted file mode 100755
index 6a96b33..0000000
--- a/apps/samples/WEB-INF/flex-src/dashboard/src/results.xml
+++ /dev/null
@@ -1,213 +0,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.
-
--->
-<list>
-
- <month name="Jan-04" revenue="400263" average="80052">
- <region name="APAC" revenue="46130"/>
- <region name="Europe" revenue="106976"/>
- <region name="Japan" revenue="79554"/>
- <region name="Latin America" revenue="39252"/>
- <region name="North America" revenue="128351"/>
- </month>
-
- <month name="Feb-04" revenue="379145" average="75829">
- <region name="APAC" revenue="70324"/>
- <region name="Europe" revenue="88912"/>
- <region name="Japan" revenue="69677"/>
- <region name="Latin America" revenue="59428"/>
- <region name="North America" revenue="90804"/>
- </month>
-
- <month name="Mar-04" revenue="389687" average="77937">
- <region name="APAC" revenue="60431"/>
- <region name="Europe" revenue="140982"/>
- <region name="Japan" revenue="58196"/>
- <region name="Latin America" revenue="33373"/>
- <region name="North America" revenue="96705"/>
- </month>
-
- <month name="Apr-04" revenue="460329" average="92065">
- <region name="APAC" revenue="78969"/>
- <region name="Europe" revenue="85885"/>
- <region name="Japan" revenue="78107"/>
- <region name="Latin America" revenue="65796"/>
- <region name="North America" revenue="151572"/>
- </month>
-
- <month name="May-04" revenue="351014" average="70202">
- <region name="APAC" revenue="64069"/>
- <region name="Europe" revenue="82415"/>
- <region name="Japan" revenue="96397"/>
- <region name="Latin America" revenue="44627"/>
- <region name="North America" revenue="63506"/>
- </month>
-
- <month name="Jun-04" revenue="384855" average="76971">
- <region name="APAC" revenue="55331"/>
- <region name="Europe" revenue="113196"/>
- <region name="Japan" revenue="55371"/>
- <region name="Latin America" revenue="58323"/>
- <region name="North America" revenue="102634"/>
- </month>
-
- <month name="Jul-04" revenue="335192" average="67038">
- <region name="APAC" revenue="39445"/>
- <region name="Europe" revenue="110750"/>
- <region name="Japan" revenue="73722"/>
- <region name="Latin America" revenue="50595"/>
- <region name="North America" revenue="60680"/>
- </month>
-
- <month name="Aug-04" revenue="393654" average="78730">
- <region name="APAC" revenue="44801"/>
- <region name="Europe" revenue="98806"/>
- <region name="Japan" revenue="93673"/>
- <region name="Latin America" revenue="50636"/>
- <region name="North America" revenue="105738"/>
- </month>
-
- <month name="Sep-04" revenue="472554" average="94510">
- <region name="APAC" revenue="61134"/>
- <region name="Europe" revenue="136467"/>
- <region name="Japan" revenue="93624"/>
- <region name="Latin America" revenue="32293"/>
- <region name="North America" revenue="149036"/>
- </month>
-
- <month name="Oct-04" revenue="324299" average="64859">
- <region name="APAC" revenue="32078"/>
- <region name="Europe" revenue="85420"/>
- <region name="Japan" revenue="80483"/>
- <region name="Latin America" revenue="64390"/>
- <region name="North America" revenue="61928"/>
- </month>
-
- <month name="Nov-04" revenue="415403" average="83080">
- <region name="APAC" revenue="58832"/>
- <region name="Europe" revenue="143128"/>
- <region name="Japan" revenue="64295"/>
- <region name="Latin America" revenue="58261"/>
- <region name="North America" revenue="90887"/>
- </month>
-
- <month name="Dec-04" revenue="386089" average="77217">
- <region name="APAC" revenue="80555"/>
- <region name="Europe" revenue="118981"/>
- <region name="Japan" revenue="87520"/>
- <region name="Latin America" revenue="27154"/>
- <region name="North America" revenue="71879"/>
- </month>
-
- <month name="Jan-05" revenue="400263" average="80052">
- <region name="APAC" revenue="46130"/>
- <region name="Europe" revenue="106976"/>
- <region name="Japan" revenue="79554"/>
- <region name="Latin America" revenue="39252"/>
- <region name="North America" revenue="128351"/>
- </month>
-
- <month name="Feb-05" revenue="379145" average="75829">
- <region name="APAC" revenue="70324"/>
- <region name="Europe" revenue="88912"/>
- <region name="Japan" revenue="69677"/>
- <region name="Latin America" revenue="59428"/>
- <region name="North America" revenue="90804"/>
- </month>
-
- <month name="Mar-05" revenue="389687" average="77937">
- <region name="APAC" revenue="60431"/>
- <region name="Europe" revenue="140982"/>
- <region name="Japan" revenue="58196"/>
- <region name="Latin America" revenue="33373"/>
- <region name="North America" revenue="96705"/>
- </month>
-
- <month name="Apr-05" revenue="460329" average="92065">
- <region name="APAC" revenue="78969"/>
- <region name="Europe" revenue="85885"/>
- <region name="Japan" revenue="78107"/>
- <region name="Latin America" revenue="65796"/>
- <region name="North America" revenue="151572"/>
- </month>
-
- <month name="May-05" revenue="351014" average="70202">
- <region name="APAC" revenue="64069"/>
- <region name="Europe" revenue="82415"/>
- <region name="Japan" revenue="96397"/>
- <region name="Latin America" revenue="44627"/>
- <region name="North America" revenue="63506"/>
- </month>
-
- <month name="Jun-05" revenue="384855" average="76971">
- <region name="APAC" revenue="55331"/>
- <region name="Europe" revenue="113196"/>
- <region name="Japan" revenue="55371"/>
- <region name="Latin America" revenue="58323"/>
- <region name="North America" revenue="102634"/>
- </month>
-
- <month name="Jul-05" revenue="335192" average="67038">
- <region name="APAC" revenue="39445"/>
- <region name="Europe" revenue="110750"/>
- <region name="Japan" revenue="73722"/>
- <region name="Latin America" revenue="50595"/>
- <region name="North America" revenue="60680"/>
- </month>
-
- <month name="Aug-05" revenue="393654" average="78730">
- <region name="APAC" revenue="44801"/>
- <region name="Europe" revenue="98806"/>
- <region name="Japan" revenue="93673"/>
- <region name="Latin America" revenue="50636"/>
- <region name="North America" revenue="105738"/>
- </month>
-
- <month name="Sep-05" revenue="472554" average="94510">
- <region name="APAC" revenue="61134"/>
- <region name="Europe" revenue="136467"/>
- <region name="Japan" revenue="93624"/>
- <region name="Latin America" revenue="32293"/>
- <region name="North America" revenue="149036"/>
- </month>
-
- <month name="Oct-05" revenue="324299" average="64859">
- <region name="APAC" revenue="32078"/>
- <region name="Europe" revenue="85420"/>
- <region name="Japan" revenue="80483"/>
- <region name="Latin America" revenue="64390"/>
- <region name="North America" revenue="61928"/>
- </month>
-
- <month name="Nov-05" revenue="415403" average="83080">
- <region name="APAC" revenue="58832"/>
- <region name="Europe" revenue="143128"/>
- <region name="Japan" revenue="64295"/>
- <region name="Latin America" revenue="58261"/>
- <region name="North America" revenue="90887"/>
- </month>
-
- <month name="Dec-05" revenue="386089" average="77217">
- <region name="APAC" revenue="80555"/>
- <region name="Europe" revenue="118981"/>
- <region name="Japan" revenue="87520"/>
- <region name="Latin America" revenue="27154"/>
- <region name="North America" revenue="71879"/>
- </month>
-
-</list>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/build.xml b/apps/samples/WEB-INF/flex-src/inventory/build.xml
deleted file mode 100755
index b1e0787..0000000
--- a/apps/samples/WEB-INF/flex-src/inventory/build.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?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="Inventory Management" />
- <property name="application.file" value="inventory" />
- <property name="application.bin.dir" value="${samples.war}/inventory" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/inventory/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"
- history="true"
- express-install="true"
- output="${application.bin.dir}"/>
-
- <copy todir="${application.bin.dir}">
- <fileset dir="${application.src.dir}" includes="*.jsp"/>
- </copy>
-
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="${application.bin.dir}" includes="*.swf,index.html,*.jsp"/>
- <fileset dir="${application.bin.dir}/history" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/Product.as
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/Product.as b/apps/samples/WEB-INF/flex-src/inventory/src/Product.as
deleted file mode 100755
index 2f91ccb..0000000
--- a/apps/samples/WEB-INF/flex-src/inventory/src/Product.as
+++ /dev/null
@@ -1,44 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- [Bindable]
- [RemoteClass(alias="flex.samples.product.Product")]
- public class Product
- {
- public function Product()
- {
- }
-
- public var productId:int;
-
- public var name:String;
-
- public var category:String;
-
- public var price:Number = 0;
-
- public var image:String;
-
- public var description:String;
-
- public var qtyInStock:int = 0;
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/ProductForm.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/ProductForm.mxml b/apps/samples/WEB-INF/flex-src/inventory/src/ProductForm.mxml
deleted file mode 100755
index d9977fa..0000000
--- a/apps/samples/WEB-INF/flex-src/inventory/src/ProductForm.mxml
+++ /dev/null
@@ -1,106 +0,0 @@
-<?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:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
- label="{product.productId > 0 ? product.name : 'New Product'}" width="100%" height="100%">
-
- <mx:Script>
- <![CDATA[
- import mx.events.ValidationResultEvent;
- import mx.rpc.events.ResultEvent;
-
- [Bindable]
- public var product:Product;
-
- private function save():void
- {
- if (nameValidator.validate().type == ValidationResultEvent.INVALID) return;
- product.name = productName.text;
- product.category = category.text;
- product.price = Number(price.text);
- product.qtyInStock = parseInt(qtyInStock.text);
- product.image = image.text;
- product.description = description.text;
- if (product.productId > 0)
- srv.update(product);
- else
- srv.create(product);
- }
-
- private function createResult(event:ResultEvent):void
- {
- product = event.result as Product;
- label = product.name;
- }
-
- private function removeResult(event:ResultEvent):void
- {
- parent.removeChild(this);
- }
-
-
- ]]>
- </mx:Script>
-
- <mx:StringValidator id="nameValidator" source="{productName}" property="text" minLength="1"/>
-
- <mx:RemoteObject id="srv" destination="product">
- <mx:method name="create" result="createResult(event)"/>
- <mx:method name="remove" result="removeResult(event)"/>
- </mx:RemoteObject>
-
- <mx:Image source="../images/{product.image}" top="0" right="20" brokenImageSkin="@Embed('assets/blank.png')"/>
-
- <mx:Form width="100%" verticalGap="8">
-
- <mx:FormItem label="Id">
- <mx:TextInput id="productId" text="{product.productId}" enabled="false"/>
- </mx:FormItem>
-
- <mx:FormItem label="Name" required="true">
- <mx:TextInput id="productName" text="{product.name}"/>
- </mx:FormItem>
-
- <mx:FormItem label="Category">
- <mx:TextInput id="category" text="{product.category}"/>
- </mx:FormItem>
-
- <mx:FormItem label="Image">
- <mx:TextInput id="image" text="{product.image}"/>
- </mx:FormItem>
-
- <mx:FormItem label="Price">
- <mx:TextInput id="price" text="{product.price}"/>
- </mx:FormItem>
-
- <mx:FormItem label="In Stock">
- <mx:TextInput id="qtyInStock" text="{product.qtyInStock}"/>
- </mx:FormItem>
-
- <mx:FormItem label="Description" width="100%">
- <mx:TextArea id="description" text="{product.description}" width="100%" height="100"/>
- </mx:FormItem>
-
- </mx:Form>
-
- <mx:Button label="Save" click="save()" bottom="10" left="10" height="36" width="63"/>
- <mx:Button label="Delete" click="srv.remove(product)" left="75" bottom="10" height="36" width="72"/>
- <mx:Button label="Close Tab" click="parent.removeChild(this)" right="10" bottom="10" height="36" width="88"/>
-
-</mx:Canvas>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/SearchPopup.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/SearchPopup.mxml b/apps/samples/WEB-INF/flex-src/inventory/src/SearchPopup.mxml
deleted file mode 100755
index 89333d2..0000000
--- a/apps/samples/WEB-INF/flex-src/inventory/src/SearchPopup.mxml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?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:List xmlns:mx="http://www.adobe.com/2006/mxml"
- dropShadowEnabled="true"
- currentState="hidden"
- labelField="name"
- keyDown="searchKeyDownHandler(event)"
- click="openSelectedItem()">
-
- <mx:Metadata>
- [Event(name="select")]
- </mx:Metadata>
-
- <mx:Script>
- <![CDATA[
- import mx.rpc.events.ResultEvent;
-
- import mx.collections.ArrayCollection;
-
- public function search(searchStr:String):void
- {
- dataProvider = null;
- srv.getProductsByName(searchStr);
- if (currentState == "hidden") currentState = "";
- }
-
- protected function searchKeyDownHandler(event:KeyboardEvent):void
- {
- switch (event.keyCode)
- {
- case Keyboard.ENTER:
- openSelectedItem();
- break;
- case Keyboard.ESCAPE:
- currentState = "hidden";
- break;
- }
- }
-
- public function openSelectedItem():void
- {
- if (selectedItem)
- {
- dispatchEvent(new Event("select"));
- currentState="hidden";
- }
- }
-
- public function selectNext():void
- {
- selectedIndex++;
- }
-
- public function selectPrevious():void
- {
- if (selectedIndex > 0) selectedIndex--;
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- dataProvider = event.result as ArrayCollection;
- if (dataProvider && dataProvider.length > 0)
- {
- selectedIndex = 0;
- }
- }
-
- ]]>
- </mx:Script>
-
- <mx:RemoteObject id="srv" destination="product" result="resultHandler(event)"/>
-
- <mx:states>
- <mx:State name="hidden">
- <mx:SetProperty name="visible" value="false"/>
- </mx:State>
- </mx:states>
-
-</mx:List>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/assets/Thumbs.db
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/assets/Thumbs.db b/apps/samples/WEB-INF/flex-src/inventory/src/assets/Thumbs.db
deleted file mode 100755
index ad2bbe5..0000000
Binary files a/apps/samples/WEB-INF/flex-src/inventory/src/assets/Thumbs.db and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/assets/app_skin.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/assets/app_skin.png b/apps/samples/WEB-INF/flex-src/inventory/src/assets/app_skin.png
deleted file mode 100755
index 48d919b..0000000
Binary files a/apps/samples/WEB-INF/flex-src/inventory/src/assets/app_skin.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/assets/blank.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/assets/blank.png b/apps/samples/WEB-INF/flex-src/inventory/src/assets/blank.png
deleted file mode 100755
index 02f2d4b..0000000
Binary files a/apps/samples/WEB-INF/flex-src/inventory/src/assets/blank.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_over_skin.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_over_skin.png b/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_over_skin.png
deleted file mode 100755
index a489605..0000000
Binary files a/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_over_skin.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_skin.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_skin.png b/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_skin.png
deleted file mode 100755
index 5ac3c63..0000000
Binary files a/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_skin.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_close.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_close.png b/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_close.png
deleted file mode 100755
index ccb86db..0000000
Binary files a/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_close.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_plus.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_plus.png b/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_plus.png
deleted file mode 100755
index b4ecdba..0000000
Binary files a/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_plus.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_search.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_search.png b/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_search.png
deleted file mode 100755
index 4f62019..0000000
Binary files a/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_search.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/assets/search.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/assets/search.png b/apps/samples/WEB-INF/flex-src/inventory/src/assets/search.png
deleted file mode 100755
index 5f0e375..0000000
Binary files a/apps/samples/WEB-INF/flex-src/inventory/src/assets/search.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/assets/top_separator.png
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/assets/top_separator.png b/apps/samples/WEB-INF/flex-src/inventory/src/assets/top_separator.png
deleted file mode 100755
index f3848f6..0000000
Binary files a/apps/samples/WEB-INF/flex-src/inventory/src/assets/top_separator.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/inventory.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/inventory.mxml b/apps/samples/WEB-INF/flex-src/inventory/src/inventory.mxml
deleted file mode 100755
index 72c8911..0000000
--- a/apps/samples/WEB-INF/flex-src/inventory/src/inventory.mxml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
- layout="absolute">
-
- <mx:Script>
- <![CDATA[
-
- private function addItem():void
- {
- openTab(new Product())
- }
-
- public function openTab(product:Product):void
- {
- if (product.productId > 0)
- {
- // Check if product is already opened in an existing tab
- var children:Array = tn.getChildren();
- var length:int = children.length;
- for (var i:int = 0; i<length; i++)
- {
- if (children[i].product.productId == product.productId)
- {
- tn.selectedIndex = i;
- return;
- }
- }
- }
- var form:ProductForm = new ProductForm();
- tn.addChild(form);
- form.product = product;
- tn.selectedChild = form;
- }
-
- private function search():void
- {
- searchPopup.search(searchStr.text);
- }
-
- // Handles keys pressed in the search TextInput field
- protected function searchKeyDownHandler(event:KeyboardEvent):void
- {
- if (searchPopup.currentState == "hidden" && event.keyCode != Keyboard.DOWN)
- {
- return
- }
-
- switch (event.keyCode)
- {
- case Keyboard.DOWN:
- if (searchPopup.currentState == "hidden") search();
- searchPopup.selectNext();
- break;
- case Keyboard.UP:
- searchPopup.selectPrevious();
- searchStr.setSelection(searchStr.text.length, searchStr.text.length);
- break;
- case Keyboard.ENTER:
- searchPopup.openSelectedItem();
- break;
- case Keyboard.ESCAPE:
- searchPopup.currentState = "hidden";
- break;
- }
- }
-
- ]]>
- </mx:Script>
-
- <mx:Style source="styles.css"/>
-
- <mx:Canvas styleName="appContainer" width="100%" height="100%"/>
-
- <mx:Label text="Inventory Management" styleName="appTitle" left="22" top="10"/>
-
- <mx:Button icon="@Embed('assets/icon_plus.png')" click="addItem()" toolTip="Add Product" width="31" height="29" right="243" top="10"/>
-
- <mx:Image source="@Embed('assets/top_separator.png')" right="223" top="-4"/>
-
- <mx:Image source="@Embed('assets/search.png')" right="69" top="16"/>
- <mx:TextInput id="searchStr" borderStyle="none" backgroundAlpha="0" top="16" width="110" right="88" focusThickness="0" change="search()"
- borderSkin="@Embed('assets/blank.png')"
- keyDown="searchKeyDownHandler(event)"/>
- <mx:Image source="@Embed('assets/icon_close.png')" visible="{searchPopup.currentState == ''}" right="78" top="21"
- click="searchPopup.currentState = 'hidden'"/>
-
-
- <mx:TabNavigator id="tn" right="10" top="60" bottom="10" left="10" />
- <mx:Text width="480" verticalCenter="0" horizontalCenter="0" visible="{!tn.getChildren().length>0}" textAlign="center">
- <mx:text>
- Type a few characters in the Search box in the upper right corner to search for products.
- For example type "no". You can also click the + button to add a new product.
- </mx:text>
- </mx:Text>
-
- <SearchPopup id="searchPopup" top="52" right="50" width="180" height="250" select="openTab(searchPopup.selectedItem as Product)"/>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/inventory/src/styles.css
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/inventory/src/styles.css b/apps/samples/WEB-INF/flex-src/inventory/src/styles.css
deleted file mode 100755
index b674cc4..0000000
--- a/apps/samples/WEB-INF/flex-src/inventory/src/styles.css
+++ /dev/null
@@ -1,74 +0,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.
- */
-@namespace mx "library://ns.adobe.com/flex/mx";
-
-@font-face
-{
- src: url("assets/fonts/MyriadWebPro.ttf");
- font-family: main;
- font-style: normal;
- font-weight: normal;
-}
-
-@font-face
-{
- src: url("assets/fonts/MyriadWebPro-Bold.ttf");
- font-family: main;
- font-style: normal;
- font-weight: bold;
-}
-
-mx|Application {
- font-family: main;
- font-size: 12;
-}
-
-.appContainer {
- borderSkin: Embed(source="assets/app_skin.png",
- scaleGridTop="55",
- scaleGridLeft="5",
- scaleGridRight="293",
- scaleGridBottom="66");
-}
-
-mx|TabNavigator {
- border-style:solid;
-}
-
-mx|Button {
- skin: Embed("assets/button_skin.png",
- scaleGridLeft="8",
- scaleGridRight="23",
- scaleGridTop="8",
- scaleGridBottom="21");
- over-skin: Embed("assets/button_over_skin.png",
- scaleGridLeft="8",
- scaleGridRight="23",
- scaleGridTop="8",
- scaleGridBottom="21");
- open-duration: 0;
- close-duration: 0;
- corner-radius: 2;
-}
-
-
-.appTitle
-{
- color:#222222;
- font-family: main;
- font-size: 20pt;
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/build.xml b/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/build.xml
deleted file mode 100755
index 0555bf5..0000000
--- a/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/build.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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="Runtime Configuration - Messaging" />
- <property name="application.file" value="main" />
- <property name="application.bin.dir" value="${samples.war}/runtimeconfig-messaging" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/runtimeconfig-messaging/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}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/ChatPanel.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/ChatPanel.mxml b/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/ChatPanel.mxml
deleted file mode 100755
index d0dbba5..0000000
--- a/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/ChatPanel.mxml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?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:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="initComp()">
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.channels.StreamingAMFChannel;
- import mx.messaging.ChannelSet;
- import mx.messaging.channels.AMFChannel;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.messages.IMessage;
-
-
- private function initComp():void
- {
- var myStreamingAMF:AMFChannel = new StreamingAMFChannel("my-streaming-amf", "../messagebroker/streamingamf");
- var myPollingAMF:AMFChannel = new AMFChannel("my-polling-amf", "../messagebroker/amfpolling");
- myPollingAMF.pollingEnabled = true;
- myPollingAMF.pollingInterval = 2000;
- var channelSet:ChannelSet = new ChannelSet();
- channelSet.addChannel(myStreamingAMF);
- channelSet.addChannel(myPollingAMF);
- consumer.channelSet = channelSet;
- producer.channelSet = channelSet;
- }
-
- public function set room(name:String):void
- {
- if (!name) return;
-
- if (consumer && consumer.subscribed)
- {
- log.text += "Leaving room " + consumer.destination + "\n";
- consumer.unsubscribe();
- }
- consumer.destination = name;
- producer.destination = name;
- consumer.subscribe();
- log.text += "Entering room " + name + "\n";
- }
-
- private function send():void
- {
- var message:IMessage = new AsyncMessage();
- message.body = msg.text;
- producer.send(message);
- msg.text = "";
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- log.text += event.message.body + "\n";
- }
-
- ]]>
- </mx:Script>
-
- <mx:Producer id="producer"/>
- <mx:Consumer id="consumer" message="messageHandler(event)"/>
-
- <mx:TextArea id="log" width="100%" height="100%"/>
-
- <mx:ControlBar>
- <mx:TextInput id="msg" width="100%" enter="send()" enabled="{consumer.subscribed}"/>
- <mx:Button label="Send" click="send()" enabled="{consumer.subscribed}"/>
- </mx:ControlBar>
-
-</mx:Panel>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/main.mxml b/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/main.mxml
deleted file mode 100755
index f9d9421..0000000
--- a/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/main.mxml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="horizontal"
- creationComplete="srv.getRoomList()">
-
- <mx:RemoteObject id="srv" destination="chat-room-service"
- fault="Alert.show(event.fault.rootCause.message, 'Error')"/>
-
- <mx:Panel title="Room List" width="100%" height="100%" paddingTop="4" paddingLeft="4" paddingBottom="4" paddingRight="4">
-
- <mx:Label text="Select a room and start chatting in the right panel:"/>
- <mx:List id="list" dataProvider="{srv.getRoomList.lastResult}" width="100%" height="100%"/>
-
- <mx:ControlBar>
- <mx:VBox width="100%">
- <mx:Button label="Refresh" click="srv.getRoomList()"/>
- <mx:Spacer height="2"/>
- <mx:HRule width="100%" height="1"/>
- <mx:Label text="Create a room:"/>
- <mx:HBox>
- <mx:TextInput id="room"/>
- <mx:Button label="Create" click="srv.createRoom(room.text)" enabled="{room.text.length>0}"/>
- </mx:HBox>
- </mx:VBox>
- </mx:ControlBar>
-
- </mx:Panel>
-
- <ChatPanel title="Chat" room="{list.selectedItem}"/>
-
- <mx:Script>
- <![CDATA[
- import mx.controls.Alert;
- ]]>
- </mx:Script>
-
-</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/build.xml b/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/build.xml
deleted file mode 100755
index 6a2edf8..0000000
--- a/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/build.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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="Runtime Configuration - Remoting" />
- <property name="application.file" value="main" />
- <property name="application.bin.dir" value="${samples.war}/runtimeconfig-remoting" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/runtimeconfig-remoting/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}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/src/main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/src/main.mxml b/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/src/main.mxml
deleted file mode 100755
index f225124..0000000
--- a/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/src/main.mxml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml"
- creationComplete="initApp()">
-
- <!--
- Simple client to demonstrate runtime configuration of destinations.
- The "runtime-employee" destination is configured in
- EmployeeRuntimeRemotingDestination.java.
- -->
-
- <mx:Script>
- <![CDATA[
- import mx.rpc.remoting.mxml.RemoteObject;
- import mx.messaging.ChannelSet;
- import mx.messaging.channels.AMFChannel;
-
- [Bindable]
- private var srv:RemoteObject;
-
- private function initApp():void
- {
- var channel:AMFChannel = new AMFChannel("my-amf", "../messagebroker/amf");
- var channelSet:ChannelSet = new ChannelSet();
- channelSet.addChannel(channel);
- srv = new RemoteObject();
- srv.destination="runtime-employee-ro";
- srv.channelSet = channelSet;
- srv.getEmployees();
- }
-
- ]]>
- </mx:Script>
-
- <mx:Panel title="Employee List" width="100%" height="100%">
- <mx:DataGrid width="100%" height="100%" dataProvider="{srv.getEmployees.lastResult}">
- <mx:columns>
- <mx:DataGridColumn headerText="First Name" dataField="firstName"/>
- <mx:DataGridColumn headerText="Last Name" dataField="lastName"/>
- <mx:DataGridColumn headerText="Title" dataField="title"/>
- <mx:DataGridColumn headerText="Phone" dataField="phone"/>
- <mx:DataGridColumn headerText="Email" dataField="email"/>
- </mx:columns>
- </mx:DataGrid>
- </mx:Panel>
-
-</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-101/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-101/build.xml b/apps/samples/WEB-INF/flex-src/testdrive-101/build.xml
deleted file mode 100755
index d711d68..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-101/build.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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="Flex Programming Model 101" />
- <property name="application.file" value="main" />
- <property name="application.bin.dir" value="${samples.war}/testdrive-101" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-101/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}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-101/src/ProductView.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-101/src/ProductView.mxml b/apps/samples/WEB-INF/flex-src/testdrive-101/src/ProductView.mxml
deleted file mode 100755
index 6d25118..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-101/src/ProductView.mxml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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:mx="http://www.adobe.com/2006/mxml" layout="horizontal" width="100%" height="100%"
- title="Product Details" paddingLeft="12" paddingRight="12" paddingTop="12" paddingBottom="12">
-
- <mx:Object id="product"/>
-
- <mx:CurrencyFormatter id="cf"/>
-
- <mx:Image source="../images/{product.image}"/>
-
- <mx:VBox width="100%" height="100%">
- <mx:Label text="{product.name}" fontWeight="bold"/>
- <mx:Label text="Price: {cf.format(product.price)}" styleName="price"/>
- <mx:Text text="{product.description}" width="100%" height="100%"/>
- </mx:VBox>
-
-</mx:Panel>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-101/src/Thumb.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-101/src/Thumb.mxml b/apps/samples/WEB-INF/flex-src/testdrive-101/src/Thumb.mxml
deleted file mode 100755
index 71cbb7d..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-101/src/Thumb.mxml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="120" height="120"
- horizontalAlign="center" verticalGap="0" verticalScrollPolicy="off" horizontalScrollPolicy="off">
-
- <mx:CurrencyFormatter id="cf"/>
-
- <mx:Label text="{data.name}" fontWeight="bold"/>
- <mx:Image source="../images/{data.image}" width="40" height="80"/>
- <mx:Label text="{cf.format(data.price)}" styleName="price"/>
-
-</mx:VBox>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-101/src/main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-101/src/main.mxml b/apps/samples/WEB-INF/flex-src/testdrive-101/src/main.mxml
deleted file mode 100755
index e0d18c1..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-101/src/main.mxml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="horizontal"
- creationComplete="srv.getProducts()">
-
- <mx:Style source="testdrive.css"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.collections.ArrayCollection;
- import mx.rpc.events.ResultEvent;
-
- [Bindable]
- private var products:ArrayCollection;
-
- private function resultHandler(event:ResultEvent):void
- {
- products = event.result as ArrayCollection;
- }
-
- ]]>
- </mx:Script>
-
- <mx:RemoteObject id="srv" destination="product">
- <mx:method name="getProducts" result="resultHandler(event)"/>
- </mx:RemoteObject>
-
- <mx:Panel title="Catalog" width="100%" height="100%">
- <mx:TileList id="list" dataProvider="{products}" itemRenderer="Thumb" width="100%" height="100%"/>
- </mx:Panel>
-
- <ProductView product="{list.selectedItem}"/>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-101/src/testdrive.css
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-101/src/testdrive.css b/apps/samples/WEB-INF/flex-src/testdrive-101/src/testdrive.css
deleted file mode 100755
index 1c65407..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-101/src/testdrive.css
+++ /dev/null
@@ -1,35 +0,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.
- */
-@namespace mx "library://ns.adobe.com/flex/mx";
-
-mx|Application {
- background-color: #E57000;
- themeColor: #E57000;
-}
-
-mx|TileList {
- selection-color: #FFCC33;
- roll-over-color: #FFCC99;
-}
-
-mx|Panel {
- roundedBottomCorners: true;
-}
-
-.price {
- color: #E57000;
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-chat/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-chat/build.xml b/apps/samples/WEB-INF/flex-src/testdrive-chat/build.xml
deleted file mode 100755
index 1e74b02..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-chat/build.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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="Chat" />
- <property name="application.file" value="main" />
- <property name="application.bin.dir" value="${samples.war}/testdrive-chat" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-chat/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}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-chat/src/main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-chat/src/main.mxml b/apps/samples/WEB-INF/flex-src/testdrive-chat/src/main.mxml
deleted file mode 100755
index a949346..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-chat/src/main.mxml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml"
- creationComplete="consumer.subscribe()">
-
- <mx:Script>
- <![CDATA[
-
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.messages.IMessage;
-
- private function send():void
- {
- var message:IMessage = new AsyncMessage();
- message.body.chatMessage = msg.text;
- producer.send(message);
- msg.text = "";
- }
-
- private function messageHandler(message:IMessage):void
- {
- log.text += message.body.chatMessage + "\n";
- }
-
- ]]>
- </mx:Script>
-
- <mx:Producer id="producer" destination="chat"/>
- <mx:Consumer id="consumer" destination="chat" message="messageHandler(event.message)"/>
-
- <mx:Panel title="Chat" width="100%" height="100%">
- <mx:TextArea id="log" width="100%" height="100%"/>
- <mx:ControlBar>
- <mx:TextInput id="msg" width="100%" enter="send()"/>
- <mx:Button label="Send" click="send()"/>
- </mx:ControlBar>
- </mx:Panel>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-datapush/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-datapush/build.xml b/apps/samples/WEB-INF/flex-src/testdrive-datapush/build.xml
deleted file mode 100755
index 3b30fb5..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-datapush/build.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?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="Data Push" />
- <property name="application.file" value="main" />
- <property name="application.bin.dir" value="${samples.war}/testdrive-datapush" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-datapush/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="*.jsp"/>
- </copy>
-
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="${application.bin.dir}" includes="*.swf,index.html,*.jsp"/>
- <fileset dir="${application.bin.dir}/history" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/main.mxml b/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/main.mxml
deleted file mode 100755
index ed803d5..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/main.mxml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
-
- <mx:Script>
- <![CDATA[
-
- import mx.messaging.messages.IMessage;
-
- private function messageHandler(message:IMessage):void
- {
- pushedValue.text = ""+ message.body;
- }
-
- ]]>
- </mx:Script>
-
- <mx:Consumer id="consumer" destination="feed" message="messageHandler(event.message)"/>
-
- <mx:Button label="Subscribe to 'feed' destination" click="consumer.subscribe()" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe from 'feed' destination" click="consumer.unsubscribe()" enabled="{consumer.subscribed}"/>
-
- <mx:TextInput id="pushedValue"/>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/startfeed.jsp
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/startfeed.jsp b/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/startfeed.jsp
deleted file mode 100755
index 49640ae..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/startfeed.jsp
+++ /dev/null
@@ -1,26 +0,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.
--->
-<%@page import="flex.samples.feed.Feed"%>
-<%
- try {
- Feed feed = new Feed();
- feed.start();
- out.println("Feed Started");
- } catch (Exception e) {
- out.println("A problem occured while starting the feed: "+e.getMessage());
- }
-%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/stopfeed.jsp
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/stopfeed.jsp b/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/stopfeed.jsp
deleted file mode 100755
index a035b17..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/stopfeed.jsp
+++ /dev/null
@@ -1,26 +0,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.
--->
-<%@page import="flex.samples.feed.Feed"%>
-<%
- try {
- Feed feed = new Feed();
- feed.stop();
- out.println("Feed Stopped");
- } catch (Exception e) {
- out.println("A problem occured while stopping the feed: "+e.getMessage());
- }
-%>
\ No newline at end of file
[46/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/collaboration/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/.project b/apps/samples-spring/WEB-INF/flex-src/collaboration/.project
deleted file mode 100755
index ac12586..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>collaboration</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/build.xml b/apps/samples-spring/WEB-INF/flex-src/collaboration/build.xml
deleted file mode 100755
index 6182c5e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="collaboration" />
- <property name="application.file" value="collaboration" />
- <property name="application.bin.dir" value="${samples-spring.war}/collaboration" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/collaboration/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/src/Customer.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/src/Customer.as b/apps/samples-spring/WEB-INF/flex-src/collaboration/src/Customer.as
deleted file mode 100755
index 18f0abe..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/src/Customer.as
+++ /dev/null
@@ -1,34 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- [Bindable]
- public class Customer
- {
- public var firstName:String;
- public var lastName:String;
- public var usCitizen:Boolean;
- public var address:String;
- public var city:String;
- public var state:String;
- public var zip:String;
- public var officePhone:String;
- public var cellPhone:String;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/src/collaboration.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/src/collaboration.mxml b/apps/samples-spring/WEB-INF/flex-src/collaboration/src/collaboration.mxml
deleted file mode 100755
index 17e3603..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/src/collaboration.mxml
+++ /dev/null
@@ -1,147 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx"
- applicationComplete="init()" xmlns:local="*">
-
- <fx:Script>
- <![CDATA[
-
- import mx.events.IndexChangedEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.utils.UIDUtil;
- import mx.messaging.events.MessageEvent;
- import mx.events.PropertyChangeEvent;
-
- private var userId:String; // Unique user id
-
- private function init():void
- {
- userId = UIDUtil.createUID(); // Generate unique user id
- customer.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
- consumer.subscribe();
- }
-
- private function propertyChangeHandler(event:PropertyChangeEvent):void
- {
- sendMessage("propertyChange", {property: event.property, value: event.newValue});
- }
-
- private function accordionChangeHandler(event:IndexChangedEvent):void
- {
- sendMessage("accordionChange", {selectedIndex: event.newIndex});
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- var remoteUserId:String = event.message.body.userId;
- // If the message was sent by this user, don't handle it
- if (remoteUserId == userId)
- {
- return;
- }
-
- var data:Object = event.message.body.data
- switch (event.message.body.action)
- {
- case "accordionChange":
- accordion.selectedIndex = data.selectedIndex;
- return;
- case "propertyChange":
- customer.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler); // avoid circularity
- customer[data.property] = data.value;
- customer.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHandler);
- return;
- }
- }
-
- private function sendMessage(action:String, data:Object = null):void
- {
- var message:AsyncMessage = new AsyncMessage();
- message.body.userId = userId;
- message.body.action = action;
- message.body.data = data;
- producer.send(message);
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <local:Customer id="customer"/>
-
- <mx:ChannelSet id="cs">
- <mx:StreamingAMFChannel uri="/samples-spring/messagebroker/streamingamf"/>
- <mx:AMFChannel uri="/samples-spring/messagebroker/amflongpolling"/>
- <mx:AMFChannel uri="/samples-spring/messagebroker/amfpolling"/>
- </mx:ChannelSet>
-
- <mx:Producer id="producer" destination="chat" channelSet="{cs}"/>
- <mx:Consumer id="consumer" destination="chat" channelSet="{cs}" message="messageHandler(event)"/>
- </fx:Declarations>
-
-
- <s:Panel title="Customer Information" top="12" bottom="12" left="12" right="12">
-
- <mx:Accordion id="accordion" width="100%" height="100%" openDuration="0"
- change="accordionChangeHandler(event)">
-
- <mx:Form label="General">
- <mx:FormItem label="First Name">
- <s:TextInput id="firstName" text="@{customer.firstName}"/>
- </mx:FormItem>
- <mx:FormItem label="Last Name">
- <s:TextInput id="lastName" text="@{customer.lastName}"/>
- </mx:FormItem>
- <mx:FormItem>
- <s:CheckBox id="usCitizen" selected="@{customer.usCitizen}" label="US Citizen"/>
- </mx:FormItem>
- </mx:Form>
-
- <mx:Form label="Address">
- <mx:FormItem label="Address">
- <s:TextInput id="address" text="@{customer.address}"/>
- </mx:FormItem>
- <mx:FormItem label="City">
- <s:TextInput id="city" text="@{customer.city}"/>
- </mx:FormItem>
- <mx:FormItem label="State">
- <s:TextInput id="state" text="@{customer.state}"/>
- </mx:FormItem>
- <mx:FormItem label="Zip">
- <s:TextInput id="zip" text="@{customer.zip}"/>
- </mx:FormItem>
- </mx:Form>
-
- <mx:Form label="Phone">
- <mx:FormItem label="Office">
- <s:TextInput id="officePhone" text="@{customer.officePhone}"/>
- </mx:FormItem>
- <mx:FormItem label="Cell">
- <s:TextInput id="cellPhone" text="@{customer.cellPhone}"/>
- </mx:FormItem>
- </mx:Form>
-
- </mx:Accordion>
-
- </s:Panel>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/companymgr/.actionScriptProperties
deleted file mode 100755
index afa8cdd..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="companymgr.mxml" projectUUID="7412f889-9564-46a9-9bb0-2aeee9a54877" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="companymgr.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/companymgr/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/.project b/apps/samples-spring/WEB-INF/flex-src/companymgr/.project
deleted file mode 100755
index 3aa892a..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>companymgr</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
[30/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-httpservice/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-httpservice/build.xml b/apps/samples/WEB-INF/flex-src/testdrive-httpservice/build.xml
deleted file mode 100755
index fb5da7d..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-httpservice/build.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?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="Testdrive - HTTPService" />
- <property name="application.file" value="main" />
- <property name="application.bin.dir" value="${samples.war}/testdrive-httpservice" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-httpservice/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="*.jsp"/>
- </copy>
-
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="${application.bin.dir}" includes="*.swf,index.html,*.jsp"/>
- <fileset dir="${application.bin.dir}/history" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/catalog.jsp
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/catalog.jsp b/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/catalog.jsp
deleted file mode 100755
index eb86d2b..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/catalog.jsp
+++ /dev/null
@@ -1,42 +0,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.
--->
-<%@page import="flex.samples.product.ProductService,
- flex.samples.product.Product,
- java.util.List"%>
-<?xml version="1.0" encoding="utf-8"?>
-<catalog>
-<%
- ProductService srv = new ProductService();
- List list = null;
- list = srv.getProducts();
- Product product;
- for (int i=0; i<list.size(); i++)
- {
- product = (Product) list.get(i);
-%>
- <product productId="<%= product.getProductId()%>">
- <name><%= product.getName() %></name>
- <description><%= product.getDescription() %></description>
- <price><%= product.getPrice() %></price>
- <image><%= product.getImage() %></image>
- <category><%= product.getCategory() %></category>
- <qtyInStock><%= product.getQtyInStock() %></qtyInStock>
- </product>
-<%
- }
-%>
-</catalog>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/main.mxml b/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/main.mxml
deleted file mode 100755
index 609130b..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/main.mxml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
-
- <mx:HTTPService id="srv" destination="catalog" useProxy="true"/>
-
- <mx:DataGrid dataProvider="{srv.lastResult.catalog.product}" width="100%" height="100%"/>
-
- <mx:Button label="Get Data" click="srv.send()"/>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/build.xml b/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/build.xml
deleted file mode 100755
index 198f89f..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/build.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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="Testdrive - RemoteObject" />
- <property name="application.file" value="main" />
- <property name="application.bin.dir" value="${samples.war}/testdrive-remoteobject" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-remoteobject/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}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/src/main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/src/main.mxml b/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/src/main.mxml
deleted file mode 100755
index 43d8fb6..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/src/main.mxml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
-
- <mx:RemoteObject id="srv" destination="product"/>
-
- <mx:DataGrid dataProvider="{srv.getProducts.lastResult}" width="100%" height="100%"/>
-
- <mx:Button label="Get Data" click="srv.getProducts()"/>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-update/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-update/build.xml b/apps/samples/WEB-INF/flex-src/testdrive-update/build.xml
deleted file mode 100755
index 540070c..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-update/build.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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="Testdrive - Update" />
- <property name="application.file" value="main" />
- <property name="application.bin.dir" value="${samples.war}/testdrive-update" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-update/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}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-update/src/Product.as
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-update/src/Product.as b/apps/samples/WEB-INF/flex-src/testdrive-update/src/Product.as
deleted file mode 100755
index abd704b..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-update/src/Product.as
+++ /dev/null
@@ -1,44 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- [Bindable]
- [RemoteClass(alias="flex.samples.product.Product")]
- public class Product
- {
- public function Product()
- {
- }
-
- public var productId:int;
-
- public var name:String;
-
- public var description:String;
-
- public var image:String;
-
- public var category:String;
-
- public var price:Number;
-
- public var qtyInStock:int;
-
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-update/src/ProductForm.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-update/src/ProductForm.mxml b/apps/samples/WEB-INF/flex-src/testdrive-update/src/ProductForm.mxml
deleted file mode 100755
index 911e2e8..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-update/src/ProductForm.mxml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?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:mx="http://www.adobe.com/2006/mxml" xmlns="*"
- title="Details" width="100%" height="100%">
-
- <Product id="product"
- name="{productName.text}"
- category="{category.text}"
- price="{Number(price.text)}"
- image="{image.text}"
- description="{description.text}"/>
-
- <mx:RemoteObject id="srv" destination="product"/>
-
- <mx:Form width="100%">
-
- <mx:FormItem label="Name">
- <mx:TextInput id="productName" text="{product.name}"/>
- </mx:FormItem>
-
- <mx:FormItem label="Category">
- <mx:TextInput id="category" text="{product.category}"/>
- </mx:FormItem>
-
- <mx:FormItem label="Image">
- <mx:TextInput id="image" text="{product.image}"/>
- </mx:FormItem>
-
- <mx:FormItem label="Price">
- <mx:TextInput id="price" text="{product.price}"/>
- </mx:FormItem>
-
- <mx:FormItem label="Description" width="100%">
- <mx:TextArea id="description" text="{product.description}" width="100%" height="100"/>
- </mx:FormItem>
-
- </mx:Form>
-
- <mx:ControlBar>
- <mx:Button label="Update" click="srv.update(product);"/>
- </mx:ControlBar>
-
-</mx:Panel>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-update/src/main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-update/src/main.mxml b/apps/samples/WEB-INF/flex-src/testdrive-update/src/main.mxml
deleted file mode 100755
index 5096478..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-update/src/main.mxml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="horizontal"
- creationComplete="srv.getProducts()">
-
- <mx:RemoteObject id="srv" destination="product"/>
-
- <mx:Panel title="Catalog" width="100%" height="100%">
- <mx:DataGrid id="list" dataProvider="{srv.getProducts.lastResult}" width="100%" height="100%"/>
- </mx:Panel>
-
- <ProductForm product="{Product(list.selectedItem)}"/>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-webservice/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-webservice/build.xml b/apps/samples/WEB-INF/flex-src/testdrive-webservice/build.xml
deleted file mode 100755
index 8f08dfa..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-webservice/build.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?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="Testdrive - WebService" />
- <property name="application.file" value="main" />
- <property name="application.bin.dir" value="${samples.war}/testdrive-webservice" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-webservice/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="*.jsp"/>
- </copy>
-
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="${application.bin.dir}" includes="*.swf,index.html,*.jsp"/>
- <fileset dir="${application.bin.dir}/history" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/testdrive-webservice/src/main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/testdrive-webservice/src/main.mxml b/apps/samples/WEB-INF/flex-src/testdrive-webservice/src/main.mxml
deleted file mode 100755
index 4208a96..0000000
--- a/apps/samples/WEB-INF/flex-src/testdrive-webservice/src/main.mxml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
-
- <mx:WebService id="srv" destination="ws-catalog" useProxy="true" showBusyCursor="true"/>
-
- <mx:DataGrid dataProvider="{srv.getCategories.lastResult}" width="100%" height="100%">
- <mx:columns>
- <mx:DataGridColumn dataField="categoryId" headerText="Category Id"/>
- <mx:DataGridColumn dataField="categoryName" headerText="Category Name"/>
- </mx:columns>
- </mx:DataGrid>
-
- <mx:Button label="Get Data" click="srv.getCategories()"/>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/traderdesktop/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/traderdesktop/build.xml b/apps/samples/WEB-INF/flex-src/traderdesktop/build.xml
deleted file mode 100755
index b27bf96..0000000
--- a/apps/samples/WEB-INF/flex-src/traderdesktop/build.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?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="Trader Desktop" />
- <property name="application.file" value="traderdesktop" />
- <property name="application.bin.dir" value="${samples.war}/traderdesktop" />
- <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/traderdesktop/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="*.jsp"/>
- </copy>
-
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true" includeemptydirs="true">
- <fileset dir="${application.bin.dir}" includes="*.swf,index.html,*.jsp"/>
- <fileset dir="${application.bin.dir}/history" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as b/apps/samples/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
deleted file mode 100755
index d6245f7..0000000
--- a/apps/samples/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
+++ /dev/null
@@ -1,55 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package {
-
- import mx.controls.Label;
- import flash.display.Graphics;
-
- public class BackgroundColorRenderer extends Label {
-
- public static var symbol:String;
-
- override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
- {
- super.updateDisplayList(unscaledWidth, unscaledHeight);
-
- var g:Graphics = graphics;
-
- g.clear();
-
- if (data && data.date && data.symbol == symbol)
- {
- if( data.change && data.change >= 0 )
- {
- g.beginFill(0x009900, 0.5);
- g.drawRect(0, 0, unscaledWidth, unscaledHeight);
- g.endFill();
- }
- else
- {
- g.beginFill(0xFF0000, 0.5);
- g.drawRect(0, 0, unscaledWidth, unscaledHeight);
- g.endFill();
- }
- }
-
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as b/apps/samples/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
deleted file mode 100755
index 93a6553..0000000
--- a/apps/samples/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
+++ /dev/null
@@ -1,40 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package {
-
- import mx.controls.Label;
- import mx.controls.dataGridClasses.*;
-
- public class ColorRenderer extends Label {
-
- override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
- {
- super.updateDisplayList(unscaledWidth, unscaledHeight);
- if (data && listData && data[DataGridListData(listData).dataField] < 0)
- {
- setStyle("color", 0xFF0000);
- }
- else
- {
- setStyle("color", 0x009900);
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/traderdesktop/src/main.css
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/traderdesktop/src/main.css b/apps/samples/WEB-INF/flex-src/traderdesktop/src/main.css
deleted file mode 100755
index fe9b240..0000000
--- a/apps/samples/WEB-INF/flex-src/traderdesktop/src/main.css
+++ /dev/null
@@ -1,30 +0,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.
- */
-@namespace mx "library://ns.adobe.com/flex/mx";
-
-mx|Application {
- padding-top: 16;
- padding-bottom: 16;
- padding-left: 16;
- padding-right: 16;
- vertical-gap: 4;
-}
-mx|Panel
-{
- borderColor: #006699;
- borderAlpha: 0.6;
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/traderdesktop/src/samples/portfolio/Stock.as
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/traderdesktop/src/samples/portfolio/Stock.as b/apps/samples/WEB-INF/flex-src/traderdesktop/src/samples/portfolio/Stock.as
deleted file mode 100755
index 6950d95..0000000
--- a/apps/samples/WEB-INF/flex-src/traderdesktop/src/samples/portfolio/Stock.as
+++ /dev/null
@@ -1,35 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package samples.portfolio
-{
- [RemoteClass(alias="flex.samples.marketdata.Stock")]
- [Bindable]
- public class Stock
- {
- public var symbol:String;
- public var name:String;
- public var low:Number;
- public var high:Number;
- public var open:Number;
- public var last:Number;
- public var change:Number = 0;
- public var date:Date;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/traderdesktop/src/startfeed.jsp
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/traderdesktop/src/startfeed.jsp b/apps/samples/WEB-INF/flex-src/traderdesktop/src/startfeed.jsp
deleted file mode 100755
index 07547ab..0000000
--- a/apps/samples/WEB-INF/flex-src/traderdesktop/src/startfeed.jsp
+++ /dev/null
@@ -1,26 +0,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.
--->
-<%@page import="flex.samples.marketdata.Feed"%>
-<%
- try {
- Feed feed = new Feed();
- feed.start();
- out.println("Feed Started");
- } catch (Exception e) {
- out.println("A problem occured while starting the feed: "+e.getMessage());
- }
-%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/traderdesktop/src/stopfeed.jsp
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/traderdesktop/src/stopfeed.jsp b/apps/samples/WEB-INF/flex-src/traderdesktop/src/stopfeed.jsp
deleted file mode 100755
index 300aaf8..0000000
--- a/apps/samples/WEB-INF/flex-src/traderdesktop/src/stopfeed.jsp
+++ /dev/null
@@ -1,26 +0,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.
--->
-<%@page import="flex.samples.marketdata.Feed"%>
-<%
- try {
- Feed feed = new Feed();
- feed.stop();
- out.println("Feed Stopped");
- } catch (Exception e) {
- out.println("A problem occured while stopping the feed: "+e.getMessage());
- }
-%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml b/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
deleted file mode 100755
index b2a9b9c..0000000
--- a/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
+++ /dev/null
@@ -1,241 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
- backgroundGradientColors="[#FFFFFF,#FFFFFF]"
- layout="horizontal" horizontalAlign="left" verticalGap="8"
- creationComplete="initApp()">
-
- <mx:Style source="main.css"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.channels.HTTPChannel;
- import mx.messaging.channels.AMFChannel;
- import mx.controls.Alert;
- import mx.collections.ArrayCollection;
- import mx.messaging.Channel;
- import mx.messaging.ChannelSet;
- import mx.messaging.config.ServerConfig;
- import mx.messaging.events.MessageEvent;
- import samples.portfolio.Stock;
- import mx.messaging.Consumer;
-
- private var consumers:Object;
-
- [Bindable]
- private var items:ArrayCollection;
-
- private var stockMap:Object;
-
- private function initApp():void
- {
- var channelSet:ChannelSet = ServerConfig.getChannelSet("market-data-feed");
- channels.dataProvider = channelSet.channelIds;
- consumers = new Object();
- stockMap = new Object();
- items = new ArrayCollection();
- initializeWatchList(["IBM", "JBLU", "ADBE", "GE", "C"]);
- displayChannelInfo();
- }
-
- private function deleteSymbol():void
- {
- var symbol:String = dg.selectedItem.symbol;
- unsubscribe(symbol);
- items.removeItemAt(dg.selectedIndex);
- delete stockMap[symbol];
- }
-
- public function initializeWatchList(list:Array):void
- {
- for (var i:int=0; i<list.length; i++)
- {
- addSymbol(list[i]);
- }
- }
-
- private function addSymbol(symbol:String):void
- {
- if (symbol == null || symbol == "")
- {
- Alert.show("Cannot add an empty symbol");
- return;
- }
-
- symbol = symbol.toUpperCase();
- if (stockMap.hasOwnProperty(symbol))
- {
- Alert.show("Symbol '" + symbol + "' is already in the list");
- return;
- }
-
- var stock:Stock = new Stock();
- stock.symbol = symbol;
- stockMap[symbol] = stock;
- items.addItem(stock);
- subscribe(symbol);
- }
-
- private function subscribe(symbol:String):void
- {
- var consumer:Consumer = new Consumer();
- consumer.destination = "market-data-feed";
- consumer.subtopic = symbol;
- consumer.channelSet = new ChannelSet([channels.selectedItem]);
- consumer.addEventListener(MessageEvent.MESSAGE, messageHandler);
- consumer.subscribe();
- consumers[symbol] = consumer;
- }
-
- private function unsubscribe(symbol:String):void
- {
- if (consumers[symbol])
- {
- var consumer:Consumer = consumers[symbol];
- consumer.removeEventListener(MessageEvent.MESSAGE, messageHandler);
- if (consumer.subscribed)
- {
- consumer.unsubscribe();
- }
- consumer.channelSet.disconnectAll();
- consumers[symbol] = null;
- }
- }
-
- private function channelChange():void
- {
- displayChannelInfo();
-
- var i:int;
- // Get rid of all the subscriptions that use the previously selected channel
- for (i=0; i<items.length; i++)
- {
- unsubscribe(items.getItemAt(i).symbol)
- }
-
- // Subscribe using the newly selected channel
- for (i=0; i<items.length; i++)
- {
- subscribe(items.getItemAt(i).symbol)
- }
- }
-
- private function displayChannelInfo():void
- {
- var channel:Object = ServerConfig.getChannel(channels.selectedItem as String);
- channelId.text = channel.id;
- channelClass.text = getQualifiedClassName(channel);
- endpoint.text = channel.endpoint;
- if (channel is AMFChannel || channel is HTTPChannel)
- {
- pollingEnabled.text = channel.pollingEnabled;
- pollingInterval.text = channel.pollingInterval;
- }
- else
- {
- pollingEnabled.text = "n/a";
- pollingInterval.text = "n/a";
- }
- perClientSettings.visible = channel.id.indexOf("per-client") >= 0;
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- var changedStock:Stock = event.message.body as Stock;
- var stock:Stock = stockMap[changedStock.symbol];
-
- BackgroundColorRenderer.symbol = changedStock.symbol;
-
- if (stock)
- {
- stock.open = changedStock.open;
- stock.change = changedStock.change;
- stock.last = changedStock.last;
- stock.high = changedStock.high;
- stock.low = changedStock.low;
- stock.date = changedStock.date;
- }
- }
-
- private function formatNumber(item:Object, column:DataGridColumn):String
- {
- return nf.format(item[column.dataField]);
- }
-
- // Only used for the per-client-qos channels
- private function setDelay():void
- {
- configSrv.setAttribute("market-data-delay", delay.text);
- }
-
-
- ]]>
- </mx:Script>
-
- <!-- Only used for the per-client-qos channels to provide per-client config values -->
- <mx:RemoteObject id="configSrv" destination="flex-client-qos-config"/>
-
- <mx:NumberFormatter id="nf" precision="2"/>
-
- <mx:Panel title="Watch List" width="400" height="400">
- <mx:DataGrid id="dg" dataProvider="{items}" width="100%" height="100%">
- <mx:columns>
- <mx:DataGridColumn headerText="Symbol" dataField="symbol" width="80"/>
- <mx:DataGridColumn headerText="Open" dataField="open" labelFunction="formatNumber" textAlign="right" width="60"/>
- <mx:DataGridColumn headerText="Last" dataField="last" itemRenderer="BackgroundColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
- <mx:DataGridColumn headerText="Change" dataField="change" itemRenderer="ColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
- <mx:DataGridColumn headerText="High" dataField="high" labelFunction="formatNumber" textAlign="right" width="60"/>
- <mx:DataGridColumn headerText="Low" dataField="low" labelFunction="formatNumber" textAlign="right" width="60"/>
- </mx:columns>
- </mx:DataGrid>
- <mx:ControlBar>
- <mx:TextInput id="symbol" enter="addSymbol(symbol.text);symbol.text='';" width="50"/>
- <mx:Button label="Add Symbol" click="addSymbol(symbol.text);symbol.text='';"/>
- <mx:Spacer width="100%"/>
- <mx:Button label="Delete Symbol" click="deleteSymbol()" enabled="{dg.selectedItem}"/>
- </mx:ControlBar>
- </mx:Panel>
-
- <mx:Form>
- <mx:FormItem label="Select a channel">
- <mx:ComboBox id="channels" change="channelChange()"/>
- </mx:FormItem>
- <mx:FormItem label="Channel Id">
- <mx:Label id="channelId"/>
- </mx:FormItem>
- <mx:FormItem label="Channel Class">
- <mx:Label id="channelClass"/>
- </mx:FormItem>
- <mx:FormItem label="Endpoint">
- <mx:Label id="endpoint"/>
- </mx:FormItem>
- <mx:FormItem label="Polling Enabled">
- <mx:Label id="pollingEnabled"/>
- </mx:FormItem>
- <mx:FormItem label="Polling Interval (millis)">
- <mx:Label id="pollingInterval"/>
- </mx:FormItem>
- <mx:FormItem id="perClientSettings" label="Custom (Per Client) Quote Delay" direction="horizontal">
- <mx:TextInput id="delay" width="80" text="5000"/>
- <mx:Button label="Apply" click="setDelay()"/>
- </mx:FormItem>
- </mx:Form>
-
-</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex/messaging-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex/messaging-config.xml b/apps/samples/WEB-INF/flex/messaging-config.xml
deleted file mode 100755
index 31422b0..0000000
--- a/apps/samples/WEB-INF/flex/messaging-config.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?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.
-
--->
-<service id="message-service" class="flex.messaging.services.MessageService">
-
- <adapters>
- <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
- </adapters>
-
- <default-channels>
- <channel ref="my-streaming-amf"/>
- <channel ref="my-polling-amf"/>
- </default-channels>
-
- <destination id="feed">
- <!-- Destination specific channel configuration can be defined if needed
- <channels>
- <channel ref="my-streaming-amf"/>
- </channels>
- -->
- </destination>
-
- <destination id="chat"/>
-
- <destination id="dashboard"/>
-
- <destination id="market-data-feed">
- <properties>
- <server>
- <allow-subtopics>true</allow-subtopics>
- <subtopic-separator>.</subtopic-separator>s
- </server>
- </properties>
- <channels>
- <channel ref="my-polling-amf"/>
- <channel ref="my-streaming-amf"/>
- <channel ref="per-client-qos-polling-amf"/>
- </channels>
- </destination>
-
-</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex/proxy-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex/proxy-config.xml b/apps/samples/WEB-INF/flex/proxy-config.xml
deleted file mode 100755
index 34324da..0000000
--- a/apps/samples/WEB-INF/flex/proxy-config.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?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.
-
--->
-<service id="proxy-service" class="flex.messaging.services.HTTPProxyService">
-
- <properties>
- <connection-manager>
- <max-total-connections>100</max-total-connections>
- <default-max-connections-per-host>2</default-max-connections-per-host>
- </connection-manager>
-
- <allow-lax-ssl>true</allow-lax-ssl>
- </properties>
-
- <default-channels>
- <channel ref="my-http"/>
- <channel ref="my-amf"/>
- </default-channels>
-
- <adapters>
- <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
- <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
- </adapters>
-
- <destination id="DefaultHTTP">
- <properties>
- </properties>
- </destination>
-
- <destination id="catalog">
- <properties>
- <url>/{context.root}/testdrive-httpservice/catalog.jsp</url>
- </properties>
- </destination>
-
- <destination id="ws-catalog">
- <properties>
- <wsdl>http://feeds.adobe.com/webservices/mxna2.cfc?wsdl</wsdl>
- <soap>http://feeds.adobe.com/webservices/mxna2.cfc</soap>
- </properties>
- <adapter ref="soap-proxy"/>
- </destination>
-
-</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex/remoting-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex/remoting-config.xml b/apps/samples/WEB-INF/flex/remoting-config.xml
deleted file mode 100755
index acee9e3..0000000
--- a/apps/samples/WEB-INF/flex/remoting-config.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?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.
-
--->
-<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="product">
- <properties>
- <source>flex.samples.product.ProductService</source>
- </properties>
- </destination>
-
- <destination id="productService">
- <properties>
- <source>flex.samples.dcd.product.ProductService</source>
- </properties>
- </destination>
-
- <destination id="chat-room-service">
- <properties>
- <source>flex.samples.runtimeconfig.ChatRoomService</source>
- <scope>application</scope>
- </properties>
- </destination>
-
- <destination id="flex-client-qos-config" channels="per-client-qos-polling-amf">
- <properties>
- <source>flex.samples.qos.FlexClientConfigService</source>
- </properties>
- </destination>
-
- </service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex/services-config.xml b/apps/samples/WEB-INF/flex/services-config.xml
deleted file mode 100755
index c8b7d15..0000000
--- a/apps/samples/WEB-INF/flex/services-config.xml
+++ /dev/null
@@ -1,146 +0,0 @@
-<?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.
-
--->
-<services-config>
-
- <services>
-
- <service class="flex.samples.DatabaseCheckService" id="hsqldb" />
-
- <service-include file-path="remoting-config.xml" />
- <service-include file-path="proxy-config.xml" />
- <service-include file-path="messaging-config.xml" />
-
- <service class="flex.samples.runtimeconfig.EmployeeRuntimeRemotingDestination" id="runtime-employee-ro" />
-
- <!--
- Application level default channels. Application level default channels are
- necessary when a dynamic destination is being used by a service component
- and no ChannelSet has been defined for the service component. In that case,
- application level default channels will be used to contact the destination.
- -->
- <default-channels>
- <channel ref="my-amf"/>
- </default-channels>
-
- </services>
-
-
- <security>
- <security-constraint id="sample-users">
- <auth-method>Custom</auth-method>
- <roles>
- <role>sampleusers</role>
- </roles>
- </security-constraint>
-
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
- <!-- Uncomment the correct app server
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
- <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
- <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
- <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
- -->
- </security>
-
- <channels>
-
- <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
- </channel-definition>
-
- <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>false</polling-enabled>
- </properties>
- </channel-definition>
-
- <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
- <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
- <properties>
- <add-no-cache-headers>false</add-no-cache-headers>
- </properties>
- </channel-definition>
-
- <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>4</polling-interval-seconds>
- </properties>
- </channel-definition>
-
- <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
- </channel-definition>
-
- <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
- <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
- <properties>
- <add-no-cache-headers>false</add-no-cache-headers>
- </properties>
- </channel-definition>
-
- <channel-definition id="per-client-qos-polling-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/qosamfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-millis>500</polling-interval-millis>
- <flex-client-outbound-queue-processor class="flex.samples.qos.CustomDelayQueueProcessor">
- <properties>
- <flush-delay>5000</flush-delay>
- </properties>
- </flex-client-outbound-queue-processor>
- </properties>
- </channel-definition>
-
- </channels>
-
- <logging>
- <!-- You may also use flex.messaging.log.ServletLogTarget -->
- <target class="flex.messaging.log.ConsoleTarget" level="Error">
- <properties>
- <prefix>[BlazeDS] </prefix>
- <includeDate>false</includeDate>
- <includeTime>false</includeTime>
- <includeLevel>true</includeLevel>
- <includeCategory>false</includeCategory>
- </properties>
- <filters>
- <pattern>Endpoint.*</pattern>
- <pattern>Service.*</pattern>
- <pattern>Configuration</pattern>
- </filters>
- </target>
- </logging>
-
- <system>
- <redeploy>
- <enabled>true</enabled>
- <watch-interval>20</watch-interval>
- <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
- <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
- </redeploy>
- </system>
-
-</services-config>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java b/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java
deleted file mode 100755
index 67f2abc..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java
+++ /dev/null
@@ -1,59 +0,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.
- */
-package flex.samples;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.SQLException;
-
-public class ConnectionHelper
-{
- private String url;
- private static ConnectionHelper instance;
-
- private ConnectionHelper()
- {
- try {
- Class.forName("org.hsqldb.jdbcDriver");
- url = "jdbc:hsqldb:hsql://localhost:9002/flexdemodb";
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- public static Connection getConnection() throws SQLException {
- if (instance == null) {
- instance = new ConnectionHelper();
- }
- try {
- return DriverManager.getConnection(instance.url);
- } catch (SQLException e) {
- throw e;
- }
- }
-
- public static void close(Connection connection)
- {
- try {
- if (connection != null) {
- connection.close();
- }
- } catch (SQLException e) {
- e.printStackTrace();
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/DAOException.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/DAOException.java b/apps/samples/WEB-INF/src/flex/samples/DAOException.java
deleted file mode 100755
index 4a06b6b..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/DAOException.java
+++ /dev/null
@@ -1,38 +0,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.
- */
-package flex.samples;
-
-public class DAOException extends RuntimeException
-{
- static final long serialVersionUID = -1881205326938716446L;
-
- public DAOException(String message)
- {
- super(message);
- }
-
- public DAOException(Throwable cause)
- {
- super(cause);
- }
-
- public DAOException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java b/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java
deleted file mode 100755
index 936ed85..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java
+++ /dev/null
@@ -1,65 +0,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.
- */
-package flex.samples;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-
-import flex.messaging.config.ConfigMap;
-import flex.messaging.services.AbstractBootstrapService;
-
-public class DatabaseCheckService extends AbstractBootstrapService
-{
- public void initialize(String id, ConfigMap properties)
- {
- Connection c = null;
- try
- {
- // Check that the database is running...
- c = ConnectionHelper.getConnection();
- // ... if yes return
- return;
- }
- catch (SQLException e)
- {
- System.out.println("******************************************************************************");
- System.out.println("* *");
- System.out.println("* Unable to connect to the samples database. *");
- System.out.println("* You must start the samples database before you can run the samples. *");
- System.out.println("* To start the samples database: *");
- System.out.println("* 1. Open a command prompt and go to the {install-dir}/sampledb dir *");
- System.out.println("* 2. Run startdb.bat (Windows) or startdb.sh (Unix-based systems) *");
- System.out.println("* *");
- System.out.println("******************************************************************************");
- }
- finally
- {
- ConnectionHelper.close(c);
- }
-
- }
-
- public void start()
- {
- }
-
-
- public void stop()
- {
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java b/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java
deleted file mode 100755
index cdfc2af..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java
+++ /dev/null
@@ -1,37 +0,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.
- */
-package flex.samples.crm;
-
-public class ConcurrencyException extends Exception
-{
- private static final long serialVersionUID = -6405818907028247079L;
-
- public ConcurrencyException(String message)
- {
- super(message);
- }
-
- public ConcurrencyException(Throwable cause)
- {
- super(cause);
- }
-
- public ConcurrencyException(String message, Throwable cause)
- {
- super(message, cause);
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java b/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java
deleted file mode 100755
index a0a6f2d..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java
+++ /dev/null
@@ -1,38 +0,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.
- */
-package flex.samples.crm;
-
-public class DAOException extends RuntimeException
-{
- private static final long serialVersionUID = -8852593974738250673L;
-
- public DAOException(String message)
- {
- super(message);
- }
-
- public DAOException(Throwable cause)
- {
- super(cause);
- }
-
- public DAOException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java b/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java
deleted file mode 100755
index 5881851..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java
+++ /dev/null
@@ -1,105 +0,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.
- */
-package flex.samples.crm.company;
-
-public class Company
-{
- private int companyId;
-
- private String name;
-
- private String address;
-
- private String city;
-
- private String zip;
-
- private String state;
-
- private String industry;
-
- public String getAddress()
- {
- return address;
- }
-
- public void setAddress(String address)
- {
- this.address = address;
- }
-
- public String getCity()
- {
- return city;
- }
-
- public void setCity(String city)
- {
- this.city = city;
- }
-
- public int getCompanyId()
- {
- return companyId;
- }
-
- public void setCompanyId(int companyId)
- {
- this.companyId = companyId;
- }
-
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- public String getState()
- {
- return state;
- }
-
- public void setState(String state)
- {
- this.state = state;
- }
-
- public String getZip()
- {
- return zip;
- }
-
- public void setZip(String zip)
- {
- this.zip = zip;
- }
-
- public String getIndustry()
- {
- return this.industry;
- }
-
- public void setIndustry(String industry)
- {
- this.industry = industry;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java b/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java
deleted file mode 100755
index 3126504..0000000
--- a/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java
+++ /dev/null
@@ -1,228 +0,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.
- */
-package flex.samples.crm.company;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.List;
-
-import flex.samples.ConnectionHelper;
-import flex.samples.crm.ConcurrencyException;
-import flex.samples.crm.DAOException;
-
-public class CompanyDAO
-{
- public List findCompanies(String name, String industry) throws DAOException
- {
- List list = new ArrayList();
- Connection c = null;
- try
- {
- String sql = "SELECT * FROM company";
- if (industry != null && industry != "All")
- sql += " WHERE industry = ?";
- if (name != null)
- {
- if (industry == null)
- sql += " WHERE company.name LIKE ?";
- else
- sql += " AND company.name LIKE ?";
- }
- sql += " ORDER BY company.name";
-
- c = ConnectionHelper.getConnection();
-
- PreparedStatement ps = c.prepareStatement(sql);
- ps.setString(1, industry);
- ps.setString(1, "%" + name + "%");
- ResultSet rs = ps.executeQuery();
- Company company;
- while (rs.next())
- {
- company = new Company();
- company.setCompanyId(rs.getInt("company_id"));
- company.setName(rs.getString("name"));
- company.setAddress(rs.getString("address"));
- company.setCity(rs.getString("city"));
- company.setZip(rs.getString("zip"));
- company.setState(rs.getString("state"));
- company.setIndustry(rs.getString("industry"));
- list.add(company);
- }
- rs.close();
- ps.close();
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e);
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- return list;
- }
-
- public Company getCompany(int companyId) throws DAOException
- {
- Company company = null;
- Connection c = null;
- try
- {
- c = ConnectionHelper.getConnection();
- PreparedStatement ps = c.prepareStatement("SELECT * FROM company WHERE company_id= ?");
- ps.setInt(1, companyId);
- ResultSet rs = ps.executeQuery();
- if (rs.next())
- {
- company = new Company();
- company.setCompanyId(rs.getInt("company_id"));
- company.setName(rs.getString("name"));
- company.setAddress(rs.getString("address"));
- company.setCity(rs.getString("city"));
- company.setZip(rs.getString("zip"));
- company.setState(rs.getString("state"));
- company.setIndustry(rs.getString("industry"));
- }
- rs.close();
- ps.close();
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e);
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- return company;
- }
-
- public Company create(Company company) throws DAOException
- {
- Connection c = null;
- PreparedStatement ps = null;
- try
- {
- c = ConnectionHelper.getConnection();
- ps = c.prepareStatement("INSERT INTO company (name, address, city, zip, state, industry) VALUES (?, ?, ?, ?, ?, ?)");
- ps.setString(1, company.getName());
- ps.setString(2, company.getAddress());
- ps.setString(3, company.getCity());
- ps.setString(4, company.getZip());
- ps.setString(5, company.getState());
- ps.setString(6, company.getIndustry());
- ps.execute();
- ps.close();
- ps = null;
- Statement s = c.createStatement();
- // HSQLDB Syntax to get the identity (company_id) of inserted row
- ResultSet rs = s.executeQuery("CALL IDENTITY()");
- rs.next();
-
- // Update the id in the returned object. This is important as this
- // value must get returned to the client.
- company.setCompanyId(rs.getInt(1));
-
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e);
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- return company;
- }
-
- public void update(Company newVersion, Company previousVersion, List changes) throws DAOException, ConcurrencyException
- {
- Connection c = null;
- PreparedStatement ps = null;
- try
- {
- c = ConnectionHelper.getConnection();
- ps = c.prepareStatement("UPDATE company SET name=?, address=?, city=?, zip=?, state=?, industry=? WHERE company_id=? AND name=? AND address=? AND city=? AND zip=? AND state=?" );
- ps.setString(1, newVersion.getName());
- ps.setString(2, newVersion.getAddress());
- ps.setString(3, newVersion.getCity());
- ps.setString(4, newVersion.getZip());
- ps.setString(5, newVersion.getState());
- ps.setString(6, newVersion.getIndustry());
- ps.setInt(7, newVersion.getCompanyId());
- ps.setString(8, previousVersion.getName());
- ps.setString(9, previousVersion.getAddress());
- ps.setString(10, previousVersion.getCity());
- ps.setString(11, previousVersion.getZip());
- ps.setString(12, previousVersion.getState());
- if (ps.executeUpdate() == 0)
- {
- throw new ConcurrencyException("Item not found");
- }
- ps.close();
- ps = null;
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e);
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- }
-
- public void delete(Company company) throws DAOException, ConcurrencyException
- {
- Connection c = null;
- PreparedStatement ps = null;
- try
- {
- c = ConnectionHelper.getConnection();
-
- ps = c.prepareStatement("DELETE FROM company WHERE company_id=? AND name=? AND address=? AND city=? AND zip=? AND state=?");
- ps.setInt(1, company.getCompanyId());
- ps.setString(2, company.getName());
- ps.setString(3, company.getAddress());
- ps.setString(4, company.getCity());
- ps.setString(5, company.getZip());
- ps.setString(6, company.getState());
- if (ps.executeUpdate() == 0)
- {
- throw new ConcurrencyException("Item not found");
- }
- }
- catch (SQLException e)
- {
- e.printStackTrace();
- throw new DAOException(e);
- }
- finally
- {
- ConnectionHelper.close(c);
- }
- }
-}
\ No newline at end of file
[28/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/main.css
----------------------------------------------------------------------
diff --git a/apps/samples/main.css b/apps/samples/main.css
deleted file mode 100755
index 5470820..0000000
--- a/apps/samples/main.css
+++ /dev/null
@@ -1,138 +0,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.
- */
-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: #333333;
- 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: 12px;
- margin-bottom: 0px;
- font-size: 1.6em;
- color: #333333;
-}
-
-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: 0px;
-}
-
-.highlight {
- border: 1px solid #CCCCCC;
- padding-top:10px;
- padding-left:10px;
- padding-right:10px;
- padding-bottom:0px;
- border-color: #2080B3;
- margin-top:20px;
- 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/75229759/apps/samples/testdrive.htm
----------------------------------------------------------------------
diff --git a/apps/samples/testdrive.htm b/apps/samples/testdrive.htm
deleted file mode 100755
index 072c404..0000000
--- a/apps/samples/testdrive.htm
+++ /dev/null
@@ -1,254 +0,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.
--->
-<!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>BlazeDS Test Drive</title>
-<link href="main.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-
-<h1>BlazeDS Test Drive</h1>
-<p>In this test drive, you run a series of short sample applications that demonstrate the key features of BlazeDS. We walk you through the source code of each application to highlight the key points of its implementation. The source code for the Test Drive applications is available in samples\WEB-INF\flex-src\flex-src.zip.
- <ul>
- <li>If you want to examine the source code using your favorite code editor, unzip <strong>flex-src.zip</strong> anywhere on your file system. </li>
- <li>If you want to open the source code in Flex Builder, unzip <strong>flex-src.zip</strong> in the root folder of your Flex Builder workspace, and read <a href="fb-project-setup.htm">these instructions</a> to set up your Flex Builder projects. </li>
- </ul>
- </p>
-
-<div class="item">
- <h3>Sample 1: Accessing data using HTTPService</h3>
-
- <h4>Run the sample:</h4>
- <ol>
- <li>Click <a href="testdrive-httpservice/index.html">here</a> to run the application </li>
- <li>Click "Get Data": The DataGrid is populated with XML data returned by catalog.jsp </li>
- <li>Also notice some of the built-in DataGrid features:</li>
- <ul>
- <li>Sortable columns (click on a column header) </li>
- <li>Moveable columns (click on a column header and, with the mouse button pressed, move the column to a new position) </li>
- </ul>
- </ol>
- <h4>Code walkthrough:</h4>
-<p>Open main.mxml in the testdrive-httpservice/src directory to look at the source code of the application.</p>
-<p>Using HTTPService, you can send HTTP requests to a server, and consume the response. Although the HTTPService can be used to consume different types of responses, it is typically used to consume XML. You can use the HTTPService with any kind of server-side technology: JSP, Servlet, ASP, Ruby on Rails, PHP, etc. You specify the target service in the <strong>url</strong> property of HTTPService.</p>
-<p>Flex provides sophisticated data binding capabilities. You can bind the value of a property to the value of another property, or to an expression in general. In this example, the dataProvider property of the DataGrid is bound (using the curly braces notation) to the lastResult property of the HTTPService. </p>
-<p>HTTPService calls are asynchronous. The <strong>result</strong> event is triggered on the HTTPService when the data becomes available to the client application. The <strong>fault</strong> event is triggered if an error occurs at the server-side, or if the network becomes unavailable. </p>
-<p>By default, the XML document retrieved from the server is deserialized into an object graph. This allows you to navigate through the result using the dot notation. You can also get the result as an XML document by specifying resultFormat="e4x" on the HTTPService. In that case, you can parse the document using <a href="http://www.ecma-international.org/publications/standards/Ecma-357.htm">E4X</a> (ECMAScript for XML). </p>
-<p>The BlazeDS server is not required to use the HTTPService: By default, the application tries to connect directly to the domain specified in the HTTPService url attribute. This will work if one of the two conditions below is satisfied:</p>
-<ol>
- <li>The domain specified in the HTTPService url attribute is the domain from where your application was downloaded. </li>
- <li>A crossdomain.xml file granting access to your application's originating domain is available on the domain specified in the HTTPService url attribute. More information on crossdomain.xml is available <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14213&sliceId=2">here</a>.</li>
- </ol>
-<p>If you want your application to access services available on another domain without deploying a crossdomain.xml file on that domain (for example, because you may not own the target domain), you can set the <strong>useProxy</strong> attribute of the HTTPService to "<strong>true</strong>" like in this example. In this case, the request is sent to the BlazeDS proxy which makes the request to the target domain on the client application's behalf. This configuration also provides more control over the access to the service. For example, you may configure the proxy to require authentication before accessing a service, log access to the service, etc. </p>
-<p>When using the proxy, you can specify a logical name in the HTTPService <strong>destination</strong> attribute instead of specifying a hardcoded value in the url attribute. You then map this logical name to an actual URL in WEB-INF\flex\proxy-config.xml. Open WEB-INF\flex\proxy-config.xml to see how the catalog destination is configured.</p>
-<h4>More info:</h4>
-<ul>
- <li>Both HTTP and HTTPS are supported</li>
-</ul>
-</div>
-<br />
-<div class="item">
- <h3>Sample 2: Accessing data using Web Services</h3>
- <h4>Run the sample:</h4>
-<ol>
- <li>Click <a href="testdrive-webservice/index.html">here</a> to run the application
- <p>NOTE: Since this application accesses a live web service, you must have a connection to the internet to run it.</p></li>
- <li>Click "Get Data": The DataGrid is populated with data returned by the MXNA 2.0 web service hosted on feeds.adobe.com. </li>
- </ol>
-<h4>Code walkthrough:</h4>
-<p>Open main.mxml in the testdrive-webservice/src directory to look at the source code of the application.</p><p>Access the wsdl file for the web service used in this example: </p>
-<ul>
- <li><a href="http://feeds.adobe.com/webservices/mxna2.cfc?wsdl">http://feeds.adobe.com/webservices/mxna2.cfc?wsdl</a></li>
-
-</ul>
-<p>Using the WebService tag, you can invoke SOAP-based web services deployed in your application server or on the internet. Objects returned by a web service are automatically deserialized into ActionScript objects. Similarly ActionScript objects passed as arguments to a web service operation are serialized according the wsdl description.</p>
-<p>Notice that we also added DataGrid column definitions (using DataGridColumn) in this example.</p>
-<p>The BlazeDS server is not required to use the WebService: By default, the application tries to connect directly to the domain specified in the WebService wsdl attribute. This will work if one of the two conditions below is satisfied:</p>
-<ol>
- <li>The domain specified in the WebService wsdl attribute is the domain from where your application was downloaded. </li>
- <li>A crossdomain.xml file granting access to your application's originating domain is available on the domain specified in the WebService wsdl attribute. More information on crossdomain.xml is available <a href="http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14213&sliceId=2">here</a>.</li>
-</ol>
-<p>If you want your application to access services available on another domain without deploying a crossdomain.xml file on that domain (for example, because you may not own the target domain), you can set the <strong>useProxy</strong> attribute of the WebService to "<strong>true</strong>" like in this example. In this case, the request is sent to the BlazeDS proxy which makes the request to the target domain on the client application's behalf. This configuration also provides more control over the access to the service. For example, you may configure the proxy to require authentication before accessing a service, log access to the service, etc. </p>
-<p>When using the proxy, you can specify a logical name in the WebService <strong>destination</strong> attribute instead of specifying a hardcoded value in the wsdl attribute. You then map this logical name to an actual URL in WEB-INF\flex\proxy-config.xml. Open WEB-INF\flex\proxy-config.xml to see how the ws-catalog destination is configured.</p>
-<h4>More Info:</h4>
-<ul>
- <li>Flex supports both RPC-encoded and document-literal web services</li>
- <li>Like HTTPService, WebService calls are asynchronous: You can code <strong>result</strong> and <strong>fault</strong> event handlers<br />
- </li>
- </ul>
-
-</div>
-<br />
-
-<div class="item">
- <h3>Sample 3: Accessing data using Remoting </h3>
- <h4>Run the sample:</h4>
-<ol>
-
- <li>Click <a href="testdrive-remoteobject/index.html">here</a> to run the application</li>
- <li>Click "Get Data": The DataGrid is populated with data returned by the getProducts() method of the ProductService Java class. </li>
- </ol>
-<h4>Code walkthrough:</h4>
-<p>Open main.mxml in the testdrive-remoteobject/src directory 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\src\flex\samples\product\ProductService.java</li>
-
- <li>{context-root}\WEB-INF\flex\remoting-config.xml</li>
-</ul>
-<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>The value of the destination property of RemoteObject is a logical name that is mapped to a fully qualified java class in remoting-config.xml.</p>
-<p>Java objects returned by server-side methods are deserialized into either dynamic or typed ActionScript objects. In this example, we don't have an explicit ActionScript version of the Product Java class. Product objects are therefore deserialized into dynamic objects. In sample 5, we work with an explicit Product class in ActionScript. </p>
-<h4><strong>More info:</strong></h4>
-<ul>
- <li>Like HTTPService and WebService, RemoteObject calls are asynchronous. You use the <strong>result</strong> and <strong>fault</strong> events of the RemoteObject to handle results and errors. <br />
-
- </li>
- </ul>
-
-</div>
-<br />
-
-<div class="item">
- <h3>Sample 4: Flex Programming Model 101 </h3>
- <h4>Run the sample:</h4>
-<ol>
- <li>Click <a href="testdrive-101/index.html">here</a> to run the application</li>
-
- <li>Click a phone in the list: the details for the selected phone appear in the right panel </li>
- </ol>
-<h4>Code walkthrough:</h4>
-<p>Open the following files in the testdrive-101/src directory to look at the source code of the application:</p>
-<ul>
- <li>main.mxml</li>
- <li>Thumb.mxml</li>
- <li>ProductView.mxml</li>
-</ul>
-<p>Like in any other object-oriented programming language, a Flex application is made of a collection of classes. Using Flex, you can create classes using MXML or ActionScript. You typically create view classes in MXML, and Model and Controller classes in ActionScript. </p>
-<p>When you create an mxml file, you are actually creating a class. The root node of the mxml document indicates the class you extend. For example, creating a file named MasterDetail.mxml with an <Application> root node is equivalent to creating an ActionScript class with the following signature:</p>
-<div class="code">
- <p>public class MasterDetail extends Application { </p>
- <p>} </p>
-</div>
-
-<p>Similarly, creating a file named ProductView.mxml with a <Panel> root node is similar to creating a class with the following signature:</p>
-<div class="code">
- <p>public class ProductView extends Panel { </p>
- <p>} </p>
-</div>
-<p>Once you have defined a class, you can use it programatically or declaratively (as a tag in MXML) without the need for an additional descriptor file. Public properties are automatically available as tag attributes. For example, in MasterDetail.mxml, we define the <ProductView> tag and bind its product attribute to the selected item in the product list. </p>
-
-<p>Also notice the support for CSS style sheets. </p>
-
-</div>
-<br />
-
-<div class="item">
- <h3>Sample 5: Updating Data</h3>
- <h4>Run the sample: </h4>
- <ol>
- <li>Click <a href="testdrive-update/index.html">here</a> to run the application</li>
-
- <li>Select a phone </li>
- <li>Modify some data in the right panel. For example, the price. </li>
- <li>Click Update: changes are sent to the back-end and persisted in the database by the ProductService class. </li>
-</ol>
-<h4>Code walkthrough:</h4>
-<p>Open the following files in the testdrive-update/src directory to look at the source code of the application:</p>
-<ul>
- <li>main.mxml</li>
- <li>ProductForm.mxml</li>
- <li>Product.as</li>
-</ul>
-<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>WEB-INF\src\flex\samples\product\ProductService.java</li>
- <li>WEB-INF\flex\remoting-config.xml</li>
-</ul>
-<p>In Product.as we use the [RemoteClass(alias="flex.samples.product.Product")] annotation to map the ActionScript version of the Product class (Product.as) to the Java version (Product.java). As a result, Product objects returned by the getProducts() method of ProductService are deserialized into instances of the ActionScript Product class. Similarly, the instance of the ActionScript Product class passed as an argument to the update method of the RemoteObject is deserialized into an instance of the java version of the Product class at the server-side. </p>
-
-</div>
-<br />
-
-
-<div class="item">
- <h3>Sample 6: Publish/Subscribe Messaging (Data Push Use Case)</h3>
- <h4>Run the sample:</h4>
- <p> In this example, a Java component publishes simulated real time values to a message queue. The Flex client subscribes to that queue and displays the values in real time. </p>
- <ol>
-
- <li>To start the feed component at the server-side, access: <a href="testdrive-datapush/startfeed.jsp">testdrive-datapush/startfeed.jsp</a></li>
- <li>Click <a href="testdrive-datapush/index.html">here</a> to run the application</li>
- <li>Click the "Subscribe to 'feed' destination" button: Pushed values appear in the text field</li>
- <li>To stop the feed when you are done experimenting with the application, access: <a href="testdrive-datapush/stopfeed.jsp">testdrive-datapush/stopfeed.jsp</a></li>
- </ol>
- <h4>Code walkthrough:</h4>
-<p>Open FeedClient.mxml in the testdrive-datapush/src directory 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>WEB-INF\src\flex\samples\feed\Feed.Java</li>
- <li>WEB-INF\flex\messaging-config.xml</li>
- </ul>
- <p>Flex supports publish/subscribe messaging through the BlazeDS Message Service. The Message Service manages a set of destinations that Flex clients can publish and subsribe to. Flex provides two components, Producer and Consumer, that you use to respectively publish and subscribe to a destination. To subscribe to a destination, you use the subscribe() method of the Consumer class. When a message is published to a destination you subscribed to, the <strong>message</strong> event is triggered on the Consumer. </p>
-<p>In Feed.java, the BlazeDS Java API (MessageBroker, AsyncMessage) is used to publish messages to the destination. Another option to exchange messages between Flex and Java applications is to map destinations to JMS topics, essentially allowing a Flex client to publish and subscribe to JMS topics. In addition to JMS, the Message Service adapter architecture allows you to integrate with any kind of messaging system. </p>
-<p>Messaging destinations are configured in messaging-config.xml. A key element of a destination configuration is the channel used to exchange data between the client and the server. Using BlazeDS, a messaging destination typically uses a streaming or a polling channel. </p>
-<ul>
- <li>Using a streaming channel, the server response is left open until the channel connection is closed, allowing the server to send down incremental chunks of data to the client. HTTP connections are not duplex. This means that a single streaming AMF or HTTP channel actually requires two browser HTTP connections in order to send data in both directions. One for the streamed response from the server to the client that the channel hangs on to, and a second transient connection, drawn from the browser pool only when data needs to be sent to the server. This second transient connection is immediately released back to the browser’s connection pool.</li>
- <li>A polling channel can be configured with a simple interval or with a sever wait if data is not immediately available (long polling). In either case, each poll response completes the request. Browser HTTP 1.1 connections are persistent by default, so the browser will likely recycle existing HTTP connections to send subsequent poll requests which lowers the overhead for polling.</li>
-</ul>
-<p>The streaming channel is the best option when near real time communication is required.</p>
-
-<p><strong>Difference between IE and FireFox:</strong></p>
-<p>Browsers have a limited number of connections that they can maintain per session. The maximum number of connections allowed, as well as the way sessions are handled are browser specific.</p>
-<p>In IE, the maximum number of connections per session is two, but if you start multiple IE instances from an operating system menu or shortcut, each instance is started in a different process and maintains its own session. However, if you start a new IE window using CTRL+N in an existing IE instance, that new window shares the same session as the IE instance that created it. In other words, you can have an unlimited number of applications using HTTP streaming to get data from the server as long as these applications are started in different IE processes. If you start multiple IE windows using CTRL+N, you are limited to the maximum number of connections per session (2). </p>
-<p>In Firefox, the maximum number of connections per session is eight. If you start multiple Firefox instances from an operating system menu or shortcut, all the instances are started in the same process and share a single session. Since the browser will typically need one connection for traditional HTTP requests, you can theoretically have a maximum of seven HTTP streaming connections with the server across all your browser instances. </p>
-<p>In either case, if the limit of connections per session is reached, the next attempt to connect to the server using a streaming channel will fail. BlazeDS provides an elegant fall back mechanism to handle such situations: The client always tries to connect using the first channel in the list of channles defined for the destination in messaging-config.xml. If that connection fails, the client automatically falls back to the next channel in the list. In this example, we defined the following default channelset for all the messaging destinations:</p>
-<p> <default-channels><br />
- <channel ref="my-streaming-amf"/><br />
- <channel ref="my-polling-amf"/><br />
- </default-channels><br />
-</p>
-<p>In other words, the client application will try to connect using a streaming channel first and will fall back to a polling channel if the streaming connection fails.</p>
-</div>
-<br />
-
-<div class="item">
- <h3>Sample 7: Publish/Subscribe Messaging (Collaboration Use Case) </h3>
- <h4>Run the sample:</h4>
- <ol>
-
- <li>Click <a href="testdrive-chat/index.html">here</a> to run the application</li>
- <li>Open the same URL in another browser session to open a second instance of the chat application </li>
- <li>Type a message in one of the chat clients and click "Send": the message appears in the two chat clients </li>
- </ol>
-<h4>Code walkthrough:</h4>
-<p>Open Chat.mxml in the testdrive-chat/src directory 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>WEB-INF\flex\messaging-config.xml</li>
-</ul>
-<p> This sample builds on the concepts and APIs introduced in the previous example. To publish a message from a client, you use the send() method of the Producer class. </p>
-<p>The messaging and real time infrastructure available in BlazeDS enables collaboration and data push applications to be built in a scalable and reliable manner while preserving the lightweight web deployment model.</p>
-
-</div>
-<br />
-
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/activemq.xml
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/activemq.xml b/apps/team/WEB-INF/activemq.xml
deleted file mode 100755
index 2da9ae5..0000000
--- a/apps/team/WEB-INF/activemq.xml
+++ /dev/null
@@ -1,36 +0,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.
--->
-<!-- START SNIPPET: xbean -->
-<beans
- xmlns="http://www.springframework.org/schema/beans"
- xmlns:amq="http://activemq.apache.org/schema/core"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
- http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
-
- <broker xmlns="http://activemq.apache.org/schema/core" useJmx="false" persistent="false">
-
- <transportConnectors>
- <transportConnector uri="tcp://localhost:61516"/>
- </transportConnectors>
-
- </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/flex/global.css
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/flex/global.css b/apps/team/WEB-INF/flex/global.css
deleted file mode 100755
index f13e300..0000000
--- a/apps/team/WEB-INF/flex/global.css
+++ /dev/null
@@ -1,17 +0,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.
- */
-/* global style sheet */
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/flex/messaging-config.xml
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/flex/messaging-config.xml b/apps/team/WEB-INF/flex/messaging-config.xml
deleted file mode 100755
index 86208b7..0000000
--- a/apps/team/WEB-INF/flex/messaging-config.xml
+++ /dev/null
@@ -1,292 +0,0 @@
-<?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.
-
--->
-<service id="message-service"
- class="flex.messaging.services.MessageService">
-
- <adapters>
- <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
- <adapter-definition id="customASAdapter" class="features.messaging.customadapter.CustomActionscriptAdapter"/>
- </adapters>
-
- <!-- Basic destinations -->
-
- <!-- AMF -->
- <destination id="messaging_AMF" channels="my-amf"/>
- <destination id="messaging_AMF_Piggyback" channels="my-amf-piggyback"/>
- <destination id="messaging_AMF_Poll" channels="my-amf-poll"/>
- <destination id="messaging_AMF_LongPoll" channels="my-amf-longpoll"/>
- <destination id="messaging_AMF_LongPoll2" channels="my-amf-longpoll2"/>
- <destination id="messaging_AMF_SecureLongPoll" channels="my-amf-secure-longpoll"/>
- <destination id="messaging_AMF_Stream" channels="my-amf-stream"/>
-
- <destination id="messaging_AMF_fallback" channels="bad-amf-stream,my-amf-poll"/>
-
- <!-- Secure AMF -->
- <destination id="messaging_SecureAMF" channels="my-secure-amf"/>
-
- <!-- HTTP -->
- <destination id="messaging_HTTP" channels="my-http"/>
- <destination id="messaging_HTTP_Piggyback" channels="my-http-piggyback"/>
- <destination id="messaging_HTTP_Poll" channels="my-http-poll"/>
- <destination id="messaging_HTTP_LongPoll" channels="my-http-longpoll"/>
- <destination id="messaging_HTTP_Stream" channels="my-http-stream"/>
-
- <destination id="messaging_HTTP_fallback" channels="bad-http-stream,my-http-poll"/>
-
- <!-- Secure HTTP -->
- <destination id="messaging_SecureHTTP" channels="my-secure-http"/>
-
- <!-- Destinations for specific features -->
-
- <!-- JMS - AMF -->
- <destination id="messaging_AMF_Poll_JMS_Topic" channels="my-amf-poll">
- <adapter ref="jms"/>
- <properties>
- <jms>
- <connection-factory>java:comp/env/jms/flex/TopicConnectionFactory</connection-factory>
- <destination-type>Topic</destination-type>
- <destination-jndi-name>java:comp/env/jms/topic/flex/simpletopic</destination-jndi-name>
- <message-type>javax.jms.TextMessage</message-type>
- </jms>
- </properties>
- </destination>
-
- <destination id="messaging_AMF_LongPoll_JMS_Topic" channels="my-amf-longpoll">
- <adapter ref="jms"/>
- <properties>
- <jms>
- <connection-factory>java:comp/env/jms/flex/TopicConnectionFactory</connection-factory>
- <destination-type>Topic</destination-type>
- <destination-jndi-name>java:comp/env/jms/topic/flex/simpletopic</destination-jndi-name>
- <message-type>javax.jms.TextMessage</message-type>
- </jms>
- </properties>
- </destination>
-
- <destination id="messaging_AMF_Poll_JMS_Queue" channels="my-amf-poll">
- <adapter ref="jms"/>
- <properties>
- <jms>
- <connection-factory>java:comp/env/jms/flex/QueueConnectionFactory</connection-factory>
- <destination-type>Queue</destination-type>
- <destination-jndi-name>java:comp/env/jms/queue/flex/simplequeue</destination-jndi-name>
- <message-type>javax.jms.TextMessage</message-type>
- </jms>
- </properties>
- </destination>
-
- <!-- JMS - HTTP -->
- <destination id="messaging_HTTP_Poll_JMS_Topic" channels="my-http-poll">
- <adapter ref="jms"/>
- <properties>
- <jms>
- <connection-factory>java:comp/env/jms/flex/TopicConnectionFactory</connection-factory>
- <destination-type>Topic</destination-type>
- <destination-jndi-name>java:comp/env/jms/topic/flex/simpletopic</destination-jndi-name>
- <message-type>javax.jms.TextMessage</message-type>
- </jms>
- </properties>
- </destination>
-
- <destination id="messaging_HTTP_Poll_JMS_Queue" channels="my-http-poll">
- <adapter ref="jms"/>
- <properties>
- <jms>
- <connection-factory>java:comp/env/jms/flex/QueueConnectionFactory</connection-factory>
- <destination-type>Queue</destination-type>
- <destination-jndi-name>java:comp/env/jms/queue/flex/simplequeue</destination-jndi-name>
- <message-type>javax.jms.TextMessage</message-type>
- </jms>
- </properties>
- </destination>
-
- <!-- Send and subscribe constraint examples -->
- <destination id="messaging_AMF_Poll_SendSubscribeConstraint" channels="my-amf-poll">
- <properties>
- <server>
- <send-security-constraint ref="sample-user-custom"/>
- <subscribe-security-constraint ref="sample-user-custom"/>
- </server>
- </properties>
- </destination>
-
- <destination id="messaging_AMF_LongPoll_SendSubscribeConstraint" channels="my-amf-longpoll">
- <properties>
- <server>
- <send-security-constraint ref="sample-user-custom"/>
- <subscribe-security-constraint ref="sample-user-custom"/>
- </server>
- </properties>
- </destination>
-
- <destination id="messaging_AMF_Stream_SendSubscribeConstraint" channels="my-amf-stream">
- <properties>
- <server>
- <send-security-constraint ref="sample-user-custom"/>
- <subscribe-security-constraint ref="sample-user-custom"/>
- </server>
- </properties>
- </destination>
-
- <destination id="messaging_HTTP_Poll_SendSubscribeConstraint" channels="my-http-poll">
- <properties>
- <server>
- <send-security-constraint ref="sample-user-basic"/>
- <subscribe-security-constraint ref="sample-user-basic"/>
- </server>
- </properties>
- </destination>
-
- <!-- Subtopics - AMF -->
- <destination id="messaging_AMF_Poll_Subtopic" channels="my-amf-poll">
- <properties>
- <server>
- <allow-subtopics>true</allow-subtopics>
- <subtopic-separator>.</subtopic-separator>
- </server>
- </properties>
- </destination>
-
- <destination id="messaging_AMF_Stream_Subtopic" channels="my-amf-stream">
- <properties>
- <server>
- <allow-subtopics>true</allow-subtopics>
- <subtopic-separator>.</subtopic-separator>
- </server>
- </properties>
- </destination>
-
-
- <!-- Subtopics - HTTP -->
- <destination id="messaging_HTTP_Poll_Subtopic" channels="my-http-poll">
- <properties>
- <server>
- <allow-subtopics>true</allow-subtopics>
- <subtopic-separator>.</subtopic-separator>
- </server>
- </properties>
- </destination>
-
- <!-- Clustering - AMF
- <destination id="messaging_AMF_Poll_Cluster" channels="my-amf-poll-for-cluster">
- <properties>
- <network>
- <cluster ref="default-cluster"/>
- </network>
- </properties>
- </destination>
- -->
-
- <!-- Clustering - SecureAMF
- <destination id="messaging_SecureAMF_Poll_Cluster" channels="my-secure-amf-poll-for-cluster">
- <properties>
- <network>
- <cluster ref="default-cluster"/>
- </network>
- </properties>
- </destination>
- -->
-
- <!-- Clustering - HTTP
- <destination id="messaging_HTTP_Poll_Cluster" channels="my-http-poll-for-cluster">
- <properties>
- <network>
- <cluster ref="default-cluster"/>
- </network>
- </properties>
- </destination>
- -->
-
- <!-- Clustering - SecureHTTP
- <destination id="messaging_SecureHTTP_Poll_Cluster" channels="my-secure-http-poll-for-cluster">
- <properties>
- <network>
- <cluster ref="default-cluster"/>
- </network>
- </properties>
- </destination>
- -->
-
- <!-- BEGIN destinations for testing MessageBrokerFilters -->
- <destination id="filteredChat" channels="my-amf-longpoll" />
- <destination id="dev/null" channels="my-amf-longpoll" />
- <!-- END destinations for testing MessageBrokerFilters -->
-
- <!-- BEGIN - Throttling samples -->
-
- <destination id="messaging_ThrottleInbound_PolicyError">
- <properties>
- <network>
- <throttle-inbound policy="ERROR" max-frequency="8" max-client-frequency="4"/>
- </network>
- </properties>
- <channels>
- <channel ref="my-amf-poll"/>
- <channel ref="my-amf-longpoll"/>
- <channel ref="my-amf-stream"/>
- <channel ref="my-http-poll"/>
- <channel ref="my-http-longpoll"/>
- <channel ref="my-http-stream"/>
- </channels>
- </destination>
-
- <destination id="messaging_ThrottleInbound_PolicyIgnore">
- <properties>
- <network>
- <throttle-inbound policy="IGNORE" max-frequency="8" max-client-frequency="4"/>
- </network>
- </properties>
- <channels>
- <channel ref="my-amf-poll"/>
- <channel ref="my-amf-longpoll"/>
- <channel ref="my-amf-stream"/>
- <channel ref="my-http-poll"/>
- <channel ref="my-http-longpoll"/>
- <channel ref="my-http-stream"/>
- </channels>
- </destination>
-
- <destination id="messaging_ThrottleOutbound_PolicyIgnore">
- <properties>
- <network>
- <throttle-outbound policy="IGNORE" max-frequency="8" max-client-frequency="4"/>
- </network>
- </properties>
- <channels>
- <channel ref="my-amf"/>
- <channel ref="my-amf-poll"/>
- <channel ref="my-amf-longpoll"/>
- <channel ref="my-amf-stream"/>
- <channel ref="my-http"/>
- <channel ref="my-http-poll"/>
- <channel ref="my-http-longpoll"/>
- <channel ref="my-http-stream"/>
- </channels>
- </destination>
-
- <!-- END - Throttling samples -->
-
- <!-- A sample that uses a custom adapter. -->
- <destination id="messaging_CustomAdapter" channels="my-amf-stream">
- <adapter ref="customASAdapter"/>
- </destination>
-
-</service>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/flex/proxy-config.xml
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/flex/proxy-config.xml b/apps/team/WEB-INF/flex/proxy-config.xml
deleted file mode 100755
index 60be1f4..0000000
--- a/apps/team/WEB-INF/flex/proxy-config.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-<?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.
-
--->
-<service id="proxy-service"
- class="flex.messaging.services.HTTPProxyService">
-
- <properties>
- <connection-manager>
- <max-total-connections>100</max-total-connections>
- <default-max-connections-per-host>2</default-max-connections-per-host>
- </connection-manager>
- <allow-lax-ssl>true</allow-lax-ssl>
- </properties>
-
- <adapters>
- <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
- <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
- </adapters>
-
- <default-channels>
- <channel ref="my-http"/>
- <channel ref="my-amf"/>
- </default-channels>
-
- <destination id="DefaultHTTP">
- </destination>
-
- <destination id="DefaultHTTPS">
- </destination>
-
-</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/flex/remoting-config.xml
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/flex/remoting-config.xml b/apps/team/WEB-INF/flex/remoting-config.xml
deleted file mode 100755
index 4a28a1e..0000000
--- a/apps/team/WEB-INF/flex/remoting-config.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-<?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.
-
--->
-<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="remoting_AMF" channels="my-amf">
- <properties>
- <source>features.remoting.EchoService</source>
- </properties>
- </destination>
-
- <destination id="remoting_AMFX" channels="my-http">
- <properties>
- <source>features.remoting.EchoService</source>
- </properties>
- </destination>
-
- <!-- Destination that can be used to push messages from the server -->
- <destination id="serverPushRO" channels="my-amf">
- <properties>
- <source>features.messaging.serverpush.ServerPushService</source>
- <scope>application</scope>
- </properties>
- </destination>
-
- <!-- A destination protected by a basic security constraint.
- Security constraints are defined in services-config.xml
- -->
- <destination id="remoting_AMF_SecurityConstraint_Basic" channels="my-amf-loginafterdisconnect">
- <properties>
- <source>features.remoting.EchoService</source>
- </properties>
- <security>
- <security-constraint ref="sample-user-basic"/>
- </security>
- </destination>
-
- <!-- A destination protected by a custom security constraint.
- Security constraints are defined in services-config.xml
- -->
- <destination id="remoting_AMF_SecurityConstraint_Custom" channels="my-amf-loginafterdisconnect">
- <properties>
- <source>features.remoting.EchoService</source>
- </properties>
- <security>
- <security-constraint ref="sample-user-custom"/>
- </security>
- </destination>
-
- <!-- Used by Flex clients to create destinations at runtime -->
- <destination id="RuntimeConfigurator" channels="my-amf">
- <properties>
- <source>features.runtimeconfig.RuntimeConfigurator</source>
- </properties>
- </destination>
-
- <!-- BEGIN destinations for testing MessageBrokerFilters -->
- <destination id="filteredAck">
- <properties>
- <source>features.remoting.EchoService</source>
- </properties>
- </destination>
-
- <destination id="filteredFault">
- <properties>
- <source>features.remoting.EchoService</source>
- </properties>
- </destination>
- <!-- END destinations for testing MessageBrokerFilters -->
-
-</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/flex/services-config.xml b/apps/team/WEB-INF/flex/services-config.xml
deleted file mode 100755
index 42c2296..0000000
--- a/apps/team/WEB-INF/flex/services-config.xml
+++ /dev/null
@@ -1,414 +0,0 @@
-<?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.
-
--->
-<services-config>
-
- <services>
- <service-include file-path="remoting-config.xml" />
- <service-include file-path="proxy-config.xml" />
- <service-include file-path="messaging-config.xml" />
- </services>
-
- <security>
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
- <!-- Uncomment the correct app server
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
- <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
- <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
- <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
- -->
-
- <!-- Security constraints that are used by samples in features/security-constraints/ -->
- <!-- Basic authentication -->
- <security-constraint id="sample-user-basic">
- <auth-method>Basic</auth-method>
- <!-- Roles are defined by the application server.
- In Tomcat, they are in conf/tomcat-users.xml
- -->
- <roles>
- <role>sampleusers</role>
- </roles>
- </security-constraint>
- <!-- Custom authentication -->
- <security-constraint id="sample-user-custom">
- <auth-method>Custom</auth-method>
- <roles>
- <role>sampleusers</role>
- </roles>
- </security-constraint>
- </security>
-
- <channels>
-
- <!-- AMF -->
-
- <!-- A regular AMF channel -->
- <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>false</polling-enabled>
- <serialization>
- <ignore-property-errors>false</ignore-property-errors>
- <include-read-only>true</include-read-only>
- <!-- Enable this for remoting_AMF_Vector.mxml test to work -->
- <prefer-vectors>false</prefer-vectors>
- -->
- </serialization>
- </properties>
- </channel-definition>
-
- <!-- A secure AMF channel -->
- <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
- <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
- <properties>
- <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
- <add-no-cache-headers>false</add-no-cache-headers>
- </properties>
- </channel-definition>
-
- <!-- A piggybacking AMF channel -->
- <channel-definition id="my-amf-piggyback" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamfpiggyback"
- class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>false</polling-enabled>
- <piggybacking-enabled>true</piggybacking-enabled>
- </properties>
- </channel-definition>
-
- <!-- A polling AMF channel -->
- <channel-definition id="my-amf-poll" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamfpoll"
- class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>3</polling-interval-seconds>
- </properties>
- </channel-definition>
-
- <!-- A long polling AMF channel -->
- <channel-definition id="my-amf-longpoll" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamflongpoll"
- class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <user-agent-settings>
- <!--
- <user-agent match-on="MSIE" max-streaming-connections-per-session=""1 kickstart-bytes="2048"/>
- <user-agent match-on="Firefox" max-streaming-connections-per-session="1" kickstart-bytes="0"/>
- -->
- <!-- MSIE 5, 6, 7 limit is 2. -->
- <user-agent match-on="MSIE" max-persistent-connections-per-session="1" kickstart-bytes="2048"/>
- <!-- MSIE 8 limit is 6. -->
- <user-agent match-on="MSIE 8" max-persistent-connections-per-session="5" kickstart-bytes="2048"/>
- <!-- Firefox 1, 2 limit is 2. -->
- <user-agent match-on="Firefox" max-persistent-connections-per-session="1"/>
- <!-- Firefox 3 limit is 6. -->
- <user-agent match-on="Firefox/3" max-persistent-connections-per-session="5"/>
- <!-- Safari 3, 4 limit is 4. -->
- <user-agent match-on="Safari" max-persistent-connections-per-session="3"/>
- <!-- Chrome 0, 1, 2 limit is 6. -->
- <user-agent match-on="Chrome" max-persistent-connections-per-session="5"/>
- <!-- Opera 7, 9 limit is 4.-->
- <user-agent match-on="Opera" max-persistent-connections-per-session="3"/>
- <!-- Opera 8 limit is 8. -->
- <user-agent match-on="Opera 8" max-persistent-connections-per-session="7"/>
- <!-- Opera 10 limit is 8. -->
- <user-agent match-on="Opera 9.8" max-persistent-connections-per-session="7"/>
- </user-agent-settings>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>0</polling-interval-seconds>
- <max-waiting-poll-requests>10</max-waiting-poll-requests>
- <wait-interval-millis>-1</wait-interval-millis>
- <client-wait-interval-millis>3000</client-wait-interval-millis>
- </properties>
- </channel-definition>
-
- <!-- A second long polling AMF channel -->
- <channel-definition id="my-amf-longpoll2" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamflongpoll2"
- class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <user-agent-settings>
- <user-agent match-on="Firefox" max-streaming-connections-per-session="4"/>
- </user-agent-settings>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>0</polling-interval-seconds>
- <max-waiting-poll-requests>10</max-waiting-poll-requests>
- <wait-interval-millis>-1</wait-interval-millis>
- <client-wait-interval-millis>3000</client-wait-interval-millis>
- </properties>
- </channel-definition>
-
- <!-- A secure long polling AMF channel -->
- <channel-definition id="my-amf-secure-longpoll" class="mx.messaging.channels.SecureAMFChannel">
- <endpoint url="https://{server.name}:9400/{context.root}/messagebroker/mysecureamflongpoll"
- class="flex.messaging.endpoints.SecureAMFEndpoint"/>
- <properties>
- <user-agent-settings>
- <user-agent match-on="Firefox" max-streaming-connections-per-session="4"/>
- </user-agent-settings>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>0</polling-interval-seconds>
- <max-waiting-poll-requests>10</max-waiting-poll-requests>
- <wait-interval-millis>-1</wait-interval-millis>
- <client-wait-interval-millis>3000</client-wait-interval-millis>
- </properties>
- </channel-definition>
-
- <!-- A streaming AMF channel with default options left in -->
- <channel-definition id="my-amf-stream" class="mx.messaging.channels.StreamingAMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myamfstream"
- class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
- <properties>
- <connection-idle-timeout-minutes>2</connection-idle-timeout-minutes>
- <max-streaming-clients>10</max-streaming-clients>
- <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
- <user-agent-settings>
- <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="1"/>
- <user-agent match-on="Firefox" kickstart-bytes="0" max-streaming-connections-per-session="4"/>
- </user-agent-settings>
- </properties>
- </channel-definition>
-
- <channel-definition id="bad-amf-stream" class="mx.messaging.channels.StreamingAMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/badamfstream"
- class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
- <properties>
- <idle-timeout-minutes>0</idle-timeout-minutes>
- <max-streaming-clients>10</max-streaming-clients>
- <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
- <user-agent-settings>
- <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="0"/>
- <user-agent match-on="Firefox" kickstart-bytes="0" max-streaming-connections-per-session="4"/>
- </user-agent-settings>
- </properties>
- </channel-definition>
-
- <!-- HTTP -->
-
- <!-- A regular HTTP channel -->
- <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
- <properties>
- <polling-enabled>false</polling-enabled>
- </properties>
- </channel-definition>
-
- <!-- A secure HTTP channel -->
- <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
- <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
- <properties>
- <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
- <add-no-cache-headers>false</add-no-cache-headers>
- </properties>
- </channel-definition>
-
- <!-- A piggybacking HTTP channel -->
- <channel-definition id="my-http-piggyback" class="mx.messaging.channels.HTTPChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttppiggyback"
- class="flex.messaging.endpoints.HTTPEndpoint"/>
- <properties>
- <polling-enabled>false</polling-enabled>
- <piggybacking-enabled>true</piggybacking-enabled>
- </properties>
- </channel-definition>
-
- <!-- A polling HTTP channel -->
- <channel-definition id="my-http-poll" class="mx.messaging.channels.HTTPChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttppoll"
- class="flex.messaging.endpoints.HTTPEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>3</polling-interval-seconds>
- </properties>
- </channel-definition>
-
- <!-- A long polling HTTP channel -->
- <channel-definition id="my-http-longpoll" class="mx.messaging.channels.HTTPChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttplongpoll"
- class="flex.messaging.endpoints.HTTPEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>0</polling-interval-seconds>
- <max-waiting-poll-requests>10</max-waiting-poll-requests>
- <wait-interval-millis>-1</wait-interval-millis>
- <client-wait-interval-millis>3000</client-wait-interval-millis>
- </properties>
- </channel-definition>
-
- <!-- A streaming HTTP channel with default options left out -->
- <channel-definition id="my-http-stream" class="mx.messaging.channels.StreamingHTTPChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/myhttpstream"
- class="flex.messaging.endpoints.StreamingHTTPEndpoint"/>
- </channel-definition>
-
- <channel-definition id="bad-http-stream" class="mx.messaging.channels.StreamingHTTPChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/badhttpstream"
- class="flex.messaging.endpoints.StreamingHTTPEndpoint"/>
- <properties>
- <max-streaming-clients>10</max-streaming-clients>
- <server-to-client-heartbeat-millis>5000</server-to-client-heartbeat-millis>
- <user-agent-settings>
- <user-agent match-on="MSIE" kickstart-bytes="2048" max-streaming-connections-per-session="0"/>
- <user-agent match-on="Firefox" kickstart-bytes="0" max-streaming-connections-per-session="0"/>
- </user-agent-settings>
- </properties>
- </channel-definition>
-
- <!-- Clustering -->
-
- <!-- A polling AMF channel to be used in clustered destinations. This means
- all tokens (server.name, server.port, etc.) removed from endpoint url
- -->
- <channel-definition id="my-amf-poll-for-cluster" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://localhost:8400/team/messagebroker/myamfpollforcluster"
- class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>3</polling-interval-seconds>
- </properties>
- </channel-definition>
-
-
- <!-- A polling HTTP channel to be used in clustered destinations. This means
- all tokens (server.name, server.port, etc.) removed from endpoint url
- -->
- <channel-definition id="my-http-poll-for-cluster" class="mx.messaging.channels.HTTPChannel">
- <endpoint url="http://localhost:8400/team/messagebroker/myhttppollforcluster"
- class="flex.messaging.endpoints.HTTPEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>3</polling-interval-seconds>
- </properties>
- </channel-definition>
-
- <!-- A secure polling AMF channel to be used in clustered destinations. This means
- all tokens (server.name, server.port, etc.) removed from endpoint url
- -->
- <channel-definition id="my-secure-amf-poll-for-cluster" class="mx.messaging.channels.SecureAMFChannel">
- <endpoint url="https://localhost:9400/team/messagebroker/mysecureamfpollforcluster"
- class="flex.messaging.endpoints.SecureAMFEndpoint"/>
- <properties>
- <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
- <add-no-cache-headers>false</add-no-cache-headers>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>3</polling-interval-seconds>
- </properties>
- </channel-definition>
-
- <!-- A secure polling HTTP channel to be used in clustered destinations. This means
- all tokens (server.name, server.port, etc.) removed from endpoint url
- -->
- <channel-definition id="my-secure-http-poll-for-cluster" class="mx.messaging.channels.SecureHTTPChannel">
- <endpoint url="https://localhost:9400/team/messagebroker/mysecurehttppollforcluster"
- class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
- <properties>
- <!--HTTPS requests on some browsers do not work when pragma "no-cache" are set-->
- <add-no-cache-headers>false</add-no-cache-headers>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>3</polling-interval-seconds>
- </properties>
- </channel-definition>
-
- <!-- A regular AMF channel with login-after-disconnect enabled. This channel is used
- by security-constraint samples.
- -->
- <channel-definition id="my-amf-loginafterdisconnect" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfloginafterdisconnect"
- class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>false</polling-enabled>
- <login-after-disconnect>true</login-after-disconnect>
- </properties>
- </channel-definition>
-
- </channels>
-
- <logging>
- <target class="flex.messaging.log.ConsoleTarget" level="Debug">
- <properties>
- <prefix>[BlazeDS] </prefix>
- <includeDate>false</includeDate>
- <includeTime>false</includeTime>
- <includeLevel>true</includeLevel>
- <includeCategory>true</includeCategory>
- </properties>
- <filters>
- <!--
- <pattern>Endpoint.FlexSession</pattern>
- <pattern>Client.FlexClient</pattern>
- <pattern>Client.MessageClient</pattern>
- <pattern>Endpoint.*</pattern>
- <pattern>Service.*</pattern>
- <pattern>Configuration</pattern>
- -->
- </filters>
- </target>
- </logging>
-
- <system>
- <!--
- <enforce-endpoint-validation>false</enforce-endpoint-validation>
- -->
- <manageable>true</manageable>
- <!--
- <redeploy>
- <enabled>true</enabled>
- <watch-interval>20</watch-interval>
- <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
- <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
- </redeploy>
- -->
- </system>
-
- <clusters>
- <cluster id="default-cluster" properties="jgroups-tcp.xml" default="false" url-load-balancing="true"/>
- <cluster id="udp-cluster" properties="jgroups-udp.xml" default="false" url-load-balancing="true"/>
- </clusters>
-
- <flex-client>
- <!--
- <timeout-minutes>45</timeout-minutes>
- <heartbeat-interval-millis>5000</heartbeat-interval-millis>
- -->
- </flex-client>
-
- <!-- Deserialization validator, uncomment the one you want to use -->
- <validators>
- <!--
- <validator class="features.validators.deserialization.TestDeserializationValidator"/>
- -->
- <!--
- <validator class="flex.messaging.validators.ClassDeserializationValidator">
- <properties>
- <disallow-classes>
- </disallow-classes>
- <allow-classes>
- <class name="java.*"/>
- <class name="\[Ljava.*"/>
- <class name="flex.*"/>
- </allow-classes>
- </properties>
- </validator>
- -->
- </validators>
-</services-config>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/flex/user_classes/add_your_as_and_swc_files_here.txt
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/flex/user_classes/add_your_as_and_swc_files_here.txt b/apps/team/WEB-INF/flex/user_classes/add_your_as_and_swc_files_here.txt
deleted file mode 100755
index e69de29..0000000
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/bootstrapservices/HTTPProxyBootstrapService.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/bootstrapservices/HTTPProxyBootstrapService.java b/apps/team/WEB-INF/src/features/bootstrapservices/HTTPProxyBootstrapService.java
deleted file mode 100755
index b0dbc38..0000000
--- a/apps/team/WEB-INF/src/features/bootstrapservices/HTTPProxyBootstrapService.java
+++ /dev/null
@@ -1,254 +0,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.
- */
-package features.bootstrapservices;
-
-import flex.messaging.config.ConfigMap;
-import flex.messaging.services.AbstractBootstrapService;
-import flex.messaging.services.Service;
-import flex.messaging.services.http.ExternalProxySettings;
-import flex.messaging.services.http.HTTPConnectionManagerSettings;
-import flex.messaging.services.http.HTTPProxyAdapter;
-import flex.messaging.services.http.HTTPProxyDestination;
-import flex.messaging.services.http.SOAPProxyAdapter;
-
-/**
- * This BootstrapService is used to dynamicaly create a HTTPProxy Service along
- * with its HTTPProxy Destinations without the need for any configuration files.
- */
-public class HTTPProxyBootstrapService extends AbstractBootstrapService
-{
-
- /**
- * Called by the <code>MessageBroker</code> after all of the server
- * components are created but right before they are started. This is
- * usually the place to create dynamic components.
- *
- * @param id Id of the <code>AbstractBootstrapService</code>.
- * @param properties Properties for the <code>AbstractBootstrapService</code>.
- */
- public void initialize(String id, ConfigMap properties)
- {
- Service httpProxyService = createService();
- createDestination1(httpProxyService);
- createDestination2(httpProxyService);
- createDestination3(httpProxyService);
- }
-
- /**
- * Called by the <code>MessageBroker</code> as server starts. Useful for
- * custom code that needs to run after all the components are initialized
- * and the server is starting up.
- */
- public void start()
- {
- // No-op.
- }
-
- /**
- * Called by the <code>MessageBroker</code> as server stops. Useful for
- * custom code that needs to run as the server is shutting down.
- */
- public void stop()
- {
- // No-op.
- }
-
- /*
- <?xml version="1.0" encoding="UTF-8"?>
- <service id="proxy-service" class="flex.messaging.services.HTTPProxyService">
-
- <!-- Example proxy-config.xml -->
-
- <properties>
- <connection-manager>
- <max-total-connections>100</max-total-connections>
- <default-max-connections-per-host>2</default-max-connections-per-host>
- </connection-manager>
-
- <!-- Allow self-signed certificates; should not be used in production -->
- <allow-lax-ssl>true</allow-lax-ssl>
-
- <external-proxy>
- <server>10.10.10.10</server>
- <port>3128</port>
- <nt-domain>mycompany</nt-domain>
- <username>flex</username>
- <password>flex</password>
- </external-proxy>
- </properties>
-
- <!-- Server-side code that directly contacts a destination object or service -->
- <adapters>
- <!--
- id: a unique id specifying the adapter
- class: the Flex Enterprise class which implements the adapter
- possible values: flex.messaging.services.http.HTTPProxyAdapter, flex.messaging.services.http.SOAPProxyAdapter
- default: an optional attribute identifying the adapter to use when none is specified for the service
- -->
- <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
- <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
- </adapters>
-
- <default-channels>
- <!--
- Set the ref id of the default channels to use as transport for this service.
- The channel is defined elsewhere using the channel-definition tag.
- -->
- <channel ref="my-http"/>
- <channel ref="my-amf"/>
- </default-channels>
- */
- private Service createService()
- {
- String serviceId = "proxy-service";
- String serviceClass = "flex.messaging.services.HTTPProxyService";
- Service httpProxyService = broker.createService(serviceId, serviceClass);
-
- // Note that <properties> are not set on the service since they are
- // adapter related properties and will be configured at adapter level
-
- httpProxyService.registerAdapter("http-proxy", "flex.messaging.services.http.HTTPProxyAdapter");
- httpProxyService.registerAdapter("soap-proxy", "flex.messaging.services.http.SOAPProxyAdapter");
- httpProxyService.setDefaultAdapter("http-proxy");
-
- httpProxyService.addDefaultChannel("my-http");
- httpProxyService.addDefaultChannel("my-amf");
-
- return httpProxyService;
- }
-
- /*
- <!-- Example default http destination -->
- <destination id="DefaultHTTP">
- <properties>
- <dynamic-url>http://{server.name}:/{context.root}/</dynamic-url>
- </properties>
- </destination>
-
- <!-- Example http proxy adapter destination -->
- <destination id="myHTTPService">
- <properties>
- <!-- The endpoint available to the http proxy service -->
- <url>http://www.mycompany.com/services/myservlet</url>
-
- <!-- Wild card endpoints available to the http proxy services -->
- <dynamic-url>http://www.mycompany.com/services/*</dynamic-url>
- </properties>
- </destination>
- */
- public void createDestination1(Service service)
- {
- String destinationId = "DefaultHTTP";
- HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);
-
- destination.addDynamicUrl("http://{server.name}:*/{context.root}/*");
-
- String adapterId = "http-proxy";
- HTTPProxyAdapter adapter = (HTTPProxyAdapter)destination.createAdapter(adapterId);
- addProperties(adapter);
- }
-
- /*
- <!-- Example http proxy adapter destination -->
- <destination id="myHTTPService">
- <properties>
- <!-- The endpoint available to the http proxy service -->
- <url>http://www.mycompany.com/services/myservlet</url>
-
- <!-- Wild card endpoints available to the http proxy services -->
- <dynamic-url>http://www.mycompany.com/services/*</dynamic-url>
- </properties>
- </destination>
- */
- private void createDestination2(Service service)
- {
- String destinationId = "myHTTPService";
- HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);
-
- destination.setDefaultUrl("http://www.mycompany.com/services/myservlet");
- destination.addDynamicUrl("http://www.mycompany.com/services/*");
-
- String adapterId = "http-proxy";
- HTTPProxyAdapter adapter = (HTTPProxyAdapter)destination.createAdapter(adapterId);
- addProperties(adapter);
- }
-
- /*
- <!-- Example soap proxy adapter destination -->
- <destination id="echoSoapService">
- <properties>
- <!-- The location of the wsdl defined for soap proxy services -->
- <wsdl>http://{server.name}:{server.port}/myapp/echo?wsdl</wsdl>
-
- <!-- The soap endpoints available for access defined for soap proxy services -->
- <soap>http://{server.name}:/myapp/echo</soap>
- </properties>
-
- <!-- A specific adapter ref for the destination may be defined -->
- <adapter ref="soap-proxy"/>
- </destination>
- */
- private void createDestination3(Service service)
- {
- String destinationId = "echoSoapService";
- HTTPProxyDestination destination = (HTTPProxyDestination)service.createDestination(destinationId);
-
- destination.setDefaultUrl("http://{server.name}:{server.port}/myapp/echo?wsdl");
- destination.addDynamicUrl("http://{server.name}:/myapp/echo");
-
- String adapterId = "soap-proxy";
- SOAPProxyAdapter adapter = (SOAPProxyAdapter)destination.createAdapter(adapterId);
- addProperties(adapter);
- }
-
- /*
- <properties>
- <connection-manager>
- <max-total-connections>100</max-total-connections>
- <default-max-connections-per-host>2</default-max-connections-per-host>
- </connection-manager>
-
- <!-- Allow self-signed certificates; should not be used in production -->
- <allow-lax-ssl>true</allow-lax-ssl>
-
- <external-proxy>
- <server>10.10.10.10</server>
- <port>3128</port>
- <nt-domain>mycompany</nt-domain>
- <username>flex</username>
- <password>flex</password>
- </external-proxy>
- </properties>
- */
- private void addProperties(HTTPProxyAdapter adapter)
- {
- HTTPConnectionManagerSettings cms = new HTTPConnectionManagerSettings();
- cms.setMaxTotalConnections(100);
- cms.setDefaultMaxConnectionsPerHost(2);
- adapter.setConnectionManagerSettings(cms);
-
- adapter.setAllowLaxSSL(true);
-
- ExternalProxySettings eps = new ExternalProxySettings();
- eps.setProxyServer("10.10.10.10");
- eps.setProxyPort(3128);
- eps.setNTDomain("mycompany");
- eps.setUsername("flex");
- eps.setPassword("flex");
- adapter.setExternalProxySettings(eps);
- }
-}
[35/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/src/Main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/src/Main.mxml b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/src/Main.mxml
deleted file mode 100755
index 00abc2d..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/src/Main.mxml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx"
- applicationComplete="applicationCompleteHandler()">
-
- <fx:Script>
- <![CDATA[
-
- import mx.messaging.ChannelSet;
- import mx.messaging.channels.AMFChannel;
- import mx.controls.Alert;
- import mx.rpc.events.FaultEvent;
-
- private function applicationCompleteHandler():void
- {
- var channel:AMFChannel = new AMFChannel("my-amf", "/samples-spring/messagebroker/amf");
- var channelSet:ChannelSet = new ChannelSet();
- channelSet.addChannel(channel);
- ro.channelSet = channelSet;
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultString, "Error accessing RemoteObject");
- }
-
- private function login():void
- {
- ro.channelSet.login(userId.text, password.text);
- }
-
- private function logout():void
- {
- ro.channelSet.logout();
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <!-- "productService" is defined in Spring's configuration file WEB-INF/config/web-application-config.xml
- and provides remote access to the org.springframework.flex.samples.product.ProductDAO class -->
- <s:RemoteObject id="ro" destination="securedProductService" fault="faultHandler(event)"/>
- </fx:Declarations>
-
- <s:layout>
- <s:VerticalLayout paddingTop="12" paddingBottom="12" paddingLeft="12" paddingRight="12"/>
- </s:layout>
-
- <mx:Form>
- <mx:FormItem label="User Id">
- <s:TextInput id="userId"/>
- </mx:FormItem>
- <mx:FormItem label="Password">
- <s:TextInput id="password" displayAsPassword="true"/>
- </mx:FormItem>
- <mx:FormItem direction="horizontal">
- <s:Button label="Login" click="login()"/>
- <s:Button label="Logout" click="logout()"/>
- </mx:FormItem>
- </mx:Form>
-
- <mx:DataGrid dataProvider="{ro.findAll.lastResult}" width="100%" height="100%"/>
-
- <!-- the findAll() method is defined in org.springframework.flex.samples.product.ProductDAO -->
- <s:Button label="Get Data" click="ro.findAll()"/>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.actionScriptProperties
deleted file mode 100755
index de3f3a0..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="traderdesktop.mxml" projectUUID="834611ae-9033-40d8-b18b-0ab770a9b52b" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="traderdesktop.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.project b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.project
deleted file mode 100755
index 4c49527..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>traderdesktop</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/build.xml b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/build.xml
deleted file mode 100755
index 069a5d0..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="traderdesktop" />
- <property name="application.file" value="traderdesktop" />
- <property name="application.bin.dir" value="${samples-spring.war}/traderdesktop" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/traderdesktop/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
[17/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/BindableComboBox.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/BindableComboBox.as b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/BindableComboBox.as
new file mode 100755
index 0000000..2fec3e4
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/BindableComboBox.as
@@ -0,0 +1,73 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ import flash.events.Event;
+
+ import mx.collections.IList;
+ import mx.events.CollectionEvent;
+
+ import spark.components.ComboBox;
+
+ public class BindableComboBox extends ComboBox
+ {
+ private var _value:Object;
+
+ public var valueField:String = "data";
+
+ public function set value(value:Object):void
+ {
+ _value = value;
+ selectIndex();
+ }
+
+ public function get value():Object
+ {
+ return selectedItem[valueField];
+ }
+
+ override public function set dataProvider(dataProvider:IList):void
+ {
+ super.dataProvider = dataProvider;
+ dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE,
+ function(event:Event):void
+ {
+ selectIndex();
+ });
+ selectIndex();
+ }
+
+ private function selectIndex():void
+ {
+ if (!_value || !dataProvider)
+ {
+ return;
+ }
+ for (var i:int = 0; i < dataProvider.length; i++)
+ {
+ if (_value == dataProvider[i][valueField])
+ {
+ selectedIndex = i;
+ return;
+ }
+ }
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Company.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Company.as b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Company.as
new file mode 100755
index 0000000..beeb4ee
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Company.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ [Bindable]
+ [RemoteClass(alias="org.springframework.flex.samples.company.Company")]
+ public class Company
+ {
+ public var id:int = -1;
+ public var name:String;
+ public var address:String;
+ public var city:String;
+ public var state:String;
+ public var zip:String;
+ public var phone:String;
+ public var industry:Industry;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyEvent.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyEvent.as b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyEvent.as
new file mode 100755
index 0000000..524d042
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyEvent.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ import flash.events.Event;
+
+ public class CompanyEvent extends Event
+ {
+ public static const CREATED:String = "companyCreated";
+ public static const UPDATED:String = "companyUpdated";
+ public static const DELETED:String = "companyDeleted";
+
+ public var company:Company;
+
+ public function CompanyEvent(type:String, company:Company, bubbles:Boolean = true, cancelable:Boolean = false)
+ {
+ this.company = company;
+ super(type, bubbles, cancelable);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyForm.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyForm.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyForm.mxml
new file mode 100755
index 0000000..d40e6a6
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyForm.mxml
@@ -0,0 +1,156 @@
+<?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:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
+ label="{company.id>-1?company.name:'New Company'}" xmlns:local="*">
+
+ <fx:Metadata>
+ [Event(name="companyCreated", type="CompanyEvent")]
+ [Event(name="companyUpdated", type="CompanyEvent")]
+ [Event(name="companyDeleted", type="CompanyEvent")]
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+ import mx.controls.Alert;
+ import mx.rpc.Fault;
+ import mx.rpc.events.FaultEvent;
+ import mx.rpc.events.ResultEvent;
+
+ [Bindable] public var company:Company;
+ [Bindable] public var industries:ArrayCollection;
+
+ private function save():void
+ {
+ company.name = companyName.text;
+ company.address = address.text;
+ company.city = city.text;
+ company.state = state.text;
+ company.zip = zip.text;
+ company.phone = phone.text;
+ company.industry = industry.selectedItem as Industry;
+ if (company.industry == null)
+ {
+ Alert.show("Please enter/choose an industry from the dropdown for the operation to be successful.", "Save Company");
+ }
+ else
+ {
+ if (company.id == -1)
+ {
+ ro.create(company);
+ }
+ else
+ {
+ ro.update(company);
+ }
+ }
+ }
+ private function deleteItem():void
+ {
+ ro.remove(company);
+ }
+
+ private function closeItem():void
+ {
+ parent.removeChild(this);
+ }
+
+ private function create_resultHandler(event:ResultEvent):void
+ {
+ company.id = event.result.id;
+ dispatchEvent(new CompanyEvent(CompanyEvent.CREATED, company));
+ }
+
+ private function update_resultHandler(event:ResultEvent):void
+ {
+ dispatchEvent(new CompanyEvent(CompanyEvent.UPDATED, company));
+ }
+
+ private function remove_resultHandler(event:ResultEvent):void
+ {
+ dispatchEvent(new CompanyEvent(CompanyEvent.DELETED, company));
+ }
+
+ private function remove_faultHandler(event:FaultEvent):void
+ {
+ if (event.fault.faultCode == "Server.ResourceUnavailable")
+ {
+ Alert.show("This is not allowed, as the 'remove(Company company)' method in the CompanyDAO class is excluded from remoting. To allow deletion, change the annotation on method to @RemotingInclude and try again.",
+ "Delete Company");
+ }
+ else
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <s:RemoteObject id="ro" destination="companyService" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <s:method name="create" result="create_resultHandler(event)"/>
+ <s:method name="update" result="update_resultHandler(event)"/>
+ <s:method name="remove" result="remove_resultHandler(event)" fault="remove_faultHandler(event)"/>
+ </s:RemoteObject>
+ </fx:Declarations>
+
+ <mx:Form>
+ <mx:FormItem label="Id">
+ <s:TextInput text="{company.id}" enabled="false"/>
+ </mx:FormItem>
+ <mx:FormItem label="Name">
+ <s:TextInput id="companyName" text="{company.name}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Industry">
+ <local:BindableComboBox id="industry" dataProvider="{industries}" labelField="name" valueField="id" value="{company.industry.id}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Address">
+ <s:TextInput id="address" text="{company.address}"/>
+ </mx:FormItem>
+ <mx:FormItem label="City">
+ <s:TextInput id="city" text="{company.city}"/>
+ </mx:FormItem>
+ <mx:FormItem label="State">
+ <s:TextInput id="state" text="{company.state}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Zip">
+ <s:TextInput id="zip" text="{company.zip}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Phone">
+ <s:TextInput id="phone" text="{company.phone}"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ <s:HGroup left="8" bottom="8">
+ <s:Button label="Close" click="closeItem()"/>
+ <s:Button label="Save" click="save()"/>
+ <s:Button label="Delete" click="deleteItem()"/>
+ </s:HGroup>
+
+</mx:Canvas>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Industry.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Industry.as b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Industry.as
new file mode 100755
index 0000000..2a2052d
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Industry.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ [Bindable]
+ [RemoteClass(alias="org.springframework.flex.samples.industry.Industry")]
+ public class Industry
+ {
+ public var id:int;
+ public var name:String;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/companymgr.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/companymgr.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/companymgr.mxml
new file mode 100755
index 0000000..a77ba31
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/companymgr/src/companymgr.mxml
@@ -0,0 +1,130 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
+ applicationComplete="init()">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.rpc.events.FaultEvent;
+ import mx.controls.Alert;
+ import mx.collections.ArrayCollection;
+ import mx.rpc.events.ResultEvent;
+
+ [Bindable] private var companies:ArrayCollection;
+ [Bindable] private var industries:ArrayCollection;
+
+ private function init():void
+ {
+ roIndustry.findAll();
+ }
+
+ private function company_findByName_resultHandler(event:ResultEvent):void
+ {
+ companies = event.result as ArrayCollection
+ }
+
+ private function industry_findAll_resultHandler(event:ResultEvent):void
+ {
+ industries = event.result as ArrayCollection
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+ public function openCompany(company:Company):void
+ {
+ var children:Array = tn.getChildren();
+ for (var i:int = 0; i<children.length; i++)
+ {
+ if (CompanyForm(children[i]).company.id == company.id)
+ {
+ tn.selectedChild = children[i];
+ return;
+ }
+ }
+
+ var form:CompanyForm = new CompanyForm();
+ form.addEventListener(CompanyEvent.CREATED, companyCreatedHandler);
+ form.addEventListener(CompanyEvent.UPDATED, companyUpdatedHandler);
+ form.addEventListener(CompanyEvent.DELETED, companyDeletedHandler);
+ tn.addChild(form);
+ form.company = company;
+ form.industries = industries;
+ tn.selectedChild = form;
+ }
+
+ private function search():void
+ {
+ roCompany.findByName(searchStr.text);
+ }
+
+ private function companyCreatedHandler(event:CompanyEvent):void
+ {
+ search();
+ }
+
+ private function companyUpdatedHandler(event:CompanyEvent):void
+ {
+ search();
+ }
+
+ private function companyDeletedHandler(event:CompanyEvent):void
+ {
+ tn.removeChild(event.target as CompanyForm);
+ search();
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <s:RemoteObject id="roCompany" destination="companyService" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <s:method name="findByName" result="company_findByName_resultHandler(event)"/>
+ </s:RemoteObject>
+
+ <s:RemoteObject id="roIndustry" destination="industryService" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <s:method name="findAll" result="industry_findAll_resultHandler(event)"/>
+ </s:RemoteObject>
+ </fx:Declarations>
+
+ <s:controlBarContent>
+ <s:TextInput id="searchStr"/>
+ <s:Button label="Search" click="search()"/>
+ <s:Button label="New Company" click="openCompany(new Company())"/>
+ </s:controlBarContent>
+
+ <mx:HDividedBox top="8" bottom="8" left="8" right="8">
+ <mx:DataGrid id="dg" dataProvider="{companies}" width="30%" height="100%"
+ doubleClickEnabled="{dg.selectedItem != null}"
+ doubleClick="openCompany(dg.selectedItem as Company)">
+ <mx:columns>
+ <mx:DataGridColumn dataField="name" headerText="Name"/>
+ <mx:DataGridColumn dataField="city" headerText="City"/>
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:TabNavigator id="tn" width="70%" height="100%"/>
+ </mx:HDividedBox>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.actionScriptProperties
new file mode 100755
index 0000000..4982951
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="feedstarter.mxml" projectUUID="41a33f5d-7732-4b6b-a1c2-dac03458be92" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="feedstarter.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.project b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.project
new file mode 100755
index 0000000..058d192
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>feedstarter</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
[27/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/bootstrapservices/MessagingBootstrapService.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/bootstrapservices/MessagingBootstrapService.java b/apps/team/WEB-INF/src/features/bootstrapservices/MessagingBootstrapService.java
deleted file mode 100755
index 60f78ba..0000000
--- a/apps/team/WEB-INF/src/features/bootstrapservices/MessagingBootstrapService.java
+++ /dev/null
@@ -1,330 +0,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.
- */
-
-package features.bootstrapservices;
-
-import java.util.Hashtable;
-
-import flex.messaging.MessageDestination;
-import flex.messaging.config.ConfigMap;
-import flex.messaging.config.NetworkSettings;
-import flex.messaging.config.ServerSettings;
-import flex.messaging.config.ThrottleSettings;
-import flex.messaging.config.ThrottleSettings.Policy;
-import flex.messaging.services.AbstractBootstrapService;
-import flex.messaging.services.Service;
-import flex.messaging.services.messaging.adapters.JMSAdapter;
-import flex.messaging.services.messaging.adapters.JMSSettings;
-
-/**
- * This BootstrapService is used to dynamicaly create a Messaging Service along
- * with its Messaging Destinations without the need for any configuration files.
- */
-public class MessagingBootstrapService extends AbstractBootstrapService
-{
-
- /**
- * Called by the <code>MessageBroker</code> after all of the server
- * components are created but right before they are started. This is
- * usually the place to create dynamic components.
- *
- * @param id Id of the <code>AbstractBootstrapService</code>.
- * @param properties Properties for the <code>AbstractBootstrapService</code>.
- */
- public void initialize(String id, ConfigMap properties)
- {
- Service messagingService = createService();
- createDestination1(messagingService);
- createDestination2(messagingService);
- }
-
- /**
- * Called by the <code>MessageBroker</code> as server starts. Useful for
- * custom code that needs to run after all the components are initialized
- * and the server is starting up.
- */
- public void start()
- {
- // No-op.
- }
-
- /**
- * Called by the <code>MessageBroker</code> as server stops. Useful for
- * custom code that needs to run as the server is shutting down.
- */
- public void stop()
- {
- // No-op.
- }
-
- /*
- <?xml version="1.0" encoding="UTF-8"?>
- <service id="message-service" class="flex.messaging.services.MessageService">
-
- <!-- Example messaging-config.xml -->
-
- <adapters>
- <!--
- id: a unique id specifying the adapter
- class: the Flex Enterprise class which implements the adapter
- possible values: flex.messaging.services.messaging.adapters.ActionScriptAdapter
- flex.messaging.services.messaging.adapters.JMSAdapter
- coldfusion.flex.CFEventGatewayAdapter
- default: an optional attribute identifying the adapter to use when none is specified
- -->
- <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
- </adapters>
- */
- private Service createService()
- {
- String serviceId = "messaging-service";
- String serviceClass = "flex.messaging.services.MessageService";
- Service messageService = broker.createService(serviceId, serviceClass);
-
- messageService.registerAdapter("actionscript", "flex.messaging.services.messaging.adapters.ActionScriptAdapter");
- messageService.registerAdapter("jms", "flex.messaging.services.messaging.adapters.JMSAdapter");
- messageService.setDefaultAdapter("actionscript");
-
- return messageService;
- }
-
- /*
- <!-- Example ActionScriptAdapter destination -->
- <destination id="MyTopic">
- <properties>
- <network>
- <!--
- Idle time in minutes for a subscriber to receive no messages
- that triggers it to be automatically unsubscribed.
- 0 means don't force subscribers to unsubscribe automatically.
- Default value is 0.
- -->
- <subscription-timeout-minutes>0</subscription-timeout-minutes>
-
- <!--
- Throttling can be set up destination-wide as well as per-client.
- The inbound policy may be NONE, ERROR or IGNORE and the outbound policy may be NONE and IGNORE.
- All throttle frequency values are considered the maximum allowed messages per second.
- A frequency of 0 disables throttling altogether.
- -->
- <throttle-inbound policy="ERROR" max-frequency="0"/>
- <throttle-outbound policy="IGNORE" max-frequency="0"/>
- </network>
-
- <server>
- <!-- Max number of messages to maintain in memory cache -->
- <max-cache-size>1000</max-cache-size>
-
- <!-- message-time-to-live of 0 means live forever -->
- <message-time-to-live>0</message-time-to-live>
-
- <!--
- The subtopic feature lets you divide the messages that a Producer component sends to a destination
- into specific categories at the destination. You can configure a Consumer component that subscribes to
- the destination to receive only messages sent to a specific subtopic or set of subtopics. You use
- wildcard characters (*) to send or receive messages from more than one subtopic. The subtopic-separator
- element is optional; the default value is period
- -->
- <allow-subtopics>true</allow-subtopics>
- <subtopic-separator>.</subtopic-separator>
-
- <!--
- Used to choose the algorithm for routing messages in a cluster.
- When set to server-to-server (the default), subscriptions are
- broadcast through the cluster to ensure each server knows which
- destinations, subtopics, and selector expressions define subscriptions
- for clients connected to other servers. When a data message
- arrives, it is then only sent to servers who have clients interested
- in that message. The other value for this setting "broadcast"
- will simply broadcast all data messages to all servers. In this
- mode, subscribe/unsubscribe messages are not sent across the cluster
- -->
- <cluster-message-routing>server-to-server</cluster-message-routing>
- </server>
- </properties>
-
- <channels>
- <!--
- Set the ref id of the default channels to use as transport for this service.
- The channel is defined elsewhere using the channel-definition tag.
- -->
- <channel ref="my-polling-amf"/>
- </channels>
- </destination>
- */
- private void createDestination1(Service service)
- {
- String destinationId = "MyTopic";
- MessageDestination destination = (MessageDestination)service.createDestination(destinationId);
-
- NetworkSettings ns = new NetworkSettings();
- ns.setSubscriptionTimeoutMinutes(0);
- ThrottleSettings ts = new ThrottleSettings();
- ts.setInboundPolicy(Policy.ERROR);
- ts.setIncomingDestinationFrequency(0);
- ts.setOutboundPolicy(Policy.IGNORE);
- ts.setOutgoingDestinationFrequency(0);
- ns.setThrottleSettings(ts);
- destination.setNetworkSettings(ns);
-
- ServerSettings ss = new ServerSettings();
- ss.setMessageTTL(0);
- ss.setBroadcastRoutingMode("server-to-server");
- destination.setServerSettings(ss);
-
- destination.addChannel("my-polling-amf");
- }
-
- /*
- <!-- Example JMSAdapter destination -->
- <destination id="MyJMSTopic">
- <properties>
- <server>
- <!-- Optional. Default is false. This option is currently only used by JMS
- adapter when the destination-type is Topic. In that case, durable JMS
- consumers will be used by the JMS adapter. Note that this does not
- guarantee durability between Flex clients and JMS adapter but rather
- between JMS adapter and JMS server.
- <durable>false</durable>
- </server>
-
- <!-- For specifics on JMS, please reference the Java Message Service specification or your J2EE server documentation -->
- <jms>
- <!--
- This determines whether the adapter is performing topic (pub/sub) or queue (point-to-point) messaging.
- This element is optional and defaults to Topic.
-
- <destination-type>Topic</destination-type>
- -->
-
- <!--
- The name of the destination in JMS
- This element is optional and defaults to the destination id
-
- <destination-name>FlexTopic</destination-name>
- -->
-
- <!--
- The javax.jms.Message type which the adapter should use for this destination.
- Supported types: javax.jms.TextMessage, javax.jms.ObjectMessage
- -->
- <message-type>javax.jms.TextMessage</message-type>
-
- <!-- The name of the JMS connection factory in JNDI -->
- <connection-factory>jms/flex/TopicConnectionFactory</connection-factory>
-
- <!-- The name of the destination in JNDI -->
- <destination-jndi-name>jms/topic/flex/simpletopic</destination-jndi-name>
-
- <!-- The JMS DeliveryMode for producers -->
- <delivery-mode>NON_PERSISTENT</delivery-mode>
-
- <!-- The JMS priority for messages sent by Flash producers -->
- <message-priority>DEFAULT_PRIORITY</message-priority>
-
- <!--
- The message acknowledgement mode for the JMS adapter
- None of these modes require any action on the part of the Flex messaging client.
- Supported modes:
- AUTO_ACKNOWLEDGE - the JMS provider client runtime automatically acknowledges the messages
- DUPS_OK_ACKNOWLEDGE - auto-acknowledgement of the messages is not required
- CLIENT_ACKNOWLEDGE - the JMS adapter should acknowledge that the message was received
- -->
- <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
-
- <!-- The JMS session transaction mode -->
- <transacted-sessions>false</transacted-sessions>
-
- <!--
- The maximum number of producer proxies that this destination
- should use when communicating with the JMS Server. The default
- is 1 which implies all clients using this destinatin will
- share the same connection to the JMS server.
- -->
- <max-producers>1</max-producers>
-
- <!-- (Optional) JNDI environment. Use when using JMS on a remote JNDI server.
- Used to specify the JNDI environment to access an external JMS provider.
- -->
- <initial-context-environment>
- <property>
- <name>Context.SECURITY_PRINCIPAL</name>
- <value>anonymous</value>
- </property>
- <property>
- <name>Context.SECURITY_CREDENTIALS</name>
- <value>anonymous</value>
- </property>
- <property>
- <name>Context.PROVIDER_URL</name>
- <value>http://{server.name}:1856</value>
- </property>
- <property>
- <name>Context.INITIAL_CONTEXT_FACTORY</name>
- <value>fiorano.jms.runtime.naming.FioranoInitialContextFactory</value>
- </property>
- </initial-context-environment>
- </jms>
- </properties>
-
- <channels>
- <channel ref="my-polling-amf"/>
- </channels>
-
- <security>
- <security-constraint ref="sample-users"/>
- </security>
-
- <adapter ref="jms"/>
- </destination>
- */
- private void createDestination2(Service service)
- {
- String destinationId = "MyJMSTopic";
- MessageDestination destination = (MessageDestination)service.createDestination(destinationId);
-
- ServerSettings ss = new ServerSettings();
- ss.setDurable(false);
- destination.setServerSettings(ss);
-
- String adapterId = "jms";
- JMSAdapter adapter = (JMSAdapter)destination.createAdapter(adapterId);
-
- // JMS settings are set at the adapter level
- JMSSettings jms = new JMSSettings();
- jms.setDestinationType("Topic");
- jms.setMessageType("javax.jms.TextMessage");
- jms.setConnectionFactory("jms/flex/TopicConnectionFactory");
- jms.setDestinationJNDIName("jms/topic/flex/simpletopic");
- jms.setDeliveryMode("NON_PERSISTENT");
- //jms.setMessagePriority(javax.jms.Message.DEFAULT_PRIORITY);
- jms.setAcknowledgeMode("AUTO_ACKNOWLEDGE");
- jms.setMaxProducers(1);
- Hashtable envProps = new Hashtable();
- envProps.put("Context.SECURITY_PRINCIPAL", "anonymous");
- envProps.put("Context.SECURITY_CREDENTIALS", "anonymous");
- envProps.put("Context.PROVIDER_URL", "http://{server.name}:1856");
- envProps.put("Context.INITIAL_CONTEXT_FACTORY", "fiorano.jms.runtime.naming.FioranoInitialContextFactory");
- jms.setInitialContextEnvironment(envProps);
- adapter.setJMSSettings(jms);
-
- destination.setSecurityConstraint("sample-users");
-
- destination.addChannel("my-polling-amf");
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/bootstrapservices/RemotingBootstrapService.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/bootstrapservices/RemotingBootstrapService.java b/apps/team/WEB-INF/src/features/bootstrapservices/RemotingBootstrapService.java
deleted file mode 100755
index 8422a17..0000000
--- a/apps/team/WEB-INF/src/features/bootstrapservices/RemotingBootstrapService.java
+++ /dev/null
@@ -1,220 +0,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.
- */
-
-package features.bootstrapservices;
-
-import flex.messaging.config.ConfigMap;
-import flex.messaging.services.AbstractBootstrapService;
-import flex.messaging.services.Service;
-import flex.messaging.services.remoting.RemotingDestination;
-
-/**
- * This BootstrapService is used to dynamicaly create a Remoting Service along
- * with its Remoting Destinations without the need for any configuration files.
- */
-public class RemotingBootstrapService extends AbstractBootstrapService
-{
-
- /**
- * Called by the <code>MessageBroker</code> after all of the server
- * components are created but right before they are started. This is
- * usually the place to create dynamic components.
- *
- * @param id Id of the <code>AbstractBootstrapService</code>.
- * @param properties Properties for the <code>AbstractBootstrapService</code>.
- */
- public void initialize(String id, ConfigMap properties)
- {
- Service remotingService = createService();
- createDestination1(remotingService);
- createDestination2(remotingService);
- createDestination3(remotingService);
- }
-
- /**
- * Called by the <code>MessageBroker</code> as server starts. Useful for
- * custom code that needs to run after all the components are initialized
- * and the server is starting up.
- */
- public void start()
- {
- // No-op.
- }
-
- /**
- * Called by the <code>MessageBroker</code> as server stops. Useful for
- * custom code that needs to run as the server is shutting down.
- */
- public void stop()
- {
- // No-op.
- }
-
- /*
- <?xml version="1.0" encoding="UTF-8"?>
- <service id="remoting-service" class="flex.messaging.services.RemotingService">
-
- <!-- Example remoting-config.xml -->
-
- <!--
- The set of adapters available for this service. A service uses an
- adapter to handle the implementation specifc details of a
- destination.
- -->
- <adapters>
- <!--
- id: A unique id for this adapter-definition. Destinations use this
- id to select which adapter should be used to process requests.
- class: The implementation class for the adapter. A single Remoting
- Service adapter ships with Flex 2:
- flex.messaging.services.remoting.adapters.JavaAdapter
- default: An optional boolean attribute identifying the adapter to
- use when none is specified for a destination.
- -->
- <adapter-definition id="java-object"
- class="flex.messaging.services.remoting.adapters.JavaAdapter"
- default="true"/>
- </adapters>
-
- <!--
- The set of default channels to use to transport messages to
- remoting-service destinations.
- -->
- <default-channels>
- <!--
- ref: A reference to a channel-definition id. Channels are defined
- in the top level configuration file.
- -->
- <channel ref="my-amf"/>
- <channel ref="my-http"/>
- </default-channels>
- */
- private Service createService()
- {
- String serviceId = "remoting-service";
- String serviceClass = "flex.messaging.services.RemotingService";
- Service remotingService = broker.createService(serviceId, serviceClass);
-
- String adapterId = "java-object";
- String adapterClass = "flex.messaging.services.remoting.adapters.JavaAdapter";
- remotingService.registerAdapter(adapterId, adapterClass);
- remotingService.setDefaultAdapter(adapterId);
-
- remotingService.addDefaultChannel("my-amf");
- remotingService.addDefaultChannel("my-http");
-
- return remotingService;
- }
-
- /*
- <!--
- A simple example.
-
- This destination uses the default set of channels 'my-amf' and
- 'my-http', relies on the default adapter configured for this service,
- 'java-object' (an instance of JavaAdapter), will use the default factory
- of the JavaAdapter - the flex.messaging.factories.JavaFactory, and
- POJO instances of the class specified by the source property will be
- created in the default scope, the 'request' scope.
- -->
- <destination id="sample">
- <properties>
- <!-- source is the Java class name of the destination -->
- <source>my.company.SampleService</source>
- </properties>
- </destination>
- */
- private void createDestination1(Service service)
- {
- String destinationId = "sample";
- RemotingDestination destination = (RemotingDestination)service.createDestination(destinationId);
- destination.setSource("my.company.SampleService");
- }
-
- /*
- <!--
- A more complex example.
-
- A custom factory is used to create instances of the source specified
- for this destination. Instances will be shared between requests in
- the same session. This destination also restricts access to
- authenticated users who are in the 'sampleusers' role.
- -->
- <destination id="sampleByFactoryAndSecure">
- <security>
- <security-constraint ref="sample-users" />
- </security>
- <properties>
- <!--
- myJavaFactory is defined in the main configuration file. The
- source and all other properties are used by the factory to
- create the java class. Factory instance provides the java class
- based on the properties provided such as scope.
- -->
- <factory>myJavaFactory</factory>
- <source>my.company.SampleService</source>
- <!-- Possible scope values are request, session or application. -->
- <scope>session</scope>
- </properties>
- </destination>
- */
- private void createDestination2(Service service)
- {
- String destinationId = "sampleByFactoryAndSecure";
- RemotingDestination destination = (RemotingDestination)service.createDestination(destinationId);
- destination.setSecurityConstraint("sample-users");
- destination.setFactory("myJavaFactory");
- destination.setSource("my.company.SampleService");
- destination.setScope("session");
- }
-
- /*
- <!--
- A verbose example using child tags.
- -->
- <destination id="sampleVerbose">
- <channels>
- <channel ref="my-secure-amf" />
- <channel ref="my-secure-http" />
- </channels>
- <adapter ref="java-object" />
- <security>
- <security-constraint ref="sample-users" />
- </security>
- <properties>
- <source>my.company.SampleService</source>
- <scope>session</scope>
- <factory>myJavaFactory</factory>
- </properties>
- </destination>
- */
- private void createDestination3(Service service)
- {
- String destinationId = "sampleVerbose";
- RemotingDestination destination = (RemotingDestination)service.createDestination(destinationId);
- destination.addChannel("my-secure-amf");
- destination.addChannel("my-secure-http");
-
- String adapterId = "java-object";
- destination.createAdapter(adapterId);
-
- destination.setSecurityConstraint("sample-users");
- destination.setSource("my.company.SampleService");
- destination.setScope("session");
- destination.setFactory("myJavaFactory");
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/messaging/customadapter/CustomActionscriptAdapter.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/messaging/customadapter/CustomActionscriptAdapter.java b/apps/team/WEB-INF/src/features/messaging/customadapter/CustomActionscriptAdapter.java
deleted file mode 100755
index c5fa57e..0000000
--- a/apps/team/WEB-INF/src/features/messaging/customadapter/CustomActionscriptAdapter.java
+++ /dev/null
@@ -1,96 +0,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.
- */
-package features.messaging.customadapter;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import flex.messaging.MessageClient;
-import flex.messaging.MessageClientListener;
-import flex.messaging.messages.CommandMessage;
-import flex.messaging.services.messaging.adapters.ActionScriptAdapter;
-
-/**
- * A sample custom adapter that keeps track its own subscriptions.
- */
-public class CustomActionscriptAdapter extends ActionScriptAdapter implements MessageClientListener
-{
- /**
- * Set of subscriptions (clientIds).
- */
- private Set<String> clientIds = new HashSet<String>();
-
- /**
- * Default constructor adds itself as the MessageClient created listener so
- * it can get creation notifications as Consumers subscribe (and MessageClients
- * get created for them on the server).
- */
- public CustomActionscriptAdapter()
- {
- MessageClient.addMessageClientCreatedListener(this);
- }
-
- /**
- * Manage method is called when Consumer subscribes/unsubscribes.
- * Override to update the clientIds set.
- */
- @Override public Object manage(CommandMessage commandMessage)
- {
- int operation = commandMessage.getOperation();
- String clientId = (String)commandMessage.getClientId();
- switch (operation)
- {
- case CommandMessage.SUBSCRIBE_OPERATION:
- clientIds.add(clientId);
- break;
- case CommandMessage.UNSUBSCRIBE_OPERATION:
- clientIds.remove(clientId);
- break;
- default:
- break;
- }
- return super.manage(commandMessage);
- }
-
- /**
- * Return true, so manage method gets called as Consumer subscribes.
- */
- public boolean handlesSubscriptions()
- {
- return true;
- }
-
- /**
- * Implements {@link MessageClientListener#messageClientCreated(MessageClient)}
- */
- public void messageClientCreated(MessageClient messageClient)
- {
- // Add the adapter as MessageClient destroyed listener, so it can get
- // destruction notifications as the MessageClient gets destroyed due to
- // Consumer unsubscribe, disconnect, or session invalidation.
- messageClient.addMessageClientDestroyedListener(this);
- }
-
- /**
- * Implements {@link MessageClientListener#messageClientDestroyed(MessageClient)}
- */
- public void messageClientDestroyed(MessageClient messageClient)
- {
- String clientId = (String)messageClient.getClientId();
- clientIds.remove(clientId);
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/messaging/serverpush/ServerPushService.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/messaging/serverpush/ServerPushService.java b/apps/team/WEB-INF/src/features/messaging/serverpush/ServerPushService.java
deleted file mode 100755
index 5f46143..0000000
--- a/apps/team/WEB-INF/src/features/messaging/serverpush/ServerPushService.java
+++ /dev/null
@@ -1,130 +0,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.
- */
-package features.messaging.serverpush;
-
-import java.util.concurrent.Callable;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-
-import flex.messaging.FlexContext;
-import flex.messaging.MessageBroker;
-import flex.messaging.messages.AsyncMessage;
-import flex.messaging.messages.Message;
-import flex.messaging.util.UUIDUtils;
-
-/**
- * This class can be used as a remote object by Flex client to start/stop pushing
- * messages from the server.
- */
-public class ServerPushService
-{
- static int INFINITE_RUN = -1;
-
- ScheduledExecutorService messagePushService;
- MessageBroker broker;
- int messageCount;
- int currentRunCount;
- int runCount;
-
- public ServerPushService()
- {
- broker = FlexContext.getMessageBroker();
- }
-
- /**
- * Push the specified number of messages per the specified number of millis,
- * runCount number of times (-1 means indefinitely) to the specified destination.
- */
- public void startPush(String destinationId, int numberOfMessages, long numberOfMillis, int runCount)
- {
- startPush(destinationId, null, numberOfMessages, numberOfMillis, runCount);
- }
-
- /**
- * Push the specified number of messages per the specified number of millis,
- * runCount number of times (-1 means indefinitely) to the specified destination
- * and subtopic.
- */
- public void startPush(String destinationId, String subtopic, int numberOfMessages, long numberOfMillis, int runCount)
- {
- if (messagePushService == null)
- messagePushService = Executors.newScheduledThreadPool(10);
-
- this.runCount = runCount;
- currentRunCount = 0;
-
- System.out.println("*** ServerPushService started: sending '" + numberOfMessages
- + "' messages in '" + numberOfMillis + "ms' to destination '" + destinationId + "'[" + subtopic + "].");
-
- MessageSenderCallable msc = new MessageSenderCallable(destinationId, subtopic, numberOfMessages, numberOfMillis);
- messagePushService.schedule(msc, numberOfMillis, TimeUnit.MILLISECONDS);
- }
-
- public void stopPush()
- {
- if (messagePushService != null)
- {
- System.out.println("*** ServerPushService stopped.");
- messagePushService.shutdown();
- messagePushService = null;
- }
- }
-
- class MessageSenderCallable implements Callable<Object>
- {
- private String destinationId;
- private int numberOfMessages;
- private long numberOfMillis;
- private String subtopic;
-
- public MessageSenderCallable(String destinationId, String subtopic, int numberOfMessages, long numberOfMillis)
- {
- this.destinationId = destinationId;
- this.numberOfMessages = numberOfMessages;
- this.numberOfMillis = numberOfMillis;
- this.subtopic = subtopic;
- }
-
- public Object call() throws Exception
- {
- for (int i = 0; i < numberOfMessages; i++)
- {
- Message message = createMessage();
- broker.routeMessageToService(message, null);
- }
- if (runCount == INFINITE_RUN || ++currentRunCount < runCount)
- {
- MessageSenderCallable messageSenderCallable = new MessageSenderCallable(destinationId, subtopic, numberOfMessages, numberOfMillis);
- messagePushService.schedule(messageSenderCallable, numberOfMillis, TimeUnit.MILLISECONDS);
- }
- return null;
- }
-
- private Message createMessage()
- {
- AsyncMessage msg = new AsyncMessage();
- msg.setDestination(destinationId);
- msg.setMessageId(UUIDUtils.createUUID(false));
- msg.setTimestamp(System.currentTimeMillis());
- msg.setBody("Foo" + messageCount++);
- if (subtopic != null)
- msg.setHeader(AsyncMessage.SUBTOPIC_HEADER_NAME, subtopic);
- return msg;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/remoting/AMFConnectionTest.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/remoting/AMFConnectionTest.java b/apps/team/WEB-INF/src/features/remoting/AMFConnectionTest.java
deleted file mode 100755
index 8bf62a5..0000000
--- a/apps/team/WEB-INF/src/features/remoting/AMFConnectionTest.java
+++ /dev/null
@@ -1,76 +0,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.
- */
-package features.remoting;
-
-import flex.messaging.io.amf.client.AMFConnection;
-import flex.messaging.io.amf.client.exceptions.ClientStatusException;
-import flex.messaging.io.amf.client.exceptions.ServerStatusException;
-
-/**
- * An AMFConnection sample that talks to a remoting destination.
- */
-public class AMFConnectionTest
-{
- private static final String DEFAULT_URL = "http://localhost:8400/team/messagebroker/amf";
- private static final String DEFAULT_DESTINATION_ID = "remoting_AMF";
-
- /**
- * Given a remote method name, returns the AMF connection call needed using
- * the default destination id.
- */
- private static String getOperationCall(String method)
- {
- return DEFAULT_DESTINATION_ID + "." + method;
- }
-
- // Not a test, just an example to show how to use AMFConnection.
- public static void main(String[] args2)
- {
- // Create the AMF connection.
- AMFConnection amfConnection = new AMFConnection();
-
- // Connect to the remote url.
- try
- {
- amfConnection.connect(DEFAULT_URL);
- }
- catch (ClientStatusException cse)
- {
- cse.printStackTrace();
- }
-
- // Make a remoting call and retrieve the result.
- try
- {
- Object result = amfConnection.call(getOperationCall("echo"), "Foo");
- System.out.println("Result: " + result);
- }
- catch (ClientStatusException cse)
- {
- cse.printStackTrace();
- }
- catch (ServerStatusException sse)
- {
- sse.printStackTrace();
- }
- finally
- {
- System.out.println("Done");
- amfConnection.close();
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/remoting/EchoService.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/remoting/EchoService.java b/apps/team/WEB-INF/src/features/remoting/EchoService.java
deleted file mode 100755
index 818a3ac..0000000
--- a/apps/team/WEB-INF/src/features/remoting/EchoService.java
+++ /dev/null
@@ -1,130 +0,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.
- */
-/**
- * A simple class that simply echoes back the provided text. Used by remoting
- * samples.
- */
-package features.remoting;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import features.remoting.externalizable.ExternalizableClass;
-import flex.messaging.io.BeanProxy;
-import flex.messaging.io.PropertyProxyRegistry;
-
-public class EchoService
-{
- // Making sure the read-only properties of ReadOnly class are serialized
- // back to the client.
- static
- {
- PropertyProxyRegistry registry = PropertyProxyRegistry.getRegistry();
- BeanProxy beanProxy = new BeanProxy();
- beanProxy.setIncludeReadOnly(true);
- registry.register(ReadOnly.class, beanProxy);
- }
-
- public String echo(String text)
- {
- return "I received '" + text + "' from you";
- }
-
- public int echoInt(int value)
- {
- return value;
- }
-
- public boolean echoBoolean(boolean value)
- {
- return value;
- }
-
- public List echoDenseArray(List array)
- {
- return array;
- }
-
- public Map echoSparseArray(Map array)
- {
- return array;
- }
-
- public Map echoMap(Map map)
- {
- return map;
- }
-
- public Map echoDictionary(Map dict)
- {
- return dict;
- }
-
- public Object echoIntVector(Object vector)
- {
- return vector;
- }
-
- public Object echoUIntVector(Object vector)
- {
- return vector;
- }
-
- public Object echoDoubleVector(Object vector)
- {
- return vector;
- }
-
- public Object echoObjectVector(Object vector)
- {
- return vector;
- }
-
- public Object echoStringVector(Object vector)
- {
- return vector;
- }
-
- public ExternalizableClass echoExternalizableClass(ExternalizableClass value)
- {
- return value;
- }
-
- public ReadOnly echoReadOnly()
- {
- ReadOnly ro = new ReadOnly("property1");
- return ro;
- }
-
- // A Class that only has a read-only property.
- public class ReadOnly
- {
- private String property;
-
- public ReadOnly(String property)
- {
- this.property = property;
- }
-
- public String getProperty()
- {
- return property;
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/remoting/externalizable/ExternalizableClass.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/remoting/externalizable/ExternalizableClass.java b/apps/team/WEB-INF/src/features/remoting/externalizable/ExternalizableClass.java
deleted file mode 100755
index c681502..0000000
--- a/apps/team/WEB-INF/src/features/remoting/externalizable/ExternalizableClass.java
+++ /dev/null
@@ -1,43 +0,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.
- */
-package features.remoting.externalizable;
-
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-
-/**
- * A simple class that uses Externalizable interface to read and write its properties.
- */
-public class ExternalizableClass implements Externalizable
-{
- private String property1;
- private String property2;
-
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- {
- property1 = (String)in.readObject();
- property2 = (String)in.readObject();
- }
-
- public void writeExternal(ObjectOutput out) throws IOException
- {
- out.writeObject(property1);
- out.writeObject(property2);
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/runtimeconfig/RuntimeConfigurator.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/runtimeconfig/RuntimeConfigurator.java b/apps/team/WEB-INF/src/features/runtimeconfig/RuntimeConfigurator.java
deleted file mode 100755
index ef4b3c3..0000000
--- a/apps/team/WEB-INF/src/features/runtimeconfig/RuntimeConfigurator.java
+++ /dev/null
@@ -1,110 +0,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.
- */
-/**
- * A class that is meant to be used by a remoting destination to create destinations
- * dynamically after server startup. The remoting destination is meant to be
- * invoked by Flex clients to create dynamic destinations and use them.
- */
-package features.runtimeconfig;
-
-import flex.messaging.MessageBroker;
-import flex.messaging.MessageDestination;
-import flex.messaging.services.MessageService;
-import flex.messaging.services.messaging.adapters.JMSAdapter;
-import flex.messaging.services.messaging.adapters.JMSSettings;
-
-public class RuntimeConfigurator
-{
- MessageBroker msgBroker;
-
- public RuntimeConfigurator()
- {
- msgBroker = MessageBroker.getMessageBroker(null);
- }
-
- /*
- <destination id="messaging_AMF_Poll_Runtime" channels="my-amf-poll"/>
- */
- public String createMessageDestination()
- {
- String serviceId = "message-service";
- String id = "messaging_AMF_Poll_Runtime";
-
- MessageService msgService = (MessageService)msgBroker.getService(serviceId);
- MessageDestination msgDestination = (MessageDestination)msgService.createDestination(id);
- msgDestination.addChannel("my-amf-poll");
-
- if (msgService.isStarted())
- msgDestination.start();
-
- return "Destination: " + id + " created for Service: " + serviceId;
- }
-
- /*
- <destination id="messaging_AMF_Poll_Runtime" channels="my-amf-poll"/>
- */
- public String removeMessageDestination()
- {
- String serviceId = "message-service";
- String id = "messaging_AMF_Poll_Runtime";
-
- MessageService msgService = (MessageService)msgBroker.getService(serviceId);
- msgService.removeDestination(id);
-
- return "Destination: " + id + " removed from Service: " + serviceId;
- }
-
- /*
- <destination id="messaging_AMF_Poll_JMS_Topic_Runtime" channels="my-amf-poll">
- <adapter ref="jms"/>
- <properties>
- <jms>
- <connection-factory>java:comp/env/jms/flex/TopicConnectionFactory</connection-factory>
- <destination-type>Topic</destination-type>
- <destination-jndi-name>java:comp/env/jms/topic/flex/simpletopic</destination-jndi-name>
- <message-type>javax.jms.TextMessage</message-type>
- </jms>
- </properties>
- </destination>
- */
- public String createMessageDestinationWithJMSAdapter()
- {
- String serviceId = "message-service";
- String id = "messaging_AMF_Poll_JMS_Topic_Runtime";
-
- MessageService msgService = (MessageService)msgBroker.getService(serviceId);
- MessageDestination msgDestination = (MessageDestination)msgService.createDestination(id);
- msgDestination.addChannel("my-amf-poll");
-
- // Use JMSSettings object for the <jms> properties above
- JMSSettings js = new JMSSettings();
- js.setConnectionFactory("java:comp/env/jms/flex/TopicConnectionFactory");
- js.setDestinationType("Topic");
- js.setMessageType("javax.jms.TextMessage");
- js.setDestinationJNDIName("java:comp/env/jms/topic/flex/simpletopic");
-
- JMSAdapter adapter = new JMSAdapter();
- adapter.setId("jms");
- adapter.setJMSSettings(js);
- adapter.setDestination(msgDestination);
-
- if (msgService.isStarted())
- msgDestination.start();
-
- return "Destination: " + id + " created for Service: " + serviceId;
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/validators/deserialization/ClassLoggingDeserializationValidator.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/validators/deserialization/ClassLoggingDeserializationValidator.java b/apps/team/WEB-INF/src/features/validators/deserialization/ClassLoggingDeserializationValidator.java
deleted file mode 100755
index 2dff3da..0000000
--- a/apps/team/WEB-INF/src/features/validators/deserialization/ClassLoggingDeserializationValidator.java
+++ /dev/null
@@ -1,127 +0,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.
- */
-package features.validators.deserialization;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import flex.messaging.config.ConfigMap;
-import flex.messaging.log.Log;
-import flex.messaging.validators.DeserializationValidator;
-
-/**
- * This is a sample deserialization validator. It does not perform any real assignment
- * and creation validations but instead, it keeps track of an internal set of class
- * types, and when the class type is first encountered, it logs out the type of the class.
- * One can use this validator to determine what class types are deserialized on the server.
- */
-public class ClassLoggingDeserializationValidator implements DeserializationValidator
-{
- //--------------------------------------------------------------------------
- //
- // Public Static Constants
- //
- //--------------------------------------------------------------------------
-
- public static String LOG_CATEGORY = "Endpoint.Deserialization.Creation";
-
- //--------------------------------------------------------------------------
- //
- // Variables
- //
- //--------------------------------------------------------------------------
-
- /**
- * Instance level lock for thread-safe state changes.
- */
- protected final Object lock = new Object();
-
- /**
- * Keeps track of encountered class names.
- */
- protected final Set<String> classNames = new HashSet<String>();
-
- //--------------------------------------------------------------------------
- //
- // Public Methods
- //
- //--------------------------------------------------------------------------
-
- /**
- * No assignment validation; simply returns true.
- *
- * @param instance The Array or List instance.
- * @param index The index at which the value is being assigned.
- * @param value The value that is assigned to the index.
- * @return True if the assignment is valid.
- */
- public boolean validateAssignment(Object instance, int index, Object value)
- {
- return true;
- }
-
- /**
- * No assignment validation; simply returns true.
- *
- * @param instance The instance with the property that is being assigned a new value.
- * @param propertyName The name of the property that is being assigned.
- * @param value The value that the property is being assigned to.
- * @return True.
- */
- public boolean validateAssignment(Object instance, String propertyName, Object value)
- {
- return true;
- }
-
- /**
- * No creation validation; simply returns true, but when a class is
- * encountered the first time an Info level log message is printed
- * to the Endpoint.Deserialization.Creation category listing the class name.
- * Registering this validator in a development or test environment allows
- * all required types used by the application to be captured in the server log,
- * and this information may be used to configure a <tt>ClassDeserializationValidator</tt>
- * in the production environment that disallows creation of all non-required types.
- *
- * @param c The class that is being created.
- * @return True.
- */
- public boolean validateCreation(Class<?> c)
- {
- String className = c == null? null : c.getName();
- if (className != null)
- {
- synchronized(lock)
- {
- if (!classNames.contains(className))
- {
- if (Log.isInfo())
- Log.getLogger(LOG_CATEGORY).info(className);
- classNames.add(className);
- }
- }
- }
- return true;
- }
-
- /* (non-Javadoc)
- * @see flex.messaging.FlexConfigurable#initialize(java.lang.String, flex.messaging.config.ConfigMap)
- */
- public void initialize(String id, ConfigMap configMap)
- {
- // No-op.
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/WEB-INF/src/features/validators/deserialization/TestDeserializationValidator.java
----------------------------------------------------------------------
diff --git a/apps/team/WEB-INF/src/features/validators/deserialization/TestDeserializationValidator.java b/apps/team/WEB-INF/src/features/validators/deserialization/TestDeserializationValidator.java
deleted file mode 100755
index 51c790e..0000000
--- a/apps/team/WEB-INF/src/features/validators/deserialization/TestDeserializationValidator.java
+++ /dev/null
@@ -1,58 +0,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.
- */
-package features.validators.deserialization;
-
-import flex.messaging.config.ConfigMap;
-import flex.messaging.validators.DeserializationValidator;
-
-public class TestDeserializationValidator implements DeserializationValidator
-{
- /**
- * Simply prints the assignment and always returns true.
- */
- public boolean validateAssignment(Object instance, int index, Object value)
- {
- System.out.println("validateAssign1: [" + (instance == null? "null" : instance.getClass().getName()) + "," + index + "," + value + "]");
- return true;
- }
-
- /**
- * Simply prints the assignment and always returns true.
- */
- public boolean validateAssignment(Object instance, String propertyName, Object value)
- {
- System.out.println("validateAssign2: [" + (instance == null? "null" : instance.getClass().getName()) + "," + propertyName + "," + value + "]");
- return true;
- }
-
- /**
- * Simply prints the creation and always returns true.
- */
- public boolean validateCreation(Class<?> c)
- {
- System.out.println("validateCreate: " + (c == null? "null" : c.getName()));
- return true;
- }
-
- /* (non-Javadoc)
- * @see flex.messaging.FlexConfigurable#initialize(java.lang.String, flex.messaging.config.ConfigMap)
- */
- public void initialize(String id, ConfigMap configMap)
- {
- // No-op.
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/build.xml
----------------------------------------------------------------------
diff --git a/apps/team/build.xml b/apps/team/build.xml
deleted file mode 100755
index f41ca33..0000000
--- a/apps/team/build.xml
+++ /dev/null
@@ -1,194 +0,0 @@
-<?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="team.war/build.xml" default="main" basedir="../..">
-
- <property file="${basedir}/build.properties" />
- <property name="team.war" value="${basedir}/apps/team" />
- <property name="dist.dir" value="${basedir}/dist" />
- <property name="src.dir" value="${team.war}/WEB-INF/src" />
- <property name="classes.dir" value="${team.war}/WEB-INF/classes" />
- <condition property="template.dir" value="client-side-detection-with-history">
- <equals arg1="${sdk.version}" arg2="3"/>
- </condition>
- <property name="template.dir" value=""/>
- <condition property="war.filename" value="team-sdk3.war">
- <equals arg1="${sdk.version}" arg2="3"/>
- </condition>
- <property name="war.filename" value="team.war"/>
-
- <path id="classpath">
- <fileset dir="${team.war}/WEB-INF/lib" includes="**/*.jar" />
- <fileset dir="${team.war}/WEB-INF/flex/jars" includes="**/*.jar"/>
- <pathelement location="${servlet.jar}" />
- <pathelement location="${jms.jar}"/>
- </path>
-
- <target name="main" depends="clean,compile" />
-
- <target name="prepare">
- <mkdir dir="${team.war}/WEB-INF/classes" />
- <mkdir dir="${team.war}/WEB-INF/lib" />
- <mkdir dir="${team.war}/WEB-INF/src" />
- </target>
-
- <target name="copy-resources">
- <fail unless="local.sdk.lib.dir" message="must specify local.sdk.lib.dir in server/build.properties"/>
- <fail unless="local.sdk.frameworks.dir" message="must specify local.sdk.frameworks.dir in build.properties"/>
-
- <!-- copy sdk version sepecific web.xml. this is required for webtier -->
- <copy todir="${team.war}/WEB-INF">
- <fileset dir="${qa.dir}/resources/webtier/flex_sdk_${sdk.version}/">
- <include name="web.xml"/>
- </fileset>
- </copy>
-
- <!-- copy sdk version specific flex-config.xml, air-config.xml and flex-webtier-config.xml -->
- <copy todir="${team.war}/WEB-INF/flex">
- <fileset dir="${qa.dir}/resources/webtier/flex_sdk_${sdk.version}" includes="flex-config.xml,air-config.xml,flex-webtier-config.xml"/>
- </copy>
-
- <!-- copy to the WEB-INF/flex directory -->
- <copy todir="${team.war}/WEB-INF/flex">
- <fileset dir="${local.sdk.frameworks.dir}">
- <include name="*-manifest.xml" />
- <include name="flash-unicode-table.xml"/>
- <include name="flex-sdk-description.xml" />
- <include name="*.ser"/>
- <include name="locale/**/*"/>
- <include name="themes/**/*"/>
- </fileset>
- </copy>
-
- <!-- copy swcs to the WEB-INF/flex/libs directory -->
- <copy todir="${team.war}/WEB-INF/flex/libs">
- <fileset dir="${local.sdk.frameworks.dir}/libs" includes="**/*.swc"/>
- </copy>
-
- <!-- copy to the lib directory -->
- <copy todir="${team.war}/WEB-INF/lib">
- <fileset dir="${basedir}/lib" includes="${webapp.ce.lib},${webtier.lib},${jgroups.jars}" />
- <fileset dir="${qa.dir}/lib" includes="${axis.jars},${qa-services.jars}"/>
- </copy>
-
- <!-- copy to the jars directory -->
- <copy todir="${team.war}/WEB-INF/flex/jars">
- <fileset dir="${basedir}/lib" includes="${webtier.jars}"/>
- </copy>
-
- <!-- copy to the classes directory -->
- <copy todir="${team.war}/WEB-INF/classes">
- <fileset dir="${team.war}/WEB-INF/src">
- <include name="**/*.xml,**/*.properties" />
- </fileset>
- <fileset dir="${basedir}/lib" includes="${webapp.classes}" />
- </copy>
-
- <!-- copy template file to the history directory -->
- <copy todir="${team.war}/history" flatten="true">
- <fileset dir="${basedir}/templates/${template.dir}" includes="**/*.js,**/*.css,**/historyFrame.html"/>
- </copy>
- </target>
-
- <target name="run-depend" if="src.depend">
- <echo message="Removing class files that changed and dependent class files." />
- <depend cache="${classes.dir}" srcdir="${src.dir}" destdir="${classes.dir}" />
- </target>
-
- <target name="compile" depends="prepare,run-depend,copy-resources" description="compile">
- <javac source="1.5" debug="${src.debug}" destdir="${classes.dir}" srcdir="${src.dir}" classpathref="classpath" />
- </target>
-
- <target name="package" description=" Creates distribution war file">
- <mkdir dir="${dist.dir}" />
- <war file="${dist.dir}/${war.filename}" webxml="${team.war}/WEB-INF/web.xml">
- <manifest>
- <attribute name="Sealed" value="${manifest.sealed}" />
- <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Team Application" />
- <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}" />
- <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}" />
- </manifest>
- <fileset dir="${team.war}">
- <exclude name="build.xml" />
- <exclude name="WEB-INF/src/**/*.java" />
- <exclude name="WEB-INF/jsp/**/*" />
- <exclude name="WEB-INF/sessions/**/*" />
- <!-- This is included in the war task already -->
- <exclude name="WEB-INF/web.xml" />
- </fileset>
- </war>
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true">
- <fileset dir="${team.war}/WEB-INF/lib" includes="${webapp.ce.lib},${webtier.lib},${jgroups.jars}" />
- <fileset dir="${team.war}/WEB-INF" includes="web.xml"/>
- <fileset dir="${team.war}/WEB-INF/flex">
- <include name="*-manifest.xml" />
- <include name="air-config.xml"/>
- <include name="flex-config.xml"/>
- <include name="flex-webtier-config.xml"/>
- <include name="flash-unicode-table.xml"/>
- <include name="flex-sdk-description.xml" />
- <include name="*.ser"/>
- <include name="locale/**/*"/>
- <include name="themes/**/*"/>
- </fileset>
- </delete>
- <delete quiet="true">
- <fileset dir="${team.war}/WEB-INF/flex/jars" includes="**/*"/>
- </delete>
- <delete quiet="true" includeEmptyDirs="true">
- <fileset dir="${team.war}/WEB-INF/flex/locale" includes="**/*"/>
- </delete>
- <delete quiet="true" includeEmptyDirs="true">
- <fileset dir="${team.war}/WEB-INF/flex/libs" includes="**/*"/>
- </delete>
- <delete quiet="true" includeEmptyDirs="true">
- <fileset dir="${team.war}/WEB-INF/flex" includes="*.ser,cache.dep,*-manifest.xml"/>
- </delete>
- <delete quiet="true">
- <fileset dir="${classes.dir}" includes="**/*.class" />
- </delete>
- <delete quiet="true" file="${dist.dir}/${war.filename}" />
- <delete quiet="true" includeEmptyDirs="true">
- <fileset dir="${team.war}/history" includes="**/*"/>
- </delete>
- <delete quiet="true" dir="${team.war}/history" />
- <delete quiet="true" dir="${team.war}/WEB-INF/lib" />
- <delete quiet="true" dir="${team.war}/WEB-INF/classes" />
- <delete quiet="true" dir="${team.war}/WEB-INF/flex/jars" />
- <delete quiet="true" dir="${team.war}/WEB-INF/flex/libs" />
- <delete quiet="true" dir="${team.war}/WEB-INF/flex/locale" />
- <delete quiet="true" dir="${team.war}/WEB-INF/flex/themes" />
- </target>
-
- <target name="generated-clean">
- <delete includeEmptyDirs="true" quiet="true">
- <fileset dir="${team.war}" includes="**/generated/*" />
- </delete>
- <delete includeEmptyDirs="true" quiet="true">
- <fileset dir="${team.war}" includes="**/generated" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/README.txt
----------------------------------------------------------------------
diff --git a/apps/team/features/README.txt b/apps/team/features/README.txt
deleted file mode 100755
index d5160ac..0000000
--- a/apps/team/features/README.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-This part of the team application is intended for "Hello World" type of applications
-that showcase different features in the most basic way possible.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/ajax/README.txt
----------------------------------------------------------------------
diff --git a/apps/team/features/ajax/README.txt b/apps/team/features/ajax/README.txt
deleted file mode 100755
index 3d903db..0000000
--- a/apps/team/features/ajax/README.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-Place for sample AJAX apps that use FDMS-Bridge. Before running the apps, make sure you run "ant main" in /resources/fds-ajax-bridge to compile FDMS-bridge and get the latest js and swf files in here.
-
-Double-check that the channels specified in TextMessage.html and TextMessage.mxml exist. The destination should exist as well.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/ajax/messaging/TextMessage.html
----------------------------------------------------------------------
diff --git a/apps/team/features/ajax/messaging/TextMessage.html b/apps/team/features/ajax/messaging/TextMessage.html
deleted file mode 100755
index ef529d3..0000000
--- a/apps/team/features/ajax/messaging/TextMessage.html
+++ /dev/null
@@ -1,88 +0,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.
--->
-<html>
-<head>
-<title>Email Flex Bridge Example</title>
-<style>
-body { margin: 0px;
- overflow:hidden }
-
-textarea {
- font-size: 1em;
-}
-</style>
- <script type="text/javascript" src="../includes/js/FABridge.js"></script>
- <script type="text/javascript" src="../includes/js/FDMSLib.js"></script>
-</head>
-<body scroll='no' style="font-size:.9em;">
-<script language="javascript">
- var p;
- var c;
-
- function fdmsLibraryReady()
- {
- // todo: when is this supposed to be called?
- // are types available?
- alert("Library Ready");
-
- var cs = new ChannelSet();
- cs.addChannel(new AMFChannel("my-amf-poll", "http://localhost:8400/team/messagebroker/myamfpoll"));
- //cs.addChannel(new AMFChannel("my-polling-amf", "http://localhost:8100/dev/messagebroker/amfpolling"));
- //cs.addChannel(new AMFChannel("my-polling-amf", "/dev/messagebroker/amfpolling"));
-
- p = new Producer();
- p.setDestination("messaging_AMF_Poll");
- p.setChannelSet(cs);
-
- c = new Consumer();
- c.setDestination("messaging_AMF_Poll");
- c.addEventListener("message", messageHandler);
- c.setChannelSet(cs);
- c.subscribe();
- }
-
- function sendChat()
- {
- alert("Sending message...");
-
- var m = new AsyncMessage();
- var body = "Hello!";
- m.setBody(body);
- p.send(m);
- }
-
- function messageHandler(event)
- {
- alert("messageHandler:" + (typeof(event.getMessage().getBody())) + "," + event.getMessage().getBody());
- }
-
-</script>
-
-<script>
- FDMSLibrary.load("../includes/swf/FDMSBridge.swf", fdmsLibraryReady);
-</script>
-
- <div style="width:1024px">
- <div style="margin-bottom: 20px;float:left;padding: 20px;">
- <!-- <button onClick="fesLib_send();return false;">execute</button> -->
- <button onClick="sendChat();return false;">execute</button>
-</div>
-</div>
-</body>
-
-
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/ajax/messaging/TextMessage.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/ajax/messaging/TextMessage.mxml b/apps/team/features/ajax/messaging/TextMessage.mxml
deleted file mode 100755
index 1e52de9..0000000
--- a/apps/team/features/ajax/messaging/TextMessage.mxml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="initApp()">
-
- <mx:Panel id="mainPanel" title="TextMessage" height="100%" width="100%"
- paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10">
- <mx:Button label="Execute" click="sendChat()"/>
- <mx:Button label="Clear" click='output.text = ""'/>
- <mx:TextArea id="output" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Script>
- <![CDATA[
-
- import mx.messaging.ChannelSet;
- import mx.messaging.Consumer;
- import mx.messaging.Producer;
- import mx.messaging.channels.AMFChannel;
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
-
- public var producer:Producer;
- public var consumer:Consumer;
-
- private function initApp():void
- {
- /*
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- */
-
- var cs:ChannelSet = new ChannelSet();
- cs.addChannel(new AMFChannel("my-amf-poll", "http://localhost:8400/team/messagebroker/myamfpoll"));
-
- producer = new Producer();
- // producer.destination = "MyTransientTopic";
- producer.destination = "messaging_AMF_Poll";
- producer.channelSet = cs;
-
- consumer = new Consumer();
- consumer.destination = "messaging_AMF_Poll";
- consumer.channelSet = cs;
- consumer.addEventListener(MessageFaultEvent.FAULT, messageFaultHandler);
- consumer.addEventListener(MessageEvent.MESSAGE, messageHandler);
- consumer.subscribe();
- }
-
- public function sendChat():void
- {
- if (!consumer.subscribed)
- {
- output.text += "***Consumer resubscribed \n";
- consumer.subscribe();
- }
- var m:AsyncMessage = new AsyncMessage();
- var mbody:String = "Hello!";
- m.body = mbody;
- producer.send(m);
- }
-
- private function messageHandler(event : MessageEvent) : void
- {
- output.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function messageFaultHandler(event : Object) : void
- {
- output.text += "Consumer received fault: " + event.faultString + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/cluster/messaging_AMF_Poll_Cluster.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/cluster/messaging_AMF_Poll_Cluster.mxml b/apps/team/features/messaging/cluster/messaging_AMF_Poll_Cluster.mxml
deleted file mode 100755
index 4f60505..0000000
--- a/apps/team/features/messaging/cluster/messaging_AMF_Poll_Cluster.mxml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- Before running this test, make sure messaging_AMF_Poll_Cluster is
- uncommented from messaging-config.xml.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Poll_Cluster"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Poll_Cluster"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/cluster/messaging_HTTP_Poll_Cluster.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/cluster/messaging_HTTP_Poll_Cluster.mxml b/apps/team/features/messaging/cluster/messaging_HTTP_Poll_Cluster.mxml
deleted file mode 100755
index d157261..0000000
--- a/apps/team/features/messaging/cluster/messaging_HTTP_Poll_Cluster.mxml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- Before running this test, make sure messaging_HTTP_Poll_Cluster is
- uncommented from messaging-config.xml.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP_Poll_Cluster"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP_Poll_Cluster"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
[41/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/src/Contact.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/src/Contact.as b/apps/samples-spring/WEB-INF/flex-src/insync03/src/Contact.as
deleted file mode 100755
index 003b0e0..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/src/Contact.as
+++ /dev/null
@@ -1,35 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- [Bindable]
- [RemoteClass(alias="org.springframework.flex.samples.contact.Contact")]
- public class Contact
- {
- public var id:int;
- public var firstName:String;
- public var lastName:String;
- public var email:String;
- public var phone:String;
- public var address:String;
- public var city:String;
- public var state:String;
- public var zip:String;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/src/ContactForm.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/src/ContactForm.mxml b/apps/samples-spring/WEB-INF/flex-src/insync03/src/ContactForm.mxml
deleted file mode 100755
index 1f015d1..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/src/ContactForm.mxml
+++ /dev/null
@@ -1,112 +0,0 @@
-<?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:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%">
-
- <fx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
- import mx.controls.Alert;
-
- [Bindable] public var contact:Contact;
-
- private function save():void
- {
- contact.firstName = firstName.text;
- contact.lastName = lastName.text;
- contact.email = email.text;
- contact.phone = phone.text;
- contact.address = address.text;
- contact.city = city.text;
- contact.state = state.text;
- contact.zip = zip.text;
- ro.update(contact);
- }
-
- private function update_resultHandler(event:ResultEvent):void
- {
- Alert.show("Contact " + contact.id + " updated successfully");
- }
-
- private function deleteItem():void
- {
- ro.remove(contact);
- }
-
- private function remove_resultHandler(event:ResultEvent):void
- {
- contact = null;
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <mx:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <mx:method name="update" result="update_resultHandler(event)"/>
- <mx:method name="remove" result="remove_resultHandler(event)"/>
- </mx:RemoteObject>
- </fx:Declarations>
-
- <mx:Form>
- <mx:FormItem label="Id">
- <mx:TextInput text="{contact.id}" enabled="false"/>
- </mx:FormItem>
- <mx:FormItem label="First Name">
- <mx:TextInput id="firstName" text="{contact.firstName}"/>
- </mx:FormItem>
- <mx:FormItem label="Last Name">
- <mx:TextInput id="lastName" text="{contact.lastName}"/>
- </mx:FormItem>
- <mx:FormItem label="Email">
- <mx:TextInput id="email" text="{contact.email}"/>
- </mx:FormItem>
- <mx:FormItem label="Phone">
- <mx:TextInput id="phone" text="{contact.phone}"/>
- </mx:FormItem>
- <mx:FormItem label="Address">
- <mx:TextInput id="address" text="{contact.address}"/>
- </mx:FormItem>
- <mx:FormItem label="City">
- <mx:TextInput id="city" text="{contact.city}"/>
- </mx:FormItem>
- <mx:FormItem label="State">
- <mx:TextInput id="state" text="{contact.state}"/>
- </mx:FormItem>
- <mx:FormItem label="Zip">
- <mx:TextInput id="zip" text="{contact.zip}"/>
- </mx:FormItem>
- </mx:Form>
-
- <s:HGroup left="8" bottom="8">
- <s:Button label="Save" click="save()" enabled="{contact != null}"/>
- <s:Button label="Delete" click="deleteItem()" enabled="{contact != null}"/>
- </s:HGroup>
-
-</mx:Canvas>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/src/insync03.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/src/insync03.mxml b/apps/samples-spring/WEB-INF/flex-src/insync03/src/insync03.mxml
deleted file mode 100755
index 199b28a..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/src/insync03.mxml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*">
-
- <fx:Script>
- <![CDATA[
-
- import mx.collections.ArrayCollection;
- import mx.controls.Alert;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- [Bindable] private var contacts:ArrayCollection;
-
- private function resultHandler(event:ResultEvent):void
- {
- contacts = event.result as ArrayCollection
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <s:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <s:method name="findByName" result="resultHandler(event)"/>
- </s:RemoteObject>
- </fx:Declarations>
-
- <s:controlBarContent>
- <s:TextInput id="searchStr"/>
- <s:Button label="Search" click="ro.findByName(searchStr.text)"/>
- </s:controlBarContent>
-
- <mx:HDividedBox top="8" left="8" right="8" bottom="8">
-
- <mx:DataGrid id="dg" dataProvider="{contacts}" width="30%" height="100%">
- <mx:columns>
- <mx:DataGridColumn dataField="firstName" headerText="First Name"/>
- <mx:DataGridColumn dataField="lastName" headerText="Last Name"/>
- </mx:columns>
- </mx:DataGrid>
-
- <local:ContactForm contact="{dg.selectedItem as Contact}" width="70%" height="100%"/>
-
- </mx:HDividedBox>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/insync04/.actionScriptProperties
deleted file mode 100755
index 9b5ef0c..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="insync04.mxml" projectUUID="c091ffc5-d356-4296-9974-5dcd4d2c8d67" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="insync04.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/insync04/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/.project b/apps/samples-spring/WEB-INF/flex-src/insync04/.project
deleted file mode 100755
index 74b028b..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>insync04</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/build.xml b/apps/samples-spring/WEB-INF/flex-src/insync04/build.xml
deleted file mode 100755
index 8de353a..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="insync04" />
- <property name="application.file" value="insync04" />
- <property name="application.bin.dir" value="${samples-spring.war}/insync04" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync04/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
[22/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/WEB-INF/web.xml b/attic/apps/blazeds-spring/WEB-INF/web.xml
new file mode 100755
index 0000000..e24cde9
--- /dev/null
+++ b/attic/apps/blazeds-spring/WEB-INF/web.xml
@@ -0,0 +1,102 @@
+<?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.
+
+-->
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+
+ <display-name>BlazeDS Spring Integration Application</display-name>
+ <description>BlazeDS Spring Integration Application</description>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>
+ /WEB-INF/spring/*-config.xml
+ </param-value>
+ </context-param>
+
+ <filter>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <!-- Http Flex Session attribute and binding listener support -->
+ <listener>
+ <listener-class>flex.messaging.HttpFlexSession</listener-class>
+ </listener>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <!-- Spring Dispatcher Servlet -->
+ <servlet>
+ <servlet-name>flex</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+<!-- begin rds
+ <servlet>
+ <servlet-name>RDSDispatchServlet</servlet-name>
+ <display-name>RDSDispatchServlet</display-name>
+ <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
+ <init-param>
+ <param-name>useAppserverSecurity</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>messageBrokerId</param-name>
+ <param-value>_messageBroker</param-value>
+ </init-param>
+ <load-on-startup>10</load-on-startup>
+ </servlet>
+
+ <servlet-mapping id="RDS_DISPATCH_MAPPING">
+ <servlet-name>RDSDispatchServlet</servlet-name>
+ <url-pattern>/CFIDE/main/ide.cfm</url-pattern>
+ </servlet-mapping>
+end rds -->
+
+ <servlet-mapping>
+ <servlet-name>flex</servlet-name>
+ <url-pattern>/messagebroker/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ </welcome-file-list>
+
+ <!-- for WebSphere deployment, please uncomment -->
+ <!--
+ <resource-ref>
+ <description>Flex Messaging WorkManager</description>
+ <res-ref-name>wm/MessagingWorkManager</res-ref-name>
+ <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ -->
+
+</web-app>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/build.xml b/attic/apps/blazeds-spring/build.xml
new file mode 100755
index 0000000..f89d78f
--- /dev/null
+++ b/attic/apps/blazeds-spring/build.xml
@@ -0,0 +1,97 @@
+<?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="blazeds-spring.war/build.xml" default="main" basedir="../..">
+
+ <property file="${basedir}/build.properties" />
+ <property name="blazeds-spring.war" value="${basedir}/apps/blazeds-spring" />
+ <property name="dist.dir" value="${basedir}/dist" />
+ <property name="src.dir" value="${blazeds-spring.war}/WEB-INF/src"/>
+ <property name="classes.dir" value="${blazeds-spring.war}/WEB-INF/classes"/>
+
+ <path id="classpath">
+ <fileset dir="${blazeds-spring.war}/WEB-INF/lib" includes="**/*.jar" />
+ </path>
+
+ <target name="main" depends="clean,compile" />
+
+ <target name="prepare">
+ <mkdir dir="${blazeds-spring.war}/WEB-INF/src" />
+ <mkdir dir="${blazeds-spring.war}/WEB-INF/lib" />
+ <mkdir dir="${blazeds-spring.war}/WEB-INF/classes" />
+ </target>
+
+ <target name="run-depend" if="src.depend">
+ <echo message="Removing class files that changed and dependent class files." />
+ <depend cache="${classes.dir}" srcdir="${src.dir}" destdir="${classes.dir}" />
+ </target>
+
+ <target name="copy-resources">
+ <copy todir="${blazeds-spring.war}/WEB-INF/lib">
+ <fileset dir="${basedir}/lib" includes="${webapp.ce.lib}" />
+ <fileset dir="${basedir}/lib/spring" includes="**/*" />
+ <fileset dir="${basedir}/lib/aspectj" includes="**/*" />
+ </copy>
+ <copy todir="${classes.dir}">
+ <fileset dir="${basedir}/lib" includes="${webapp.classes}" />
+ </copy>
+
+ <propertyfile file="${blazeds-spring.war}/WEB-INF/flex/version.properties">
+ <entry key="build" value="${manifest.Implementation-Version}.${build.number}"/>
+ <entry key="minimumSDKVersion" value="${min.sdk.version}"/>
+ </propertyfile>
+
+ </target>
+
+ <target name="compile" depends="prepare,run-depend,copy-resources" description="compile">
+ <javac source="1.4" debug="${src.debug}" destdir="${classes.dir}" srcdir="${src.dir}" classpathref="classpath" />
+ </target>
+
+ <target name="package" description=" Creates distribution war file">
+ <mkdir dir="${dist.dir}" />
+ <war file="${dist.dir}/blazeds-spring.war" webxml="${blazeds-spring.war}/WEB-INF/web.xml">
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}" />
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - BlazeDS Spring Integration Application" />
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}" />
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}" />
+ </manifest>
+ <fileset dir="${blazeds-spring.war}">
+ <exclude name="build.xml" />
+ <exclude name="WEB-INF/src/**/*.java" />
+ <exclude name="WEB-INF/jsp/**/*" />
+ <exclude name="WEB-INF/sessions/**/*" />
+ <!-- This is included in the war task already -->
+ <exclude name="WEB-INF/web.xml" />
+ </fileset>
+ </war>
+ </target>
+
+ <target name="clean" description="--> Removes jars and classes">
+ <delete quiet="true">
+ <fileset dir="${blazeds-spring.war}/WEB-INF/lib" includes="**/*" />
+ </delete>
+ <delete quiet="true">
+ <fileset dir="${classes.dir}" includes="**/*.class"/>
+ </delete>
+ <delete quiet="true" file="${dist.dir}/blazeds-spring.war" />
+ </target>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/index.htm
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/index.htm b/attic/apps/blazeds-spring/index.htm
new file mode 100755
index 0000000..6bd1e96
--- /dev/null
+++ b/attic/apps/blazeds-spring/index.htm
@@ -0,0 +1,50 @@
+<!--
+ 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 HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Welcome to BlazeDS</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style>
+body, pre { font-family:Tahoma,Helvetica,sans-serif; font-size:10pt; }
+div.indent { margin-left: 20;}
+span.reference { font-weight: bold }
+span.header {white-space:nowrap }
+span.title {font-size:12pt; color:blue}
+span.highlight { background-color: #FFFFB7 }
+table.code { font-family: courier; font-size: 9pt;}
+span.fade { color:#666666; font-size:11px }
+</style>
+</head>
+<body>
+<span class="title">Welcome to BlazeDS</span>
+<br>
+ <br>
+This is an empty BlazeDS application that serves as a template for creating your custom BlazeDS Spring application.
+<!--
+<br> <br>
+If you're looking for sample Flex applications, check with the system administrator for the URL where the samples are deployed.
+-->
+<br>
+ <br>
+Visit the <a href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS">product page</a> for documentation and further information.
+</body>
+</html>
+
+
+
+
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds/WEB-INF/classes/commons-logging.properties
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds/WEB-INF/classes/commons-logging.properties b/attic/apps/blazeds/WEB-INF/classes/commons-logging.properties
new file mode 100755
index 0000000..b8a3e1f
--- /dev/null
+++ b/attic/apps/blazeds/WEB-INF/classes/commons-logging.properties
@@ -0,0 +1,19 @@
+# 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.
+
+# suppress logging for 3rd-party libraries using commons-logging
+# Flex logging is not configured here. It is configured through in the logging section of flex-config.xml
+org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds/WEB-INF/flex/messaging-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds/WEB-INF/flex/messaging-config.xml b/attic/apps/blazeds/WEB-INF/flex/messaging-config.xml
new file mode 100755
index 0000000..3357c06
--- /dev/null
+++ b/attic/apps/blazeds/WEB-INF/flex/messaging-config.xml
@@ -0,0 +1,32 @@
+<?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.
+
+-->
+<service id="message-service"
+ class="flex.messaging.services.MessageService">
+
+ <adapters>
+ <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
+ <!-- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/> -->
+ </adapters>
+
+ <default-channels>
+ <channel ref="my-polling-amf"/>
+ </default-channels>
+
+</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds/WEB-INF/flex/proxy-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds/WEB-INF/flex/proxy-config.xml b/attic/apps/blazeds/WEB-INF/flex/proxy-config.xml
new file mode 100755
index 0000000..fc14786
--- /dev/null
+++ b/attic/apps/blazeds/WEB-INF/flex/proxy-config.xml
@@ -0,0 +1,43 @@
+<?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.
+
+-->
+<service id="proxy-service"
+ class="flex.messaging.services.HTTPProxyService">
+
+ <properties>
+ <connection-manager>
+ <max-total-connections>100</max-total-connections>
+ <default-max-connections-per-host>2</default-max-connections-per-host>
+ </connection-manager>
+ <allow-lax-ssl>true</allow-lax-ssl>
+ </properties>
+
+ <adapters>
+ <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
+ <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
+ </adapters>
+
+ <default-channels>
+ <channel ref="my-amf"/>
+ </default-channels>
+
+ <destination id="DefaultHTTP">
+ </destination>
+
+</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds/WEB-INF/flex/remoting-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds/WEB-INF/flex/remoting-config.xml b/attic/apps/blazeds/WEB-INF/flex/remoting-config.xml
new file mode 100755
index 0000000..ae2de71
--- /dev/null
+++ b/attic/apps/blazeds/WEB-INF/flex/remoting-config.xml
@@ -0,0 +1,31 @@
+<?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.
+
+-->
+<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>
+
+</service>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds/WEB-INF/flex/services-config.xml b/attic/apps/blazeds/WEB-INF/flex/services-config.xml
new file mode 100755
index 0000000..6fe3e6f
--- /dev/null
+++ b/attic/apps/blazeds/WEB-INF/flex/services-config.xml
@@ -0,0 +1,117 @@
+<?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.
+
+-->
+<services-config>
+
+ <services>
+ <service-include file-path="remoting-config.xml" />
+ <service-include file-path="proxy-config.xml" />
+ <service-include file-path="messaging-config.xml" />
+ </services>
+
+ <security>
+ <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
+ <!-- Uncomment the correct app server
+ <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
+ <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
+ <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
+ <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
+ -->
+
+ <!--
+ <security-constraint id="basic-read-access">
+ <auth-method>Basic</auth-method>
+ <roles>
+ <role>guests</role>
+ <role>accountants</role>
+ <role>employees</role>
+ <role>managers</role>
+ </roles>
+ </security-constraint>
+ -->
+ </security>
+
+ <channels>
+
+ <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
+ </channel-definition>
+
+ <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
+ <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
+ <properties>
+ <add-no-cache-headers>false</add-no-cache-headers>
+ </properties>
+ </channel-definition>
+
+ <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
+ <properties>
+ <polling-enabled>true</polling-enabled>
+ <polling-interval-seconds>4</polling-interval-seconds>
+ </properties>
+ </channel-definition>
+
+ <!--
+ <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
+ </channel-definition>
+
+ <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
+ <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
+ <properties>
+ <add-no-cache-headers>false</add-no-cache-headers>
+ </properties>
+ </channel-definition>
+ -->
+ </channels>
+
+ <logging>
+ <target class="flex.messaging.log.ConsoleTarget" level="Error">
+ <properties>
+ <prefix>[BlazeDS] </prefix>
+ <includeDate>false</includeDate>
+ <includeTime>false</includeTime>
+ <includeLevel>false</includeLevel>
+ <includeCategory>false</includeCategory>
+ </properties>
+ <filters>
+ <pattern>Endpoint.*</pattern>
+ <pattern>Service.*</pattern>
+ <pattern>Configuration</pattern>
+ </filters>
+ </target>
+ </logging>
+
+ <system>
+ <redeploy>
+ <enabled>false</enabled>
+ <!--
+ <watch-interval>20</watch-interval>
+ <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
+ <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
+ -->
+ </redeploy>
+ </system>
+
+</services-config>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds/WEB-INF/web.xml b/attic/apps/blazeds/WEB-INF/web.xml
new file mode 100755
index 0000000..7919919
--- /dev/null
+++ b/attic/apps/blazeds/WEB-INF/web.xml
@@ -0,0 +1,82 @@
+<?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.
+
+-->
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+
+ <display-name>BlazeDS</display-name>
+ <description>BlazeDS Application</description>
+
+ <!-- Http Flex Session attribute and binding listener support -->
+ <listener>
+ <listener-class>flex.messaging.HttpFlexSession</listener-class>
+ </listener>
+
+ <!-- MessageBroker Servlet -->
+ <servlet>
+ <servlet-name>MessageBrokerServlet</servlet-name>
+ <display-name>MessageBrokerServlet</display-name>
+ <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
+ <init-param>
+ <param-name>services.configuration.file</param-name>
+ <param-value>/WEB-INF/flex/services-config.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+<!-- begin rds
+ <servlet>
+ <servlet-name>RDSDispatchServlet</servlet-name>
+ <display-name>RDSDispatchServlet</display-name>
+ <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
+ <init-param>
+ <param-name>useAppserverSecurity</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <load-on-startup>10</load-on-startup>
+ </servlet>
+
+ <servlet-mapping id="RDS_DISPATCH_MAPPING">
+ <servlet-name>RDSDispatchServlet</servlet-name>
+ <url-pattern>/CFIDE/main/ide.cfm</url-pattern>
+ </servlet-mapping>
+end rds -->
+
+ <servlet-mapping>
+ <servlet-name>MessageBrokerServlet</servlet-name>
+ <url-pattern>/messagebroker/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ </welcome-file-list>
+
+ <!-- for WebSphere deployment, please uncomment -->
+ <!--
+ <resource-ref>
+ <description>Flex Messaging WorkManager</description>
+ <res-ref-name>wm/MessagingWorkManager</res-ref-name>
+ <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>
+ <res-auth>Container</res-auth>
+ <res-sharing-scope>Shareable</res-sharing-scope>
+ </resource-ref>
+ -->
+
+</web-app>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds/build.xml b/attic/apps/blazeds/build.xml
new file mode 100755
index 0000000..babd1fa
--- /dev/null
+++ b/attic/apps/blazeds/build.xml
@@ -0,0 +1,99 @@
+<?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="blazeds.war/build.xml" default="main" basedir="../..">
+
+ <property file="${basedir}/build.properties" />
+ <property name="blazeds.war" value="${basedir}/apps/blazeds" />
+ <property name="dist.dir" value="${basedir}/dist" />
+ <property name="src.dir" value="${blazeds.war}/WEB-INF/src"/>
+ <property name="classes.dir" value="${blazeds.war}/WEB-INF/classes"/>
+
+ <path id="classpath">
+ <fileset dir="${blazeds.war}/WEB-INF/lib" includes="**/*.jar" />
+ </path>
+
+ <target name="main" depends="clean,compile" />
+
+ <target name="prepare">
+ <mkdir dir="${blazeds.war}/WEB-INF/src" />
+ <mkdir dir="${blazeds.war}/WEB-INF/lib" />
+ <mkdir dir="${blazeds.war}/WEB-INF/classes" />
+ </target>
+
+ <target name="run-depend" if="src.depend">
+ <echo message="Removing class files that changed and dependent class files." />
+ <depend cache="${classes.dir}" srcdir="${src.dir}" destdir="${classes.dir}" />
+ </target>
+
+ <target name="copy-resources">
+ <copy todir="${blazeds.war}/WEB-INF/lib">
+ <fileset dir="${basedir}/lib" includes="${webapp.ce.lib}" />
+ </copy>
+ <copy todir="${classes.dir}">
+ <fileset dir="${basedir}/lib" includes="${webapp.classes}" />
+ </copy>
+
+ <propertyfile file="${blazeds.war}/WEB-INF/flex/version.properties">
+ <entry key="build" value="${manifest.Implementation-Version}.${build.number}"/>
+ <entry key="minimumSDKVersion" value="${min.sdk.version}"/>
+ </propertyfile>
+
+ </target>
+
+ <target name="compile" depends="prepare,run-depend,copy-resources" description="compile">
+ <javac source="1.4" debug="${src.debug}" destdir="${classes.dir}" srcdir="${src.dir}" classpathref="classpath" />
+ </target>
+
+ <target name="package" description=" Creates distribution war file">
+ <mkdir dir="${dist.dir}" />
+ <war file="${dist.dir}/blazeds.war" webxml="${blazeds.war}/WEB-INF/web.xml">
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}" />
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - BlazeDS Application" />
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}" />
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}" />
+ </manifest>
+ <fileset dir="${blazeds.war}">
+ <exclude name="build.xml" />
+ <exclude name="WEB-INF/src/**/*.java" />
+ <exclude name="WEB-INF/jsp/**/*" />
+ <exclude name="WEB-INF/sessions/**/*" />
+ <!-- This is included in the war task already -->
+ <exclude name="WEB-INF/web.xml" />
+ </fileset>
+ </war>
+ </target>
+
+ <target name="clean" description="--> Removes jars and classes">
+ <delete quiet="true">
+ <fileset dir="${blazeds.war}/WEB-INF/lib" includes="${webapp.ce.lib},${old.jars.to.clean}" />
+ </delete>
+ <delete quiet="true">
+ <fileset dir="${classes.dir}" includes="**/*.class"/>
+ </delete>
+ <delete quiet="true" file="${dist.dir}/blazeds.war" />
+ <delete quiet="true" dir="${blazeds.war}/WEB-INF/lib" />
+ <delete quiet="true" dir="${blazeds.war}/WEB-INF/src" />
+ <delete quiet="true" file="${blazeds.war}/WEB-INF/flex/version.properties" />
+ <echo>apps/blazeds clean</echo>
+ </target>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds/index.htm
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds/index.htm b/attic/apps/blazeds/index.htm
new file mode 100755
index 0000000..6e0bdf7
--- /dev/null
+++ b/attic/apps/blazeds/index.htm
@@ -0,0 +1,50 @@
+<!--
+ 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 HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Welcome to BlazeDS</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<style>
+body, pre { font-family:Tahoma,Helvetica,sans-serif; font-size:10pt; }
+div.indent { margin-left: 20;}
+span.reference { font-weight: bold }
+span.header {white-space:nowrap }
+span.title {font-size:12pt; color:blue}
+span.highlight { background-color: #FFFFB7 }
+table.code { font-family: courier; font-size: 9pt;}
+span.fade { color:#666666; font-size:11px }
+</style>
+</head>
+<body>
+<span class="title">Welcome to BlazeDS</span>
+<br>
+ <br>
+This is an empty BlazeDS application that serves as a template for creating your custom application.
+<!--
+<br> <br>
+If you're looking for sample Flex applications, check with the system administrator for the URL where the samples are deployed.
+-->
+<br>
+ <br>
+Visit the <a href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS">product page</a> for documentation and further information.
+</body>
+</html>
+
+
+
+
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/ConsoleResultWindow.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/ConsoleResultWindow.mxml b/attic/apps/ds-console/ConsoleResultWindow.mxml
new file mode 100755
index 0000000..4d5fd1d
--- /dev/null
+++ b/attic/apps/ds-console/ConsoleResultWindow.mxml
@@ -0,0 +1,48 @@
+<?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:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" title="Results" width="200" height="200" showCloseButton="true" close="close()" borderStyle="solid">
+ <mx:Script>
+ <![CDATA[
+
+ import mx.managers.*;
+
+ public function showResult(result:Object):void
+ {
+ resultMessage.text = result.toString();
+ }
+
+ public function showSuccess():void
+ {
+ resultMessage.text = "Operation executed";
+ }
+
+ private function close():void
+ {
+ PopUpManager.removePopUp(this);
+ }
+
+ ]]>
+ </mx:Script>
+ <mx:Spacer height="20%"/>
+ <mx:VBox height="80%">
+ <mx:Label id="resultMessage" />
+ </mx:VBox>
+
+</mx:TitleWindow>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/WEB-INF/flex/services-config.xml b/attic/apps/ds-console/WEB-INF/flex/services-config.xml
new file mode 100755
index 0000000..371adc2
--- /dev/null
+++ b/attic/apps/ds-console/WEB-INF/flex/services-config.xml
@@ -0,0 +1,116 @@
+<?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.
+
+-->
+<services-config>
+
+ <services>
+ <!--
+ REMOTING SERVICE
+ -->
+ <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>
+
+ <!-- Runtime management console destination -->
+ <destination id="RuntimeManagement" channels="amf">
+ <properties>
+ <source>flex.management.jmx.MBeanServerGateway</source>
+ </properties>
+
+ <!--
+ If running the console on WebSphere with administrative security enabled uncomment this section. Also,
+ create a User Group called "console_administrator" and add any users that are allowed to use the console to this group.
+ These users must also have at least one role that allows them to access MBeans under WebSphere security. Finally,
+ be sure to use the WebSphere login-command below.
+ <security>
+ <security-constraint ref="console"/>
+ </security>
+ -->
+ </destination>
+
+ </service>
+
+ </services>
+
+
+ <security>
+ <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
+ <!-- Uncomment the correct app server
+ <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
+ <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
+ <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
+ <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
+ -->
+
+ <!--
+ If running the console on WebSphere with administrative security enabled uncomment this section. Also,
+ create a User Group called "console_administrator" and add any users that are allowed to use the console to this group.
+ These users must also have at least one role that allows them to access MBeans under WebSphere security. Finally,
+ be sure to use the WebSphere login-command above.
+ <security-constraint id="console">
+ <auth-method>Basic</auth-method>
+ <roles>
+ <role>console_administrator</role>
+ </roles>
+ </security-constraint>
+ -->
+ </security>
+
+
+ <channels>
+
+ <channel-definition id="amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
+ <properties>
+ <polling-enabled>false</polling-enabled>
+ </properties>
+ </channel-definition>
+
+ </channels>
+
+ <logging>
+
+ <!-- You may also use flex.messaging.log.ServletLogTarget -->
+ <target class="flex.messaging.log.ConsoleTarget" level="Error">
+ <properties>
+ <prefix>[BlazeDS] </prefix>
+ <includeDate>false</includeDate>
+ <includeTime>false</includeTime>
+ <includeLevel>true</includeLevel>
+ <includeCategory>true</includeCategory>
+ </properties>
+ <filters>
+ <pattern>Endpoint.*</pattern>
+ </filters>
+ </target>
+
+ </logging>
+
+ <system>
+ <redeploy>
+ <enabled>true</enabled>
+ <watch-interval>20</watch-interval>
+ <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
+ <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
+ </redeploy>
+ </system>
+
+</services-config>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/WEB-INF/install-web.xml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/WEB-INF/install-web.xml b/attic/apps/ds-console/WEB-INF/install-web.xml
new file mode 100755
index 0000000..83f4498
--- /dev/null
+++ b/attic/apps/ds-console/WEB-INF/install-web.xml
@@ -0,0 +1,48 @@
+<?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.
+
+-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>Console</display-name>
+ <description>Administration tools for monitoring and management</description>
+
+ <!-- MessageBroker Servlet -->
+ <servlet>
+ <servlet-name>MessageBrokerServlet</servlet-name>
+ <display-name>MessageBrokerServlet</display-name>
+ <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
+ <init-param>
+ <param-name>services.configuration.file</param-name>
+ <param-value>/WEB-INF/flex/services-config.xml</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>MessageBrokerServlet</servlet-name>
+ <url-pattern>/messagebroker/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+
+</web-app>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/WEB-INF/web.xml b/attic/apps/ds-console/WEB-INF/web.xml
new file mode 100755
index 0000000..ad958d4
--- /dev/null
+++ b/attic/apps/ds-console/WEB-INF/web.xml
@@ -0,0 +1,57 @@
+<?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.
+
+-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>Console</display-name>
+ <description>Administration tools for monitoring and management</description>
+
+ <context-param>
+ <param-name>flex.class.path</param-name>
+ <param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</param-value>
+ </context-param>
+
+ <!-- MessageBroker Servlet -->
+ <servlet>
+ <servlet-name>MessageBrokerServlet</servlet-name>
+ <display-name>MessageBrokerServlet</display-name>
+ <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
+ <init-param>
+ <param-name>services.configuration.file</param-name>
+ <param-value>/WEB-INF/flex/services-config.xml</param-value>
+ </init-param>
+ <init-param>
+ <param-name>flex.write.path</param-name>
+ <param-value>/WEB-INF/flex</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>MessageBrokerServlet</servlet-name>
+ <url-pattern>/messagebroker/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+
+</web-app>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/build.xml b/attic/apps/ds-console/build.xml
new file mode 100755
index 0000000..cd4b99f
--- /dev/null
+++ b/attic/apps/ds-console/build.xml
@@ -0,0 +1,174 @@
+<?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="ds-console.war/build.xml" default="main" basedir="../..">
+
+ <property environment="env" />
+
+ <property file="${basedir}/build.properties"/>
+ <property name="ds-console.war" value="${basedir}/apps/ds-console"/>
+ <property name="dist.dir" value="${basedir}/dist"/>
+ <property name="src.dir" value="${ds-console.war}/WEB-INF/src"/>
+ <property name="classes.dir" value="${ds-console.war}/WEB-INF/classes"/>
+ <property name="mxmlc.dir" value="${basedir}/bin"/>
+
+
+ <property name="application.name" value="DS Console" />
+ <property name="application.dir" value="${ds-console.war}" />
+ <property name="application.file" value="console" />
+
+ <path id="classpath">
+ <fileset dir="${ds-console.war}/WEB-INF/lib" includes="**/*.jar"/>
+ </path>
+
+ <target name="main" depends="clean,ds-console"/>
+ <target name="ds-console" depends="compile,compile-swf"/>
+
+ <property environment="env"/>
+
+ <target name="prepare">
+ <mkdir dir="${ds-console.war}/WEB-INF/src"/>
+ <mkdir dir="${ds-console.war}/WEB-INF/lib"/>
+ <mkdir dir="${ds-console.war}/WEB-INF/classes"/>
+ </target>
+
+ <target name="copy-resources">
+ <fail unless="local.sdk.lib.dir" message="must specify local.sdk.lib.dir in server/build.properties"/>
+ <fail unless="local.sdk.frameworks.dir" message="must specify local.sdk.frameworks.dir in build.properties"/>
+
+ <!-- copy to the lib directory -->
+ <copy todir="${ds-console.war}/WEB-INF/lib">
+ <fileset dir="${basedir}/lib" includes="${webapp.lib}" />
+ </copy>
+
+ <!-- copy to the classes directory -->
+ <copy todir="${ds-console.war}/WEB-INF/classes">
+ <fileset dir="${ds-console.war}/WEB-INF/src" erroronmissingdir="false">
+ <include name="**/*.xml"/>
+ </fileset>
+ <fileset dir="${basedir}/lib" includes="${webapp.classes}" />
+ </copy>
+ </target>
+
+ <target name="run-depend" if="src.depend">
+ <echo message="Removing class files that changed and dependent class files."/>
+ <depend cache="${classes.dir}" srcdir="${src.dir}" destdir="${classes.dir}"/>
+ </target>
+
+ <target name="compile" depends="prepare,run-depend,copy-resources" description="compile">
+ <mkdir dir="${src.dir}"/>
+ <javac source="1.4" debug="${src.debug}" destdir="${classes.dir}" srcdir="${src.dir}" classpathref="classpath"/>
+ </target>
+
+ <target name="compile-swf" >
+
+ <delete file="${ds-console.war}/${application.file}.swf"/>
+ <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
+ <property name="FLEX_HOME" value="${basedir}"/>
+
+ <mxmlc file="${application.dir}/${application.file}.mxml"
+ output="${application.dir}/${application.file}.swf"
+ actionscript-file-encoding="UTF-8"
+ keep-generated-actionscript="false"
+ incremental="false"
+ services="${ds-console.war}/WEB-INF/flex/services-config.xml"
+ context-root="ds-console"
+ 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"
+ history="true"
+ express-install="true"
+ output="${application.dir}"/>
+
+ </target>
+
+ <target name="package" description=" Creates distribution war file">
+ <mkdir dir="${dist.dir}"/>
+ <antcall target="compile-swf"/>
+ <delete file="${dist.dir}/ds-console.war"/>
+ <war file="${dist.dir}/ds-console.war"
+ webxml="${ds-console.war}/WEB-INF/install-web.xml">
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}"/>
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - ${application.name}"/>
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+ </manifest>
+ <fileset dir="${ds-console.war}">
+ <include name="index.html"/>
+ <include name="console.swf"/>
+ <include name="playerProductInstall.swf"/>
+ <include name="swfobject.js"/>
+ <include name="history/*"/>
+ <include name="WEB-INF/flex/services-config.xml"/>
+ <include name="WEB-INF/classes/*"/>
+ <include name="WEB-INF/lib/**/*"/>
+ </fileset>
+ </war>
+ </target>
+
+ <target name="clean" description="--> Removes jars and classes">
+ <delete quiet="true">
+ <fileset dir="${ds-console.war}/" includes="swfobject.js,index.html,console.swf,expressInstall.swf,history/*"/>
+ </delete>
+ <delete quiet="true">
+ <fileset dir="${ds-console.war}/WEB-INF/lib" includes="${webapp.lib},${webtier.lib}"/>
+ </delete>
+ <delete quiet="true" includeEmptyDirs="true">
+ <fileset dir="${ds-console.war}/WEB-INF/flex/locale" includes="**/*"/>
+ </delete>
+ <delete quiet="true">
+ <fileset dir="${ds-console.war}/WEB-INF/flex/jars" includes="**/*"/>
+ </delete>
+ <delete quiet="true" includeEmptyDirs="true">
+ <fileset dir="${ds-console.war}/WEB-INF/flex/frameworks" includes="**/*"/>
+ </delete>
+ <delete quiet="true" includeEmptyDirs="true">
+ <fileset dir="${ds-console.war}/WEB-INF/flex" includes="*.ser,mxml-manifest.xml,cache.dep"/>
+ </delete>
+ <delete quiet="true">
+ <fileset dir="${classes.dir}" includes="**/*.class"/>
+ </delete>
+ <delete quiet="true" file="${dist.dir}/console.war"/>
+ <delete quiet="true" file="${dist.dir}/ds-console.war"/>
+ <delete quiet="true" dir="${ds-console.war}/history" />
+ <delete quiet="true" dir="${ds-console.war}/WEB-INF/lib" />
+ <delete quiet="true" dir="${ds-console.war}/WEB-INF/classes" />
+
+ </target>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console.mxml b/attic/apps/ds-console/console.mxml
new file mode 100755
index 0000000..661d5a5
--- /dev/null
+++ b/attic/apps/ds-console/console.mxml
@@ -0,0 +1,105 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:console="console.containers.*" xmlns="*" creationComplete="initApp();">
+ <mx:Script>
+ <![CDATA[
+ import console.ConsoleListener;
+ import console.containers.LogManager;
+ import console.containers.DestinationManager;
+ import console.containers.EndpointManager;
+ import console.containers.DefaultPanel;
+ import mx.core.Container;
+ import console.containers.UpdateListener;
+ import console.events.ManagementOperationInvokeEvent;
+ import mx.collections.ArrayCollection;
+ import console.containers.ServerManager;
+ import console.containers.AdvancedPanel;
+ import console.ConsoleManager;
+ import mx.messaging.management.*;
+ import mx.rpc.events.ResultEvent;
+
+ private var manager:ConsoleManager;
+ private var advPanel:AdvancedPanel;
+ private var srvManager:ServerManager;
+ private var currentSelectedPanel:Container;
+ private var consoleListener:ConsoleListener;
+
+ [Bindable]
+ public var appsList:ArrayCollection;
+
+ private function initApp():void
+ {
+ appsList = new ArrayCollection;
+
+ manager = ConsoleManager.getInstance();
+ manager.parent = this;
+
+ consoleNavigator.addChild(new DefaultPanel());
+ consoleNavigator.addChild(new ServerManager());
+ consoleNavigator.addChild(new EndpointManager());
+ consoleNavigator.addChild(new DestinationManager());
+ consoleNavigator.addChild(new LogManager());
+ consoleNavigator.addChild(new AdvancedPanel());
+
+ consoleListener = new ConsoleListener(this);
+
+ currentSelectedPanel = consoleNavigator.selectedChild as Container;
+ manager.activateListener(consoleNavigator.selectedChild as UpdateListener);
+ }
+
+ private function setCurrentTab():void
+ {
+ manager.deactivateListener(currentSelectedPanel as UpdateListener);
+ manager.activateListener(consoleNavigator.selectedChild as UpdateListener);
+
+ currentSelectedPanel = consoleNavigator.selectedChild as Container;
+ }
+
+ private function setCurrentApp():void
+ {
+ manager.currentApp = appSelect.selectedItem.data.label as String;
+ }
+
+ private function updatePollInterval():void
+ {
+ manager.timerInterval = pollIntervalSlider.value * 1000;
+ }
+
+ public function updateModel(model:Object):void
+ {
+ var mbeanModel:Object = manager.mbeanModel;
+ for each (var appObj:Object in mbeanModel)
+ {
+ var names:Array = (appObj.label as String).split(".");
+ appsList.addItem({label: names[2], data: appObj});
+ }
+ appSelect.selectedIndex = 0;
+ }
+ ]]>
+ </mx:Script>
+ <mx:HBox width="100%" textAlign="left" horizontalAlign="right">
+ <mx:Label text="Application"/>
+ <mx:ComboBox id="appSelect" dataProvider="{appsList}" labelField="label" width="300" change="{setCurrentApp()}" editable="false" enabled="true"/>
+ <mx:Label text="Polling Interval (seconds)" />
+ <mx:HSlider id="pollIntervalSlider" minimum="0" maximum="20" snapInterval=".5" enabled="true" change="{updatePollInterval()}"/>
+ </mx:HBox>
+ <mx:TabNavigator width="100%" height="100%" id="consoleNavigator" change="{setCurrentTab()}">
+ </mx:TabNavigator>
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/ConsoleListener.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/ConsoleListener.as b/attic/apps/ds-console/console/ConsoleListener.as
new file mode 100755
index 0000000..6aae3a5
--- /dev/null
+++ b/attic/apps/ds-console/console/ConsoleListener.as
@@ -0,0 +1,43 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console
+{
+ import console.containers.UpdateListener;
+
+ public class ConsoleListener extends UpdateListener
+ {
+ private var _console:console;
+
+ public function ConsoleListener(c:console)
+ {
+ _console = c;
+ ConsoleManager.getInstance().registerListener(this, []);
+ }
+
+ public override function mbeanModelUpdate(mbeanModel:Object):void
+ {
+ for each (var appObj:Object in mbeanModel)
+ {
+ var names:Array = (appObj.label as String).split(".");
+ _console.appsList.addItem({label: names[2], data: appObj});
+ }
+ _console.appSelect.selectedIndex = 0;
+ }
+ }
+}
\ No newline at end of file
[23/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/withoutui/messaging_withoutUI.as
----------------------------------------------------------------------
diff --git a/apps/team/features/withoutui/messaging_withoutUI.as b/apps/team/features/withoutui/messaging_withoutUI.as
deleted file mode 100755
index d226c70..0000000
--- a/apps/team/features/withoutui/messaging_withoutUI.as
+++ /dev/null
@@ -1,145 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- import flash.display.Sprite;
- import flash.events.Event;
- import flash.text.TextField;
-
- import mx.collections.ArrayCollection;
- import mx.collections.ArrayList;
- import mx.core.mx_internal;
- import mx.events.PropertyChangeEvent;
- import mx.messaging.ChannelSet;
- import mx.messaging.Consumer;
- import mx.messaging.Producer;
- import mx.messaging.channels.AMFChannel;
- import mx.messaging.config.ConfigMap;
- import mx.messaging.config.LoaderConfig;
- import mx.messaging.events.ChannelFaultEvent;
- import mx.messaging.events.MessageAckEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.messages.AcknowledgeMessage;
- import mx.messaging.messages.AcknowledgeMessageExt;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.messages.AsyncMessageExt;
- import mx.messaging.messages.CommandMessage;
- import mx.messaging.messages.CommandMessageExt;
- import mx.messaging.messages.ErrorMessage;
- import mx.messaging.messages.HTTPRequestMessage;
- import mx.messaging.messages.MessagePerformanceInfo;
- import mx.utils.ObjectProxy;
- import mx.utils.ObjectUtil;
- import mx.utils.RpcClassAliasInitializer;
-
- use namespace mx_internal;
-
- /**
- * A messaging sample that does not use any Flex UI classes. To get this working,
- * first the url of LoaderConfig needs to be set due to BLZ-522 bug. Then, some
- * classes need to be registered with Flash, see the registerClassAliases method.
- */
- public class messaging_withoutUI extends Sprite
- {
- private static const CHANNEL_ID:String = "my-amf-poll";
- private static const CHANNEL_URL:String = "http://localhost:8400/team/messagebroker/myamfpoll";
- private static const DESTINATION_ID:String = "messaging_AMF_Poll";
-
- private var channelSet:ChannelSet;
- private var producer:Producer;
- private var consumer:Consumer;
- private var text:TextField;
-
- public function messaging_withoutUI()
- {
- RpcClassAliasInitializer.registerClassAliases();
-
- setupChannelSet();
- setupProducer();
- setupConsumer();
- consumer.subscribe();
-
- text = new TextField();
- text.border = true;
- text.width = 300;
- text.text = "initializing. . .";
- addChild(text);
-
- }
-
- private function consumerMsgHandler(event:Event):void
- {
- trace("Consumer received msg: " + ObjectUtil.toString(event));
- text.text = "Consumer received message: " + (event as MessageEvent).message.body;
- }
-
- private function consumerPropChangeHandler(event:PropertyChangeEvent):void
- {
- // Make sure the ack is for a subscribe operation.
- if(event.property == "subscribed" && consumer.subscribed)
- {
- // Send the message.
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "hello";
- producer.send(msg);
- }
- }
-
- private function setupChannelSet():void
- {
- channelSet = new ChannelSet();
- var channel:AMFChannel = new AMFChannel(CHANNEL_ID, CHANNEL_URL);
- channel.pollingEnabled = true;
- channel.pollingInterval = 2000;
- channelSet.addChannel(channel);
- }
-
- private function setupConsumer():void
- {
- consumer = new Consumer();
- consumer.channelSet = channelSet;
- consumer.destination = DESTINATION_ID;
- consumer.addEventListener(MessageEvent.MESSAGE, consumerMsgHandler);
- consumer.addEventListener(ChannelFaultEvent.FAULT, faultHandler);
- consumer.addEventListener(MessageFaultEvent.FAULT, faultHandler);
- consumer.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, consumerPropChangeHandler);
- }
-
- private function setupProducer():void
- {
- producer = new Producer();
- producer.channelSet = channelSet;
- producer.destination = DESTINATION_ID;
- producer.addEventListener(MessageAckEvent.ACKNOWLEDGE, producerAckHandler);
- producer.addEventListener(MessageFaultEvent.FAULT, faultHandler);
- }
-
- private function producerAckHandler(event:Event):void
- {
- trace("Producer received ack: " + ObjectUtil.toString(event));
- }
-
- private function faultHandler(event:Event):void
- {
- trace("Server fault: " + ObjectUtil.toString(event));
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/withoutui/remoting_withoutUI.as
----------------------------------------------------------------------
diff --git a/apps/team/features/withoutui/remoting_withoutUI.as b/apps/team/features/withoutui/remoting_withoutUI.as
deleted file mode 100755
index a6f3d51..0000000
--- a/apps/team/features/withoutui/remoting_withoutUI.as
+++ /dev/null
@@ -1,116 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- import flash.display.Sprite;
- import flash.events.Event;
- import flash.text.TextField;
-
- import mx.collections.ArrayCollection;
- import mx.collections.ArrayList;
- import mx.core.mx_internal;
- import mx.events.PropertyChangeEvent;
- import mx.messaging.ChannelSet;
- import mx.messaging.Consumer;
- import mx.messaging.Producer;
- import mx.messaging.channels.AMFChannel;
- import mx.messaging.config.ConfigMap;
- import mx.messaging.config.LoaderConfig;
- import mx.messaging.events.ChannelFaultEvent;
- import mx.messaging.events.MessageAckEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.messages.AcknowledgeMessage;
- import mx.messaging.messages.AcknowledgeMessageExt;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.messages.AsyncMessageExt;
- import mx.messaging.messages.CommandMessage;
- import mx.messaging.messages.CommandMessageExt;
- import mx.messaging.messages.ErrorMessage;
- import mx.messaging.messages.HTTPRequestMessage;
- import mx.messaging.messages.MessagePerformanceInfo;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
- import mx.rpc.remoting.RemoteObject;
- import mx.utils.ObjectProxy;
- import mx.utils.ObjectUtil;
- import mx.utils.RpcClassAliasInitializer;
-
- use namespace mx_internal;
-
- /**
- * A messaging sample that does not use any Flex UI classes. To get this working,
- * first the url of LoaderConfig needs to be set due to BLZ-522 bug. Then, some
- * classes need to be registered with Flash, see the registerClassAliases method.
- */
- public class remoting_withoutUI extends Sprite
- {
- private static const CHANNEL_ID:String = "my-amf";
- private static const CHANNEL_URL:String = "http://localhost:8400/team/messagebroker/amf";
- private static const DESTINATION_ID:String = "remoting_AMF";
-
- private var channelSet:ChannelSet;
- private var ro:RemoteObject;
- private var text:TextField;
-
- public function remoting_withoutUI()
- {
- RpcClassAliasInitializer.registerClassAliases();
-
- setupChannelSet();
- setupRO();
-
- text = new TextField();
- text.border = true;
- text.width = 300;
- text.text = "initializing. . .";
- addChild(text);
-
- ro.echo("hello");
- }
-
- private function resultHandler(event:Event):void
- {
- trace("RemoteObject received result: " + ObjectUtil.toString(event));
- text.text = "RemoteObject receives result: " + (event as ResultEvent).message.body;
- }
-
- private function setupChannelSet():void
- {
- channelSet = new ChannelSet();
- var channel:AMFChannel = new AMFChannel(CHANNEL_ID, CHANNEL_URL);
- channelSet.addChannel(channel);
- }
-
- private function setupRO():void
- {
- ro = new RemoteObject();
- ro.channelSet = channelSet;
- ro.destination = DESTINATION_ID;
- ro.addEventListener(ResultEvent.RESULT, resultHandler);
- ro.addEventListener(ChannelFaultEvent.FAULT, faultHandler);
- ro.addEventListener(FaultEvent.FAULT, faultHandler);
- }
-
- private function faultHandler(event:Event):void
- {
- trace("Server fault: " + ObjectUtil.toString(event));
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/assembly/pom.xml
----------------------------------------------------------------------
diff --git a/assembly/pom.xml b/assembly/pom.xml
new file mode 100755
index 0000000..607f7da
--- /dev/null
+++ b/assembly/pom.xml
@@ -0,0 +1,58 @@
+<?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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.flex.blazeds</groupId>
+ <artifactId>flex-messaging</artifactId>
+ <version>4.8.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>flex-messaging-assembly</artifactId>
+ <packaging>pom</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.5.1</version>
+ <executions>
+ <execution>
+ <id>assemble-sources-releases</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <finalName>apache-flex-blazeds</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble-zip.xml</descriptor>
+ <descriptor>src/assembly/assemble-gz.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/assembly/src/assembly/assemble-gz.xml
----------------------------------------------------------------------
diff --git a/assembly/src/assembly/assemble-gz.xml b/assembly/src/assembly/assemble-gz.xml
new file mode 100644
index 0000000..8b13e5d
--- /dev/null
+++ b/assembly/src/assembly/assemble-gz.xml
@@ -0,0 +1,40 @@
+<?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.
+
+ -->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+ <id>source-release</id>
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/..</directory>
+ <outputDirectory>/</outputDirectory>
+ <useDefaultExcludes>false</useDefaultExcludes>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ <exclude>attic/**</exclude>
+ <exclude>**/*.iml</exclude>
+ <exclude>.idea/**</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/assembly/src/assembly/assemble-zip.xml
----------------------------------------------------------------------
diff --git a/assembly/src/assembly/assemble-zip.xml b/assembly/src/assembly/assemble-zip.xml
new file mode 100644
index 0000000..80a8f85
--- /dev/null
+++ b/assembly/src/assembly/assemble-zip.xml
@@ -0,0 +1,40 @@
+<?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.
+
+ -->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+ <id>source-release</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <fileSets>
+ <fileSet>
+ <directory>${basedir}/..</directory>
+ <outputDirectory>/</outputDirectory>
+ <useDefaultExcludes>false</useDefaultExcludes>
+ <excludes>
+ <exclude>**/target/**</exclude>
+ <exclude>attic/**</exclude>
+ <exclude>**/*.iml</exclude>
+ <exclude>.idea/**</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/ApproveBlazeDS.xml
----------------------------------------------------------------------
diff --git a/attic/ApproveBlazeDS.xml b/attic/ApproveBlazeDS.xml
new file mode 100644
index 0000000..ec88d2e
--- /dev/null
+++ b/attic/ApproveBlazeDS.xml
@@ -0,0 +1,385 @@
+<?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="ApproveApacheFlexBlazeDS" default="main" basedir=".">
+
+
+ <!-- Required for OSX 10.6 / Snow Leopard Performance. -->
+ <!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
+ <!-- local.d32 is set/used in build.properties so this needs to be done first. -->
+ <condition property="local.d32" value="-d32">
+ <and>
+ <os family="windows"/>
+ <equals arg1="${sun.arch.data.model}" arg2="64"/>
+ <equals arg1="${os.arch}" arg2="x86_64"/>
+ <equals arg1="${ant.java.version}" arg2="1.6"/>
+ </and>
+ </condition>
+
+ <condition property="isMac" value="mac">
+ <os family="mac" />
+ </condition>
+ <condition property="isWindows" value="windows">
+ <os family="windows" />
+ </condition>
+ <condition property="isLinux" value="linux">
+ <and>
+ <os family="unix" />
+ <not>
+ <isset property="isMac" />
+ </not>
+ </and>
+ </condition>
+ <condition property="package.suffix" value="zip">
+ <os family="windows" />
+ </condition>
+ <property name="package.suffix" value="tar.gz" />
+
+ <property name="rat.report" value="${basedir}/rat-report.txt"/>
+ <property name="apache.rat.jar" value="apache-rat-0.8.jar" />
+ <property name="apache.rat.tasks.jar" value="apache-rat-tasks-0.8.jar" />
+ <property name="apache.rat.url" value="http://people.apache.org/~aharui/rat" />
+
+ <property name="mac.text.display" value="cat" />
+ <property name="win.text.display" value="type" />
+ <property name="linux.text.display" value="cat" />
+
+ <property file="${basedir}/approveblazeds.properties"/>
+ <property environment="env"/>
+
+ <property name="build.target" value="main" />
+
+ <condition property="do.copy.downloads" >
+ <isset property="download.cache.dir" />
+ </condition>
+
+ <fail message="The ANT_HOME environment variable is not set."
+ unless="env.ANT_HOME"/>
+
+ <available file="${env.FLEX_HOME}"
+ type="dir"
+ property="FLEX_HOME" value="${env.FLEX_HOME}" />
+
+ <fail message="The FLEX_HOME property is not set in environment or command-line."
+ unless="FLEX_HOME"/>
+
+ <available file="${env.AIR_HOME}"
+ type="dir"
+ property="AIR_HOME" value="${env.AIR_HOME}" />
+
+ <fail message="The AIR_HOME property is not set in environment or command-line."
+ unless="AIR_HOME"/>
+
+ <available file="${env.ANT_HOME}/lib/${apache.rat.jar}"
+ type="file"
+ property="apache.rat.found"/>
+ <available file="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}"
+ type="file"
+ property="apache.rat.tasks.found"/>
+
+ <fail message="The release version is not set. Specify -Drelease.version=<release version (e.g. 3.1, 3.2, etc)>"
+ unless="release.version"/>
+
+ <fail message="The folder number is not set. Specify -Dfolder.number=<folder number (e.g. 1001, 1002, etc)>"
+ unless="folder.number"/>
+
+ <property name="package.url.path" value="https://repository.apache.org/content/repositories/orgapacheflex-${folder.number}/org/apache/flex/blazeds/blazeds/${release.version}" />
+ <property name="package.url.name" value="blazeds-${release.version}-source-release" />
+
+ <condition property="zip.compressed">
+ <equals arg1="zip" arg2="${package.suffix}" />
+ </condition>
+
+ <target name="display-text-mac" if="isMac">
+ <echo>========================= Begin ${file} ==============================</echo>
+ <exec executable="${mac.text.display}" >
+ <arg value="${file}" />
+ </exec>
+ <echo>========================= End ${file} ==============================</echo>
+ </target>
+ <target name="display-text-win" if="isWindows">
+ <pathconvert targetos="windows" property="winfile">
+ <path path="${file}" />
+ </pathconvert>
+ <echo>========================= Begin ${winfile} ==============================</echo>
+ <exec executable="cmd.exe" >
+ <arg value="/c" />
+ <arg value="${win.text.display}" />
+ <arg value="${winfile}" />
+ </exec>
+ <echo>========================= End ${winfile} ==============================</echo>
+ </target>
+ <target name="display-text-linux" if="isLinux">
+ <echo>========================= Begin ${file} ==============================</echo>
+ <exec executable="${linux.text.display}" >
+ <arg value="${file}" />
+ </exec>
+ <echo>========================= End ${file} ==============================</echo>
+ </target>
+
+ <target name="install-rat" depends="install-rat.jar,install-rat.tasks.jar" />
+ <target name="install-rat.jar" unless="apache.rat.found">
+ <get src="${apache.rat.url}/${apache.rat.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.jar}" />
+ </target>
+ <target name="install-rat.tasks.jar" unless="apache.rat.tasks.found">
+ <get src="${apache.rat.url}/${apache.rat.tasks.jar}" dest="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}" />
+ </target>
+
+ <target name="rat-taskdef" description="Rat taskdef">
+ <typedef resource="org/apache/rat/anttasks/antlib.xml"
+ uri="antlib:org.apache.rat.anttasks"
+ classpathref="anttask.classpath"/>
+ </target>
+
+ <target name="main" depends="install-rat,download,check-sigs,uncompress,rat-check,check-notices,build,approve" description="Perform required release approval steps">
+ </target>
+
+ <target name="main-no-download" depends="install-rat,check-sigs,uncompress,rat-check,check-notices,build,approve" description="Perform required release approval steps">
+ </target>
+
+ <target name="test" >
+ <echo>${rat.report}.bin.txt</echo>
+ <replaceregexp file="${rat.report}.bin.txt" match="..AL.*" replace="" byline="true"/>
+ </target>
+
+ <target name="display-text" >
+ <antcall target="display-text-mac" />
+ <antcall target="display-text-win" />
+ <antcall target="display-text-linux" />
+ </target>
+
+ <target name="display-text-test" >
+ <antcall target="display-text" >
+ <param name="file" value="${basedir}/rat-report.txt" />
+ </antcall>
+ </target>
+
+ <target name="download" depends="download-asc" description="download the release package">
+ <get src="${package.url.path}/${package.url.name}.${package.suffix}"
+ dest="${basedir}/${package.url.name}.${package.suffix}" />
+ <get src="${package.url.path}/${package.url.name}.${package.suffix}.md5"
+ dest="${basedir}/${package.url.name}.${package.suffix}.md5" />
+ </target>
+
+ <target name="download-asc" unless="no.asc" description="download the release package">
+ <get src="${package.url.path}/${package.url.name}.${package.suffix}.asc"
+ dest="${basedir}/${package.url.name}.${package.suffix}.asc" />
+ </target>
+
+ <target name="check-md5" description="check md5">
+ <echo message="Checking MD5..."/>
+ <replace file="${basedir}/${package.url.name}.${package.suffix}.md5"
+ token=" " />
+ <checksum file="${basedir}/${package.url.name}.${package.suffix}" algorithm="md5" verifyproperty="md5.ok" />
+ <condition property="MD5Invalid">
+ <not>
+ <equals arg1="${md5.ok}" arg2="true" />
+ </not>
+ </condition>
+ <fail message="MD5 checksum did not match" if="MD5Invalid" />
+ </target>
+
+ <target name="check-sigs" depends="check-md5" unless="no.asc" description="check md5 and gpg sigs">
+ <exec executable="gpg" failonerror="true">
+ <arg value="--verify" />
+ <arg value="${basedir}/${package.url.name}.${package.suffix}.asc" />
+ <arg value="${basedir}/${package.url.name}.${package.suffix}" />
+ </exec>
+ </target>
+
+
+ <target name="uncompress" depends="pre-clean, untar-file, unzip-file" />
+
+ <target name="pre-clean" description="remove old uncompressed package" >
+ <delete dir="${basedir}/${package.url.name}" failonerror="false" />
+ </target>
+
+ <target name="untar-file" unless="zip.compressed" description="Untars zipFile">
+ <untar src="${basedir}/${package.url.name}.${package.suffix}"
+ dest="${basedir}/${package.url.name}" compression="gzip"/>
+ </target>
+
+ <target name="unzip-file" if="zip.compressed" description="Unzips zipFile">
+ <unzip src="${basedir}/${package.url.name}.${package.suffix}"
+ dest="${basedir}/${package.url.name}"/>
+ </target>
+
+ <target name="rat-check" >
+
+ <echo message="Checking files at ${basedir}/${package.url.name}, report is ${rat.report}"/>
+
+ <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"
+ reportFile="${rat.report}">
+ <fileset dir="${basedir}/${package.url.name}">
+ <!-- exclude media (png, gif, jpg, mp3, flv) -->
+ <exclude name="**/*.png"/>
+ <exclude name="**/*.gif"/>
+ <exclude name="**/*.jpg"/>
+ <exclude name="**/*.mp3"/>
+ <exclude name="**/*.flv"/>
+ <exclude name="installer/build.number"/>
+ <exclude name="**/swfobject.js"/>
+ <exclude name="**/DoNotDeleteUntilFile.txt" />
+ <exclude name="CONTRIBUTORS"/>
+ <exclude name="CONTRIBUTING"/>
+ </fileset>
+ </rat:report>
+ <antcall target="display-text" >
+ <param name="file" value="${rat.report}" />
+ </antcall>
+ <input
+ message="Check that there are no unknown or unapproved licenses or archives. Is it ok?"
+ validargs="y,n"
+ defaultvalue="y"
+ addproperty="rat.license.ok"/>
+ <echo>filtering out AL files to make it easier to see binary files</echo>
+ <copy file="${rat.report}" tofile="${rat.report}.bin.txt" />
+ <replaceregexp file="${rat.report}.bin.txt" match="..AL.*" replace="" byline="true"/>
+ <antcall target="display-text" >
+ <param name="file" value="${rat.report}.bin.txt" />
+ </antcall>
+ <input
+ message="Check that there are no unexpected binaries. Is it ok?"
+ validargs="y,n"
+ defaultvalue="n"
+ addproperty="rat.binaries.ok"/>
+ </target>
+
+ <target name="check-notices" description="open each notice file for review, grep for a few things" >
+ <fail message="README not in package">
+ <condition>
+ <not>
+ <available file="${basedir}/${package.url.name}/blazeds-${release.version}/README" />
+ </not>
+ </condition>
+ </fail>
+ <fail message="RELEASE_NOTES not in package">
+ <condition>
+ <not>
+ <available file="${basedir}/${package.url.name}/blazeds-${release.version}/RELEASE_NOTES" />
+ </not>
+ </condition>
+ </fail>
+ <fail message="NOTICE not in package">
+ <condition>
+ <not>
+ <available file="${basedir}/${package.url.name}/blazeds-${release.version}/NOTICE" />
+ </not>
+ </condition>
+ </fail>
+ <fail message="LICENSE not in package">
+ <condition>
+ <not>
+ <available file="${basedir}/${package.url.name}/blazeds-${release.version}/LICENSE" />
+ </not>
+ </condition>
+ </fail>
+ <antcall target="display-text" >
+ <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/README" />
+ </antcall>
+ <input
+ message="Check the README for version numbers, spelling, grammar, accuracy. Is it ok?"
+ validargs="y,n"
+ defaultvalue="y"
+ addproperty="readme.ok"/>
+
+ <antcall target="display-text" >
+ <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/RELEASE_NOTES" />
+ </antcall>
+ <input
+ message="Check the RELEASE_NOTES for copyright years, spelling, grammar, accuracy. Is it ok?"
+ validargs="y,n"
+ defaultvalue="y"
+ addproperty="releasenotes.ok"/>
+
+ <antcall target="display-text" >
+ <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/NOTICE" />
+ </antcall>
+ <input
+ message="Check the NOTICE for required notices from third-parties. Is it ok?"
+ validargs="y,n"
+ defaultvalue="y"
+ addproperty="notice.ok"/>
+
+ <antcall target="display-text" >
+ <param name="file" value="${basedir}/${package.url.name}/blazeds-${release.version}/LICENSE" />
+ </antcall>
+ <input
+ message="Check the LICENSE for the Apache License and third-party licenses. Is it ok?"
+ validargs="y,n"
+ defaultvalue="y"
+ addproperty="license.ok"/>
+ </target>
+
+ <target name="build" depends="copy.downloads">
+ <input
+ message="The final step is to run the build and any tests the build script runs. This can take several minutes. Press y to start the build."
+ validargs="y"
+ defaultvalue="y" />
+ <exec dir="${basedir}/${package.url.name}/blazeds-${release.version}" executable="mvn" >
+ <arg value="install" />
+ </exec>
+ </target>
+
+ <target name="copy.downloads" if="${do.copy.downloads}" description="instead of actually downloading all of the dependencies, you can save lots of time by just copying from some other folder in some other SDK.">
+ <echo>Copying downloads</echo>
+ <copy todir="${basedir}/${package.url.name}/in" >
+ <fileset dir="${download.cache.dir}" />
+ </copy>
+ </target>
+
+ <target name="approve" >
+ <condition property="vote" value="+1">
+ <and>
+ <equals arg1="${rat.license.ok}" arg2="y" />
+ <equals arg1="${rat.binaries.ok}" arg2="y" />
+ <equals arg1="${readme.ok}" arg2="y" />
+ <equals arg1="${releasenotes.ok}" arg2="y" />
+ <equals arg1="${notice.ok}" arg2="y" />
+ <equals arg1="${license.ok}" arg2="y" />
+ </and>
+ </condition>
+ <property name="vote" value="-1" />
+ <echo>
+${vote}
+Package ${package.url.path}/${package.url.name}.${package.suffix}
+Java ${ant.java.version}
+OS: ${os.name} ${os.arch} ${os.version}
+Source kit signatures match: y
+Source kit builds: y
+README is ok: ${readme.ok}
+RELEASE_NOTES is ok: ${releasenotes.ok}
+NOTICE is ok: ${notice.ok}
+LICENSE is ok: ${license.ok}
+No unapproved licenses or archives: ${rat.license.ok}
+No unapproved binaries: ${rat.binaries.ok}
+ </echo>
+ <fail>
+ <condition>
+ <equals arg1="-1" arg2="${vote}"/>
+ </condition>
+ </fail>
+ <antcall target="no-asc" />
+ </target>
+
+ <target name="no-asc" if="no.asc" >
+ <echo>PGP signature not checked</echo>
+ </target>
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/LICENSE
----------------------------------------------------------------------
diff --git a/attic/LICENSE b/attic/LICENSE
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/attic/LICENSE
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/NOTICE
----------------------------------------------------------------------
diff --git a/attic/NOTICE b/attic/NOTICE
new file mode 100644
index 0000000..ecee85c
--- /dev/null
+++ b/attic/NOTICE
@@ -0,0 +1,9 @@
+Apache Flex BlazeDS
+Copyright 2014-2015 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+The Initial Developer of the Original Code, known as Adobe Flex,
+is Adobe Systems Incorporated (http://www.adobe.com/).
+ Copyright 2003 - 2012 Adobe Systems Incorporated. All Rights Reserved.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/README
----------------------------------------------------------------------
diff --git a/attic/README b/attic/README
new file mode 100644
index 0000000..28e3980
--- /dev/null
+++ b/attic/README
@@ -0,0 +1,442 @@
+Apache Flex BlazeDS
+==================
+
+ Apache Flex SDK is an application development framework for easily building
+ Flash-based applications for mobile devices, web browsers, and desktops.
+
+ Apache Flex BlazeDS is the server-based Java remoting and web messaging
+ technology that enables developers to easily connect to back-end distributed
+ data and push data in real-time to Adobe® Flex® and Adobe AIR™ applications
+ for more responsive rich Internet application (RIA) experiences..
+
+ Apache Flex BlazeDS 4.7 is the initial release of BlazeDS from the Apache
+ Software Foundation. Prior to this, releases were provided by Adobe
+ Systems Inc. This version adds new features and implements bug fixes
+ that were unavailable in previous versions. It is compatible with most code
+ written to target Adobe Flex 4.6.
+
+ For detailed information about Apache Flex please visit
+ http://flex.apache.org/
+
+ Apache Flex BlazeDS is a large project with many pieces. The software is
+ implemented partially in ActionScript and partially in Java.
+
+ Currently supported platforms include:
+
+ Microsoft Windows
+ Mac OS X
+ Apple iOS
+ Google Android
+ RIM BlackBerry
+ Linux
+
+ Apache Flex is the software evolution of the popular Adobe BlazeDS project.
+
+ The community surrounding Flex is vast, diverse, distributed globally, and
+ with all levels of proficiency in software development.
+
+ There has been more that 30,000 installs of Apache Flex. The Apache Flex web
+ site gets 3 quarters of a million page views a year and more than 250,000
+ unique visitors a year.
+
+
+Getting the convenience packages for Apache Flex
+================================================
+
+ TBD
+
+Getting the latest sources via git
+==================================
+
+ Getting the source code is the recommended way to get Apache Flex BlazeDS.
+
+ You can always checkout the latest source via git using the following
+ command:
+
+ git clone https://git-wip-us.apache.org/repos/asf/flex-blazeds.git blazeds
+ cd blazeds
+ git checkout develop
+
+ Apache Flex BlazeDS also requires source code from other Apache Flex git
+ repositories. To get the latest source via git for the Apache Flex SDK
+ use the following command:
+
+ git clone https://git-wip-us.apache.org/repos/asf/flex-sdk.git sdk
+ cd sdk
+ git checkout develop
+
+ Linux support is currently experimental and you may run into issues. Apache
+ Flex would like to see a fully supported Linux release, but we need support
+ from the community in order to do that. Please help out if you can.
+
+ For further information visit http://flex.apache.org/download-source.html
+
+Building Apache Flex BlazeDS 4.7
+================================
+
+ Apache Flex BlazeDS is a large project. It requires some build tools which must be
+ installed prior to building BlazeDS and it depends on some external software
+ which are downloaded as part of the build process. Some of these have
+ different licenses. See the Software Dependencies section for more
+ information on the external software dependencies.
+
+ From Apache's perspective, the Adobe Flash Player and Adobe AIR have
+ excluded licenses so they can not be bundled with the Apache Flex binaries.
+ They must be installed prior to building Apache Flex.
+
+ Linux support is currently experimental and while it is possible to compile
+ BlazeDS it has not been fully tested so you may run into issues.
+
+Install Prerequisites
+---------------------
+
+ Before building BlazeDS you must install the following software and set the
+ corresponding environment variables using absolute file paths. Relative
+ file paths will result in build errors.
+
+ The environment variables PLAYERGLOBAL_HOME, AIR_HOME, FLASHPLAYER_DEBUGGER,
+ FLEX_HOME can also be set in the property file
+ called env.properties. See the env-template.properties file for
+ instructions.
+
+ The Adobe Flash Player playerglobal.swc is needed to compile all the
+ ActionScript components. The Adobe Flash Player
+ content debugger is used by checkintests and other pieces of the test
+ subsystem to run compiled applications.
+
+ ==================================================================================
+ SOFTWARE ENVIRONMENT VARIABLE (absolute paths)
+ ==================================================================================
+
+ Java SDK 1.6 or greater (*1) JAVA_HOME
+ (for Java 1.7 see note at (*2))
+
+ Ant 1.7.1 or greater (*1) ANT_HOME
+ (for Java 1.7 see note at (*2))
+
+ Adobe AIR Integration Kit (*3) AIR_HOME
+
+ Adobe Flash Player Content Debugger (*4) FLASHPLAYER_DEBUGGER
+
+ Adobe Flash Player playerglobal swcs (*5) PLAYERGLOBAL_HOME
+
+ Apache Flex SDK (*6) FLEX_HOME
+
+ ==================================================================================
+
+ *1) The bin directories for ANT_HOME and JAVA_HOME should be added to your
+ PATH.
+
+ On Windows, set PATH to
+
+ PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin
+
+ On the Mac (bash), set PATH to
+
+ export PATH="$PATH:$ANT_HOME/bin:$JAVA_HOME/bin"
+
+ On Linux make sure you path include ANT_HOME and JAVA_HOME.
+
+ *2) If you are using Java SDK 1.7 or greater on a Mac you must use Ant 1.8
+ or greater. If you use Java 1.7 with Ant 1.7, ant reports the java
+ version as 1.6 so the JVM args for the data model (-d32/-d64) will not
+ be set correctly and you will get compile errors.
+
+ *3) The Adobe AIR integration kit for Windows can be downloaded from:
+ http://airdownload.adobe.com/air/win/download/13.0/AdobeAIRSDK.zip
+
+ The Adobe AIR integration kit for Mac can be downloaded from:
+ http://airdownload.adobe.com/air/mac/download/13.0/AdobeAIRSDK.tbz2
+
+ The Adobe AIR integration kit for Linux can be downloaded from:
+ http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRSDK.tbz2
+
+ This version of Apache Flex was certified for use with AIR 13.0, and
+ should be compatible with other versions of AIR newer than 3.1. However
+ it hasn't been fully tested on AIR 3.2, 3.3, 3.5, 3.6 or 3.7.
+
+ Download the AIR SDK for your platform and unzip it. Set AIR_HOME to the
+ absolute path of the AIR SDK directory.
+
+ *4) The Adobe Flash Player content debuggers can be found here:
+ http://www.adobe.com/support/flashplayer/downloads.html
+
+ This version of Apache Flex was certified for use with Adobe Flash
+ Player 11.1, and is compatible with versions 10.2 through 13.0. It has
+ been tested with versions 11.1, 11.7, 11.8, 11.9 and 12.0 on Windows
+ and Mac. It has been compiled against other Adobe Flash Player versions
+ but has not been fully tested. It has not been fully tested on Linux.
+
+ On Windows, set FLASHPLAYER_DEBUGGER to the absolute path including the
+ filename of the FlashPlayerDebugger.exe. Note the filename of flash
+ player debugger maybe different.
+ e.g. C:\MyPath\FlashPlayerDebugger.exe
+
+ On the Mac, set FLASHPLAYER_DEBUGGER to the absolute path of
+ Flash Player Debugger.app/Contents/MacOS/Flash Player Debugger
+
+ On Linux, set FLASHPLAYER_DEBUGGER to the absolute path of
+ flashplayerdebugger
+
+ *5) The Adobe Flash Player playerglobal.swc for 11.1 can be downloaded from:
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_1.swc
+
+ Use URL above to download playerglobal11_1.swc. Create the directory,
+ player/11.1 and copy playerglobal11_1.swc to
+ player/11.1/playerglobal.swc.
+
+ Set PLAYERGLOBAL_HOME to the absolute path of the player directory (not
+ including the version subdirectory). The target-player option controls
+ which PLAYERGLOBAL_HOME subdirectory is used.
+
+ Other more recent versions of Adobe Flash Player playerglobal.swc can be
+ downloaded from:
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_2.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_3.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_4.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_5.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_6.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_7.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_8.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_9.swc
+ http://download.macromedia.com/get/flashplayer/updaters/12/playerglobal12_0.swc
+ http://download.macromedia.com/get/flashplayer/updaters/13/playerglobal13_0.swc
+
+ These can be used with Apache Flex but not all have not been fully
+ tested.
+
+ *6) The Apache Flex SDK is required to build some of the ActionScript code.
+
+ Set FLEX_HOME to the absolute path of Apache Flex SDK.
+
+FlashPlayer Configuration
+-------------------------
+
+ For testing, the Adobe Flash Player's mm.cfg file must have the following
+ entries
+
+ ErrorReportingEnable=1
+ TraceOutputFileEnable=1
+
+ and a FlashPlayerTrust file must allow local SWFs to access local files.
+
+
+Adobe Flash Player Version Support
+----------------------------------
+
+ Apache Flex BlazeDS defaults to using the Adobe Flash Player 11.1. The SDK
+ can be used with Flash Player versions 10.2, 10.3, 11.0, 11.1, 11.2, 11.3,
+ 11.4, 11.5, 11.6, 11.7, 11.8, 11.9, 12.0 and 13.0.
+
+ It is recommended that you update to the latest version of Adobe Flash
+ Player. Newer versions of the Adobe Flash player address security
+ vulnerabilities, fix bugs/issues, increase stability, and implement new
+ features.
+
+ To use the SDK for another version of the Adobe Flash Player either:
+
+ Change the flex-config.xml configuration file to specify another version of
+ the Adobe Flash Player.
+
+ OR
+
+ Change the playerglobal.version in the build.properties file to have a value
+ other than "11.1". For this change to take effect the SDK needs to be
+ recompiled. For example to compile against the latest version of the Adobe
+ Flash Player set the value of playerglobal.version to be "12.0" like so:
+
+ playerglobal.version = 13.0
+
+ OR
+
+ Compile the SDK with a -Dplayerglobal.version=<version> option, where
+ <version> is the Adobe Flash Player version to compile the SDK against.
+
+
+ Different versions of the Adobe Flash Player require different versions of
+ playerglobal.swc.
+
+ These can be found at:
+
+ http://download.macromedia.com/get/flashplayer/installers/archive/playerglobal/playerglobal10_2.swc
+ http://download.macromedia.com/get/flashplayer/installers/archive/playerglobal/playerglobal10_3.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_0.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_1.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_2.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_3.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_4.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_5.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_6.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_7.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_8.swc
+ http://download.macromedia.com/get/flashplayer/updaters/11/playerglobal11_9.swc
+ http://download.macromedia.com/get/flashplayer/updaters/12/playerglobal12_0.swc
+ http://download.macromedia.com/get/flashplayer/updaters/13/playerglobal13_0.swc
+
+ Copy the target playerglobal.swc to the directory:
+
+ frameworks/libs/player/<version>/playerglobal.swc
+
+ Where <version> is the major and minor version numbers of the Adobe Flash
+ Player separated by a period or full stop.
+
+ If all of the playerglobal swcs where installed the frameworks/libs/player
+ directory structure would look like this.
+
+ /frameworks
+ /libs
+ /player
+ /10.2
+ /playerglobal.swc
+ /10.3
+ /playerglobal.swc
+ /11.0
+ /playerglobal.swc
+ /11.2
+ /playerglobal.swc
+ /11.2
+ /playerglobal.swc
+ /11.3
+ /playerglobal.swc
+ /11.4
+ /playerglobal.swc
+ /11.5
+ /playerglobal.swc
+ /11.6
+ /playerglobal.swc
+ /11.7
+ /playerglobal.swc
+ /11.8
+ /playerglobal.swc
+ /11.9
+ /playerglobal.swc
+ /12.0
+ /playerglobal.swc
+ /13.0
+ /playerglobal.swc
+
+ Apache Flex has been tested with Adobe Flash Player 11.1, 11.5, 11.7, 11.8,
+ 11.9, 12.0 nd 13.0 on Windows and Mac.
+
+ Apache Flex has not been tested on Linux so some issue may exist in this
+ release.
+
+ It compiles against other Adobe Flash Player versions and is expected to
+ work but their may be some issues, particularly with the earlier 10.2 and
+ 10.3 versions of the Adobe Flash Player.
+
+Software Dependencies
+---------------------
+
+ Apache Flex uses third-party code that will be downloaded as part of the
+ Apache Flex build. In addition, there is some optional third-party code
+ that you can choose to download if you would like to take advantage of the
+ features offered and you agree to the license terms.
+
+ The Apache Version 2.0 license is in the LICENSE file.
+
+ The following dependencies have licenses which are, or are compatible with,
+ the Apache Version 2.0 license. You will not be prompted to acknowledge the
+ download. Most of the jars are installed in lib/external.
+
+ activemq - http://archive.apache.org/dist/activemq/apache-activemq/5.3.1/apache-activemq-5.3.1-bin.zip
+ codec - http://archive.apache.org/dist/commons/codec/binaries/commons-codec-1.5-bin.zip
+ commons-collections - http://archive.apache.org/dist/commons/collections/binaries/commons-collections-3.1.tar.gz
+ commons-fileupload - http://archive.apache.org/dist/commons/fileupload/binaries/commons-fileupload-1.1.zip
+ commons-httpclient - http://archive.apache.org/dist/httpcomponents/commons-httpclient/binary/commons-httpclient-3.1.zip
+ commons-logging - http://archive.apache.org/dist/commons/logging/binaries/commons-logging-1.1.1-bin.zip
+ hsqldb - http://downloads.sourceforge.net/project/hsqldb/hsqldb/hsqldb_1_8_0/hsqldb_1_8_0_10.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fhsqldb%2Ffiles%2Fhsqldb%2Fhsqldb_1_8_0%2F&ts=1378509998&use_mirror=softlayer-dal
+ jms - http://downloads.sourceforge.net/project/openjms/openjms/openjms-0.7.6.1/openjms-0.7.6.1.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fopenjms%2Ffiles%2Fopenjms%2Fopenjms-0.7.6.1%2F&ts=1378512874&use_mirror=hivelocity
+ log4j - http://archive.apache.org/dist/logging/log4j/1.2.14/logging-log4j-1.2.14.zip
+ spring-framework - http://s3.amazonaws.com/dist.springframework.org/release/SPR/spring-framework-3.0.3.RELEASE.zip
+ spring-security - http://s3.amazonaws.com/dist.springframework.org/release/SEC/spring-security-3.0.3.RELEASE.zip
+ spring-flex - http://repo1.maven.org/maven2/org/springframework/flex/spring-flex-core/1.5.2.RELEASE/spring-flex-core-1.5.2.RELEASE.jar
+ jakarta-taglibs - http://archive.apache.org/dist/jakarta/taglibs/standard/binaries/jakarta-taglibs-standard-1.1.2.zip
+ aopalliance - http://downloads.sourceforge.net/project/aopalliance/aopalliance/1.0/aopalliance.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Faopalliance%2Ffiles%2Faopalliance%2F1.0%2F&ts=1378515484&use_mirror=softlayer-dal
+ backport - http://downloads.sourceforge.net/project/backport-jsr166/backport-jsr166/2.2/backport-util-concurrent-2.2.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fbackport-jsr166%2Ffiles%2Fbackport-jsr166%2F2.2%2F&ts=1378515970&use_mirror=heanet
+ cglib - http://downloads.sourceforge.net/project/cglib/cglib2/cglib%202.1_03/cglib-nodep-2.1_3.jar?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fcglib%2Ffiles%2Fcglib2%2Fcglib%25202.1_03%2F&ts=1378516297&use_mirror=hivelocity
+ jackson-core - http://repository.codehaus.org/org/codehaus/jackson/jackson-core-asl/1.0.0/jackson-core-asl-1.0.0.jar
+ tomcat - http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.29/bin/apache-tomcat-6.0.29.zip
+ xalan - http://archive.apache.org/dist/xml/xalan-j/binaries/xalan-j_2_6_0-bin.tar.gz
+ xerces - http://archive.apache.org/dist/xerces/j/Xerces-J-bin.2.9.1.zip
+ ExcludeDoclet.java - http://sixlegs.com/misc/ExcludeDoclet.java
+ mx4j - http://repo1.maven.org/maven2/mx4j/mx4j-jmx/1.1.1/mx4j-jmx-1.1.1.jar
+ axis - http://archive.apache.org/dist/axis/axis/java/1.4/axis-bin-1_4.zip
+ testng - http://mirrors.ibiblio.org/pub/mirrors/maven2/org/testng/testng/5.8/testng-5.8-jdk15.jar
+
+Using the Binary Distribution
+-----------------------------
+
+ TBD
+
+Building the Framework in a Binary Distribution
+-----------------------------------------------
+
+ The source for most of the framework is included in the binary distribution.
+ It can be useful if you wish to debug and/or extend components.
+
+ When you have all the prerequisites in place and the environment variables
+ set, (see Install Prerequisites above), use
+
+ cd <blazeds.dir>
+ ant main (or just ant since the default target is main)
+
+ to download the third-party dependencies and build BlazeDS. You
+ may be prompted to acknowledge some of the downloads. Since the third-party
+ dependencies take a little while to download and they don't change very
+ often, they are not cleaned with the regular clean target.
+
+ To clean the build, of everything other than the downloaded third-party
+ dependencies use
+
+ ant clean
+
+ To clean the build, of everything, including the downloaded third-party
+ dependencies use
+
+ ant super-clean (which is just thirdparty-clean followed by clean)
+
+Building the Source in the Source Distribution
+----------------------------------------------
+
+ When you have all the prerequisites in place and the environment variables
+ set (see Install Prerequisites above), use
+
+ cd <blazeds.dir>
+ ant main (or just ant since the default target is main)
+
+ to download the thirdparty dependencies and build the source. You may be
+ prompted to acknowledge and/or confirm some of the downloads. Since the
+ third-party dependencies take a little while to download and they don't
+ change very often, they are not cleaned with the regular clean target.
+
+ To clean the build, of everything other than the downloaded third-party
+ dependencies use
+
+ ant clean
+
+ To clean the build, of everything, including the downloaded third-party
+ dependencies use
+
+ ant super-clean (which is just thirdparty-clean followed by clean)
+
+ To generate a source distribution package and a binary distribution package
+ use
+
+ ant -Dbuild.number=<YYYYMMDD> -Dbuild.noprompt= release
+
+ The packages can be found in the "out" subdirectory.
+
+ To build the ASDoc package
+
+ ant asdoc-package
+
+ To get a brief listing of all the targets type
+
+ ant -projecthelp
+
+
+Thanks for using Apache Flex BlazeDS. Enjoy!
+
+ The Apache Flex Project
+ <http://flex.apache.org>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/RELEASE_NOTES
----------------------------------------------------------------------
diff --git a/attic/RELEASE_NOTES b/attic/RELEASE_NOTES
new file mode 100644
index 0000000..48159ce
--- /dev/null
+++ b/attic/RELEASE_NOTES
@@ -0,0 +1,20 @@
+Apache Flex BlazeDS 4.7
+=================
+
+Apache Flex BlazeDS 4.7 is the first release of BlazeDS from Apache. Earlier
+releases were provided by Adobe Systems Inc.
+
+Known Issues
+_____________
+
+
+Differences from Adobe BlazeDS 4.6 include:
+
+TBD
+
+Please report new issues to our bugbase at:
+
+ https://issues.apache.org/jira/browse/FLEX
+
+ The Apache Flex Project
+ <http://flex.apache.org/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/WEB-INF/classes/commons-logging.properties
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/WEB-INF/classes/commons-logging.properties b/attic/apps/blazeds-spring/WEB-INF/classes/commons-logging.properties
new file mode 100755
index 0000000..b8a3e1f
--- /dev/null
+++ b/attic/apps/blazeds-spring/WEB-INF/classes/commons-logging.properties
@@ -0,0 +1,19 @@
+# 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.
+
+# suppress logging for 3rd-party libraries using commons-logging
+# Flex logging is not configured here. It is configured through in the logging section of flex-config.xml
+org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/WEB-INF/flex-servlet.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/WEB-INF/flex-servlet.xml b/attic/apps/blazeds-spring/WEB-INF/flex-servlet.xml
new file mode 100755
index 0000000..2388bce
--- /dev/null
+++ b/attic/apps/blazeds-spring/WEB-INF/flex-servlet.xml
@@ -0,0 +1,34 @@
+<?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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:flex="http://www.springframework.org/schema/flex"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/flex
+ http://www.springframework.org/schema/flex/spring-flex-1.5.xsd">
+
+ <flex:message-broker>
+ <flex:message-service
+ default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" />
+ <flex:secured />
+ </flex:message-broker>
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/WEB-INF/flex/messaging-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/WEB-INF/flex/messaging-config.xml b/attic/apps/blazeds-spring/WEB-INF/flex/messaging-config.xml
new file mode 100755
index 0000000..3357c06
--- /dev/null
+++ b/attic/apps/blazeds-spring/WEB-INF/flex/messaging-config.xml
@@ -0,0 +1,32 @@
+<?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.
+
+-->
+<service id="message-service"
+ class="flex.messaging.services.MessageService">
+
+ <adapters>
+ <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
+ <!-- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/> -->
+ </adapters>
+
+ <default-channels>
+ <channel ref="my-polling-amf"/>
+ </default-channels>
+
+</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/WEB-INF/flex/proxy-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/WEB-INF/flex/proxy-config.xml b/attic/apps/blazeds-spring/WEB-INF/flex/proxy-config.xml
new file mode 100755
index 0000000..fc14786
--- /dev/null
+++ b/attic/apps/blazeds-spring/WEB-INF/flex/proxy-config.xml
@@ -0,0 +1,43 @@
+<?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.
+
+-->
+<service id="proxy-service"
+ class="flex.messaging.services.HTTPProxyService">
+
+ <properties>
+ <connection-manager>
+ <max-total-connections>100</max-total-connections>
+ <default-max-connections-per-host>2</default-max-connections-per-host>
+ </connection-manager>
+ <allow-lax-ssl>true</allow-lax-ssl>
+ </properties>
+
+ <adapters>
+ <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
+ <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
+ </adapters>
+
+ <default-channels>
+ <channel ref="my-amf"/>
+ </default-channels>
+
+ <destination id="DefaultHTTP">
+ </destination>
+
+</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/WEB-INF/flex/remoting-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/WEB-INF/flex/remoting-config.xml b/attic/apps/blazeds-spring/WEB-INF/flex/remoting-config.xml
new file mode 100755
index 0000000..ae2de71
--- /dev/null
+++ b/attic/apps/blazeds-spring/WEB-INF/flex/remoting-config.xml
@@ -0,0 +1,31 @@
+<?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.
+
+-->
+<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>
+
+</service>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/WEB-INF/flex/services-config.xml b/attic/apps/blazeds-spring/WEB-INF/flex/services-config.xml
new file mode 100755
index 0000000..6fe3e6f
--- /dev/null
+++ b/attic/apps/blazeds-spring/WEB-INF/flex/services-config.xml
@@ -0,0 +1,117 @@
+<?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.
+
+-->
+<services-config>
+
+ <services>
+ <service-include file-path="remoting-config.xml" />
+ <service-include file-path="proxy-config.xml" />
+ <service-include file-path="messaging-config.xml" />
+ </services>
+
+ <security>
+ <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
+ <!-- Uncomment the correct app server
+ <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
+ <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
+ <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
+ <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
+ -->
+
+ <!--
+ <security-constraint id="basic-read-access">
+ <auth-method>Basic</auth-method>
+ <roles>
+ <role>guests</role>
+ <role>accountants</role>
+ <role>employees</role>
+ <role>managers</role>
+ </roles>
+ </security-constraint>
+ -->
+ </security>
+
+ <channels>
+
+ <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
+ </channel-definition>
+
+ <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
+ <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
+ <properties>
+ <add-no-cache-headers>false</add-no-cache-headers>
+ </properties>
+ </channel-definition>
+
+ <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
+ <properties>
+ <polling-enabled>true</polling-enabled>
+ <polling-interval-seconds>4</polling-interval-seconds>
+ </properties>
+ </channel-definition>
+
+ <!--
+ <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
+ </channel-definition>
+
+ <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
+ <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
+ <properties>
+ <add-no-cache-headers>false</add-no-cache-headers>
+ </properties>
+ </channel-definition>
+ -->
+ </channels>
+
+ <logging>
+ <target class="flex.messaging.log.ConsoleTarget" level="Error">
+ <properties>
+ <prefix>[BlazeDS] </prefix>
+ <includeDate>false</includeDate>
+ <includeTime>false</includeTime>
+ <includeLevel>false</includeLevel>
+ <includeCategory>false</includeCategory>
+ </properties>
+ <filters>
+ <pattern>Endpoint.*</pattern>
+ <pattern>Service.*</pattern>
+ <pattern>Configuration</pattern>
+ </filters>
+ </target>
+ </logging>
+
+ <system>
+ <redeploy>
+ <enabled>false</enabled>
+ <!--
+ <watch-interval>20</watch-interval>
+ <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
+ <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
+ -->
+ </redeploy>
+ </system>
+
+</services-config>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/WEB-INF/spring/app-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/WEB-INF/spring/app-config.xml b/attic/apps/blazeds-spring/WEB-INF/spring/app-config.xml
new file mode 100755
index 0000000..0fcc409
--- /dev/null
+++ b/attic/apps/blazeds-spring/WEB-INF/spring/app-config.xml
@@ -0,0 +1,29 @@
+<?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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:security="http://www.springframework.org/schema/security"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/WEB-INF/spring/infrastructure-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/WEB-INF/spring/infrastructure-config.xml b/attic/apps/blazeds-spring/WEB-INF/spring/infrastructure-config.xml
new file mode 100755
index 0000000..102da0f
--- /dev/null
+++ b/attic/apps/blazeds-spring/WEB-INF/spring/infrastructure-config.xml
@@ -0,0 +1,25 @@
+<?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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
+
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/blazeds-spring/WEB-INF/spring/security-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/blazeds-spring/WEB-INF/spring/security-config.xml b/attic/apps/blazeds-spring/WEB-INF/spring/security-config.xml
new file mode 100755
index 0000000..ffde5a5
--- /dev/null
+++ b/attic/apps/blazeds-spring/WEB-INF/spring/security-config.xml
@@ -0,0 +1,41 @@
+<?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.
+
+-->
+<beans:beans xmlns="http://www.springframework.org/schema/security"
+ xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
+
+ <http entry-point-ref="entryPoint">
+ <anonymous enabled="false"/>
+ </http>
+
+ <beans:bean id="entryPoint" class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>
+
+ <authentication-manager>
+ <authentication-provider>
+ <user-service>
+ <user name="john" password="john" authorities="ROLE_USER" />
+ <user name="admin" password="admin" authorities="ROLE_USER, ROLE_ADMIN" />
+ <user name="guest" password="guest" authorities="ROLE_GUEST" />
+ </user-service>
+ </authentication-provider>
+ </authentication-manager>
+
+</beans:beans>
\ No newline at end of file
[44/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/src/companymgr.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/companymgr.mxml b/apps/samples-spring/WEB-INF/flex-src/companymgr/src/companymgr.mxml
deleted file mode 100755
index d6d1fcf..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/companymgr.mxml
+++ /dev/null
@@ -1,130 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
- applicationComplete="init()">
-
- <fx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.controls.Alert;
- import mx.collections.ArrayCollection;
- import mx.rpc.events.ResultEvent;
-
- [Bindable] private var companies:ArrayCollection;
- [Bindable] private var industries:ArrayCollection;
-
- private function init():void
- {
- roIndustry.findAll();
- }
-
- private function company_findByName_resultHandler(event:ResultEvent):void
- {
- companies = event.result as ArrayCollection
- }
-
- private function industry_findAll_resultHandler(event:ResultEvent):void
- {
- industries = event.result as ArrayCollection
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
- public function openCompany(company:Company):void
- {
- var children:Array = tn.getChildren();
- for (var i:int = 0; i<children.length; i++)
- {
- if (CompanyForm(children[i]).company.id == company.id)
- {
- tn.selectedChild = children[i];
- return;
- }
- }
-
- var form:CompanyForm = new CompanyForm();
- form.addEventListener(CompanyEvent.CREATED, companyCreatedHandler);
- form.addEventListener(CompanyEvent.UPDATED, companyUpdatedHandler);
- form.addEventListener(CompanyEvent.DELETED, companyDeletedHandler);
- tn.addChild(form);
- form.company = company;
- form.industries = industries;
- tn.selectedChild = form;
- }
-
- private function search():void
- {
- roCompany.findByName(searchStr.text);
- }
-
- private function companyCreatedHandler(event:CompanyEvent):void
- {
- search();
- }
-
- private function companyUpdatedHandler(event:CompanyEvent):void
- {
- search();
- }
-
- private function companyDeletedHandler(event:CompanyEvent):void
- {
- tn.removeChild(event.target as CompanyForm);
- search();
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <s:RemoteObject id="roCompany" destination="companyService" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <s:method name="findByName" result="company_findByName_resultHandler(event)"/>
- </s:RemoteObject>
-
- <s:RemoteObject id="roIndustry" destination="industryService" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <s:method name="findAll" result="industry_findAll_resultHandler(event)"/>
- </s:RemoteObject>
- </fx:Declarations>
-
- <s:controlBarContent>
- <s:TextInput id="searchStr"/>
- <s:Button label="Search" click="search()"/>
- <s:Button label="New Company" click="openCompany(new Company())"/>
- </s:controlBarContent>
-
- <mx:HDividedBox top="8" bottom="8" left="8" right="8">
- <mx:DataGrid id="dg" dataProvider="{companies}" width="30%" height="100%"
- doubleClickEnabled="{dg.selectedItem != null}"
- doubleClick="openCompany(dg.selectedItem as Company)">
- <mx:columns>
- <mx:DataGridColumn dataField="name" headerText="Name"/>
- <mx:DataGridColumn dataField="city" headerText="City"/>
- </mx:columns>
- </mx:DataGrid>
- <mx:TabNavigator id="tn" width="70%" height="100%"/>
- </mx:HDividedBox>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/feedstarter/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/feedstarter/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/feedstarter/.actionScriptProperties
deleted file mode 100755
index 07db27c..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/feedstarter/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="feedstarter.mxml" projectUUID="41a33f5d-7732-4b6b-a1c2-dac03458be92" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="feedstarter.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/feedstarter/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/feedstarter/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/feedstarter/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/feedstarter/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/feedstarter/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/feedstarter/.project b/apps/samples-spring/WEB-INF/flex-src/feedstarter/.project
deleted file mode 100755
index 582bf63..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/feedstarter/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>feedstarter</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/feedstarter/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/feedstarter/build.xml b/apps/samples-spring/WEB-INF/flex-src/feedstarter/build.xml
deleted file mode 100755
index d74e1db..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/feedstarter/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="feedstarter" />
- <property name="application.file" value="feedstarter" />
- <property name="application.bin.dir" value="${samples-spring.war}/feedstarter" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/feedstarter/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/feedstarter/src/feedstarter.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/feedstarter/src/feedstarter.mxml b/apps/samples-spring/WEB-INF/flex-src/feedstarter/src/feedstarter.mxml
deleted file mode 100755
index 524e150..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/feedstarter/src/feedstarter.mxml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx">
-
- <fx:Declarations>
-
- <mx:ChannelSet id="cs">
- <mx:AMFChannel uri="/samples-spring/messagebroker/amf"/>
- </mx:ChannelSet>
-
- <mx:RemoteObject id="simpleFeedStarter" destination="simpleFeedStarter" channelSet="{cs}"/>
- <mx:RemoteObject id="marketFeedStarter" destination="marketFeedStarter" channelSet="{cs}"/>
-
- </fx:Declarations>
-
- <s:layout>
- <s:VerticalLayout paddingTop="20" paddingLeft="20" gap="20"/>
- </s:layout>
-
- <s:Label text="Feed Administration" fontSize="18" fontWeight="bold"/>
-
- <s:HGroup verticalAlign="middle">
- <s:Label text="Simple Feed" width="120"/>
- <s:Button label="Start" click="simpleFeedStarter.start()"/>
- <s:Button label="Stop" click="simpleFeedStarter.stop()"/>
- </s:HGroup>
-
- <s:HGroup verticalAlign="middle">
- <s:Label text="Market Feed" width="120"/>
- <s:Button label="Start" click="marketFeedStarter.start()"/>
- <s:Button label="Stop" click="marketFeedStarter.stop()"/>
- </s:HGroup>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync01/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync01/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/insync01/.actionScriptProperties
deleted file mode 100755
index 1bb4b6f..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync01/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="insync01.mxml" projectUUID="f3f5b870-6817-40ea-a5e2-dce3eb832d79" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="insync01.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync01/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync01/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/insync01/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync01/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
[10/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/Contact.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/Contact.as b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/Contact.as
new file mode 100755
index 0000000..89599ea
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/Contact.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ [Bindable]
+ [RemoteClass(alias="org.springframework.flex.samples.contact.Contact")]
+ public class Contact
+ {
+ public var id:int = -1;
+ public var firstName:String;
+ public var lastName:String;
+ public var email:String;
+ public var phone:String;
+ public var address:String;
+ public var city:String;
+ public var state:String;
+ public var zip:String;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactEvent.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactEvent.as b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactEvent.as
new file mode 100755
index 0000000..73c361c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactEvent.as
@@ -0,0 +1,37 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ import flash.events.Event;
+
+ public class ContactEvent extends Event
+ {
+ public static const CREATED:String = "contactCreated";
+ public static const UPDATED:String = "contactUpdated";
+ public static const DELETED:String = "contactDeleted";
+
+ public var contact:Contact;
+
+ public function ContactEvent(type:String, contact:Contact, bubbles:Boolean = true, cancelable:Boolean = false)
+ {
+ this.contact = contact;
+ super(type, bubbles, cancelable);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactForm.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactForm.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactForm.mxml
new file mode 100755
index 0000000..b8dd3a8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactForm.mxml
@@ -0,0 +1,138 @@
+<?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:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
+ label="{contact.id>-1?contact.firstName+' '+contact.lastName:'New Contact'}">
+
+ <fx:Metadata>
+ [Event(name="contactCreated", type="ContactEvent")]
+ [Event(name="contactUpdated", type="ContactEvent")]
+ [Event(name="contactDeleted", type="ContactEvent")]
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.rpc.events.FaultEvent;
+ import mx.rpc.events.ResultEvent;
+ import mx.controls.Alert;
+
+ [Bindable] public var contact:Contact;
+
+ private function save():void
+ {
+ contact.firstName = firstName.text;
+ contact.lastName = lastName.text;
+ contact.email = email.text;
+ contact.phone = phone.text;
+ contact.address = address.text;
+ contact.city = city.text;
+ contact.state = state.text;
+ contact.zip = zip.text;
+ if (contact.id == -1)
+ {
+ ro.create(contact);
+ }
+ else
+ {
+ ro.update(contact);
+ }
+ }
+
+ private function deleteItem():void
+ {
+ ro.remove(contact);
+ }
+
+ private function closeItem():void
+ {
+ parent.removeChild(this);
+ }
+
+ private function create_resultHandler(event:ResultEvent):void
+ {
+ contact.id = event.result.id;
+ dispatchEvent(new ContactEvent(ContactEvent.CREATED, contact));
+ }
+
+ private function update_resultHandler(event:ResultEvent):void
+ {
+ dispatchEvent(new ContactEvent(ContactEvent.UPDATED, contact));
+ }
+
+ private function remove_resultHandler(event:ResultEvent):void
+ {
+ dispatchEvent(new ContactEvent(ContactEvent.DELETED, contact));
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <mx:method name="create" result="create_resultHandler(event)"/>
+ <mx:method name="update" result="update_resultHandler(event)"/>
+ <mx:method name="remove" result="remove_resultHandler(event)"/>
+ </mx:RemoteObject>
+ </fx:Declarations>
+
+ <mx:Form>
+ <mx:FormItem label="Id">
+ <mx:TextInput text="{contact.id}" enabled="false"/>
+ </mx:FormItem>
+ <mx:FormItem label="First Name">
+ <mx:TextInput id="firstName" text="{contact.firstName}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Last Name">
+ <mx:TextInput id="lastName" text="{contact.lastName}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Email">
+ <mx:TextInput id="email" text="{contact.email}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Phone">
+ <mx:TextInput id="phone" text="{contact.phone}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Address">
+ <mx:TextInput id="address" text="{contact.address}"/>
+ </mx:FormItem>
+ <mx:FormItem label="City">
+ <mx:TextInput id="city" text="{contact.city}"/>
+ </mx:FormItem>
+ <mx:FormItem label="State">
+ <mx:TextInput id="state" text="{contact.state}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Zip">
+ <mx:TextInput id="zip" text="{contact.zip}"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ <s:HGroup left="8" bottom="8">
+ <s:Button label="Close" click="closeItem()"/>
+ <s:Button label="Save" click="save()"/>
+ <s:Button label="Delete" click="deleteItem()"/>
+ </s:HGroup>
+
+</mx:Canvas>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/insync06.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/insync06.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/insync06.mxml
new file mode 100755
index 0000000..a1570de
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/src/insync06.mxml
@@ -0,0 +1,114 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+ import mx.controls.Alert;
+ import mx.rpc.events.FaultEvent;
+ import mx.rpc.events.ResultEvent;
+
+ [Bindable] private var contacts:ArrayCollection;
+
+ private function resultHandler(event:ResultEvent):void
+ {
+ contacts = event.result as ArrayCollection
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+ public function openContact(contact:Contact):void
+ {
+ var children:Array = tn.getChildren();
+ for (var i:int = 0; i<children.length; i++)
+ {
+ if (ContactForm(children[i]).contact.id == contact.id)
+ {
+ tn.selectedChild = children[i];
+ return;
+ }
+ }
+
+ var form:ContactForm = new ContactForm();
+ form.addEventListener(ContactEvent.CREATED, contactCreatedHandler);
+ form.addEventListener(ContactEvent.UPDATED, contactUpdatedHandler);
+ form.addEventListener(ContactEvent.DELETED, contactDeletedHandler);
+ tn.addChild(form);
+ form.contact = contact;
+ tn.selectedChild = form;
+ }
+
+ private function search():void
+ {
+ ro.findByName(searchStr.text);
+ }
+
+ private function contactCreatedHandler(event:ContactEvent):void
+ {
+ search();
+ }
+
+ private function contactUpdatedHandler(event:ContactEvent):void
+ {
+ search();
+ }
+
+ private function contactDeletedHandler(event:ContactEvent):void
+ {
+ tn.removeChild(event.target as ContactForm);
+ search();
+ }
+
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <s:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <s:method name="findByName" result="resultHandler(event)"/>
+ </s:RemoteObject>
+ </fx:Declarations>
+
+ <s:controlBarContent>
+ <s:TextInput id="searchStr"/>
+ <s:Button label="Search" click="search()"/>
+ <mx:Button label="New Contact" click="openContact(new Contact())"/>
+ </s:controlBarContent>
+
+ <mx:HDividedBox top="8" left="8" right="8" bottom="8">
+ <mx:DataGrid id="dg" dataProvider="{contacts}" width="30%" height="100%"
+ doubleClickEnabled="{dg.selectedItem != null}"
+ doubleClick="openContact(dg.selectedItem as Contact)">
+ <mx:columns>
+ <mx:DataGridColumn dataField="firstName" headerText="First Name"/>
+ <mx:DataGridColumn dataField="lastName" headerText="Last Name"/>
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:TabNavigator id="tn" width="70%" height="100%"/>
+ </mx:HDividedBox>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.actionScriptProperties
new file mode 100755
index 0000000..40b04b0
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="simplepush.mxml" projectUUID="8054d1ac-d0ae-40e5-b6a0-30b8baec27da" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="simplepush.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.project b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.project
new file mode 100755
index 0000000..16bfe4a
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>simplepush</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/build.xml
new file mode 100755
index 0000000..bd24686
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="simplepush" />
+ <property name="application.file" value="simplepush" />
+ <property name="application.bin.dir" value="${samples-spring.war}/simplepush" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/simplepush/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[43/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync01/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync01/.project b/apps/samples-spring/WEB-INF/flex-src/insync01/.project
deleted file mode 100755
index 89e861d..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync01/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>insync01</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync01/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync01/build.xml b/apps/samples-spring/WEB-INF/flex-src/insync01/build.xml
deleted file mode 100755
index fd6f62a..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync01/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="insync01" />
- <property name="application.file" value="insync01" />
- <property name="application.bin.dir" value="${samples-spring.war}/insync01" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync01/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync01/src/insync01.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync01/src/insync01.mxml b/apps/samples-spring/WEB-INF/flex-src/insync01/src/insync01.mxml
deleted file mode 100755
index f1058dd..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync01/src/insync01.mxml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%">
-
- <fx:Declarations>
- <s:RemoteObject id="ro" destination="contactService" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}"/>
- </fx:Declarations>
-
- <s:controlBarContent>
- <s:TextInput id="searchStr"/>
- <s:Button label="Search" click="ro.findByName(searchStr.text)"/>
- </s:controlBarContent>
-
- <mx:DataGrid id="dg" dataProvider="{ro.findByName.lastResult}" top="8" left="8" right="8" bottom="8"/>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync02/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync02/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/insync02/.actionScriptProperties
deleted file mode 100755
index 70165f6..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync02/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="insync02.mxml" projectUUID="f975ff1e-3bc6-433b-a8f8-43e3a6349ba6" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="insync02.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync02/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync02/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/insync02/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync02/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync02/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync02/.project b/apps/samples-spring/WEB-INF/flex-src/insync02/.project
deleted file mode 100755
index 832af5e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync02/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>insync02</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync02/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync02/build.xml b/apps/samples-spring/WEB-INF/flex-src/insync02/build.xml
deleted file mode 100755
index bf2bedc..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync02/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="insync02" />
- <property name="application.file" value="insync02" />
- <property name="application.bin.dir" value="${samples-spring.war}/insync02" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync02/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
[37/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/simplepush/src/simplepush.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/simplepush/src/simplepush.mxml b/apps/samples-spring/WEB-INF/flex-src/simplepush/src/simplepush.mxml
deleted file mode 100755
index 612c623..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/simplepush/src/simplepush.mxml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx">
-
- <fx:Script>
- <![CDATA[
-
- import mx.messaging.messages.IMessage;
-
- private function messageHandler(message:IMessage):void
- {
- pushedValue.text = ""+ message.body;
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <mx:ChannelSet id="cs">
- <mx:StreamingAMFChannel uri="/samples-spring/messagebroker/streamingamf"/>
- <mx:AMFChannel uri="/samples-spring/messagebroker/amflongpolling"/>
- <mx:AMFChannel uri="/samples-spring/messagebroker/amfpolling"/>
- </mx:ChannelSet>
-
- <mx:Consumer id="consumer" destination="simple-feed" channelSet="{cs}"
- message="messageHandler(event.message)"/>
- </fx:Declarations>
-
- <s:TextInput id="pushedValue" width="250" verticalCenter="0" horizontalCenter="0"/>
-
- <s:Button label="Subscribe" click="consumer.subscribe()" enabled="{!consumer.subscribed}" verticalCenter="30" horizontalCenter="-50"/>
- <s:Button label="Unsubscribe" click="consumer.unsubscribe()" enabled="{consumer.subscribed}" verticalCenter="30" horizontalCenter="50"/>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.actionScriptProperties
deleted file mode 100755
index 58c6481..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="Main.mxml" projectUUID="f21aa2f0-00b4-41cf-8fec-e942e9473bf9" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="Main.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.project b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.project
deleted file mode 100755
index 4372b24..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>spring-blazeds-101</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/build.xml b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/build.xml
deleted file mode 100755
index bbcbc16..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="spring-blazeds-101" />
- <property name="application.file" value="Main" />
- <property name="application.bin.dir" value="${samples-spring.war}/spring-blazeds-101" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/spring-blazeds-101/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
[05/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/spring/app-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/spring/app-config.xml b/attic/apps/samples-spring/WEB-INF/spring/app-config.xml
new file mode 100755
index 0000000..1ad0b11
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/spring/app-config.xml
@@ -0,0 +1,58 @@
+<?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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:security="http://www.springframework.org/schema/security"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/security
+ http://www.springframework.org/schema/security/spring-security-3.0.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+ <!--
+ Enable annotation-based configuration. companyService and industryService
+ (used in the Company Manager sample) are configured using annotations.
+ Open CompanyDAO.java and IndustryDAO.java for details.
+ -->
+ <context:annotation-config />
+ <context:component-scan base-package="org.springframework.flex.samples" />
+
+ <!-- Implementation of ProductDAO using low-level JDBC -->
+ <bean id="productService" class="org.springframework.flex.samples.product.ProductDAO">
+ <constructor-arg ref="dataSource" />
+ </bean>
+
+ <!-- Implementation of ContactDAO using Spring's JdbcTemplate -->
+ <bean id="contactService" class="org.springframework.flex.samples.contact.ContactDAO">
+ <constructor-arg ref="dataSource" />
+ </bean>
+
+ <!-- A secured implementation of ProductDAO -->
+ <bean id="securedProductService" class="org.springframework.flex.samples.product.ProductDAO">
+ <constructor-arg ref="dataSource" />
+ <security:intercept-methods>
+ <security:protect method="find*" access="ROLE_USER" />
+ </security:intercept-methods>
+ </bean>
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/spring/infrastructure-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/spring/infrastructure-config.xml b/attic/apps/samples-spring/WEB-INF/spring/infrastructure-config.xml
new file mode 100755
index 0000000..96413af
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/spring/infrastructure-config.xml
@@ -0,0 +1,41 @@
+<?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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:jdbc="http://www.springframework.org/schema/jdbc"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:amq="http://activemq.apache.org/schema/core"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/jdbc
+ http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd">
+
+ <!-- Create and populate the tables of the embedded database -->
+ <bean id="dbInit" class="org.springframework.flex.samples.util.DatabaseInitializer">
+ <constructor-arg ref="dataSource" />
+ </bean>
+
+ <!--
+ Simple Spring-managed DataSource for embedded HSQL database
+ The dbInit bean takes care of creating and populating the sample tables.
+ -->
+ <jdbc:embedded-database id="dataSource" type="HSQL" />
+
+</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/spring/security-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/spring/security-config.xml b/attic/apps/samples-spring/WEB-INF/spring/security-config.xml
new file mode 100755
index 0000000..802973d
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/spring/security-config.xml
@@ -0,0 +1,43 @@
+<?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.
+
+-->
+<beans:beans xmlns="http://www.springframework.org/schema/security"
+ xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
+
+ <http entry-point-ref="entryPoint">
+ <anonymous enabled="false"/>
+ <form-login default-target-url="/spring-blazeds-security-101/index.html" login-page="/login.jsp" />
+ </http>
+
+ <beans:bean id="entryPoint"
+ class="org.springframework.flex.security3.FlexAuthenticationEntryPoint"/>
+
+ <authentication-manager>
+ <authentication-provider>
+ <user-service>
+ <user name="john" password="john" authorities="ROLE_USER" />
+ <user name="admin" password="admin" authorities="ROLE_USER, ROLE_ADMIN" />
+ <user name="guest" password="guest" authorities="ROLE_GUEST" />
+ </user-service>
+ </authentication-provider>
+ </authentication-manager>
+
+</beans:beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/.classpath
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/.classpath b/attic/apps/samples-spring/WEB-INF/src/spring-samples/.classpath
new file mode 100755
index 0000000..f5f24a9
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/.classpath
@@ -0,0 +1,68 @@
+<?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.
+
+-->
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/aopalliance-1.0.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/aspectjrt-1.6.3.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/aspectjweaver-1.6.5.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/backport-util-concurrent-2.2.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/cglib-nodep-2.1_3.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/commons-codec-1.3.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/commons-httpclient-3.1.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/commons-logging-1.1.1.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-messaging-common.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-messaging-core.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-messaging-opt.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-messaging-proxy.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-messaging-remoting.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-rds-server.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/hsqldb.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/jackson-core-asl-1.0.0.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/jstl-1.1.2.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.aop-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.asm-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.aspects-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.beans-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.context.support-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.context-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.core-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.expression-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.flex-1.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.instrument.tomcat-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.instrument-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.integration-1.0.4.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.jdbc-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.jms-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.orm-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.oxm-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.test-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.transaction-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.web.portlet-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.web.servlet-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.web.struts-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.web-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/spring-security-config-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/spring-security-core-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/spring-security-web-3.0.3.RELEASE.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR/standard-1.1.2.jar"/>
+ <classpathentry kind="var" path="WEBAPP_LIB_DIR"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/.project b/attic/apps/samples-spring/WEB-INF/src/spring-samples/.project
new file mode 100755
index 0000000..fa94ab5
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/.project
@@ -0,0 +1,35 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>spring-samples</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/Company.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/Company.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/Company.java
new file mode 100755
index 0000000..f220d2f
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/Company.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.company;
+
+import java.io.Serializable;
+
+import org.springframework.flex.samples.industry.Industry;
+
+public class Company implements Serializable {
+
+ static final long serialVersionUID = 103844514947365244L;
+
+ private int id;
+
+ private String name;
+
+ private String address;
+
+ private String city;
+
+ private String state;
+
+ private String zip;
+
+ private String phone;
+
+ private Industry industry;
+
+ public Company() {
+
+ }
+
+ public int getId() {
+ return this.id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getAddress() {
+ return this.address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getCity() {
+ return this.city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getState() {
+ return this.state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getZip() {
+ return this.zip;
+ }
+
+ public void setZip(String zip) {
+ this.zip = zip;
+ }
+
+ public String getPhone() {
+ return this.phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+
+ public Industry getIndustry() {
+ return this.industry;
+ }
+
+ public void setIndustry(Industry industry) {
+ this.industry = industry;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/CompanyDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/CompanyDAO.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/CompanyDAO.java
new file mode 100755
index 0000000..713e56f
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/CompanyDAO.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.company;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.sql.DataSource;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.flex.remoting.RemotingDestination;
+import org.springframework.flex.remoting.RemotingExclude;
+import org.springframework.flex.remoting.RemotingInclude;
+import org.springframework.flex.samples.industry.IIndustryDAO;
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
+import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
+import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
+import org.springframework.stereotype.Service;
+
+@Service("companyService")
+@RemotingDestination(channels = { "my-amf" })
+public class CompanyDAO implements ICompanyDAO {
+
+ private final SimpleJdbcTemplate template;
+
+ private final SimpleJdbcInsert insertCompany;
+
+ private final IIndustryDAO industryDAO;
+
+ private final RowMapper<Company> rowMapper = new ParameterizedRowMapper<Company>() {
+
+ public Company mapRow(ResultSet rs, int rowNum) throws SQLException {
+ Company company = new Company();
+ company.setId(rs.getInt("id"));
+ company.setName(rs.getString("name"));
+ company.setAddress(rs.getString("address"));
+ company.setCity(rs.getString("city"));
+ company.setState(rs.getString("state"));
+ company.setZip(rs.getString("zip"));
+ company.setPhone(rs.getString("phone"));
+ company.setIndustry(CompanyDAO.this.industryDAO.findById(rs.getInt("industry_id")));
+ return company;
+ }
+ };
+
+ @Autowired
+ public CompanyDAO(DataSource dataSource, IIndustryDAO industryDAO) {
+ this.template = new SimpleJdbcTemplate(dataSource);
+ this.insertCompany = new SimpleJdbcInsert(dataSource).withTableName("COMPANY").usingGeneratedKeyColumns("ID");
+ this.industryDAO = industryDAO;
+ }
+
+ @RemotingInclude
+ public Company findById(int id) {
+ return this.template.queryForObject("SELECT * FROM company WHERE id=?", this.rowMapper, id);
+ }
+
+ @RemotingInclude
+ public List<Company> findAll() {
+ return this.template.query("SELECT * FROM company ORDER BY name", this.rowMapper);
+ }
+
+ @RemotingInclude
+ public List<Company> findByName(String name) {
+ return this.template.query("SELECT * FROM company WHERE UPPER(name) LIKE ? ORDER BY name", this.rowMapper, "%" + name.toUpperCase() + "%");
+ }
+
+ @RemotingInclude
+ public Company create(Company company) {
+ Map<String, Object> parameters = new HashMap<String, Object>();
+ parameters.put("name", company.getName());
+ parameters.put("address", company.getAddress());
+ parameters.put("city", company.getCity());
+ parameters.put("state", company.getState());
+ parameters.put("zip", company.getZip());
+ parameters.put("phone", company.getPhone());
+ parameters.put("industry_id", company.getIndustry().getId());
+ Number id = this.insertCompany.executeAndReturnKey(parameters);
+ company.setId(id.intValue());
+ return company;
+ }
+
+ @RemotingInclude
+ public boolean update(Company company) {
+ int count = this.template.update("UPDATE company SET name=?, address=?, city=?, state=?, zip=?, phone=?, industry_id=? WHERE id=?",
+ company.getName(), company.getAddress(), company.getCity(), company.getState(), company.getZip(), company.getPhone(),
+ company.getIndustry().getId(), company.getId());
+ return count == 1;
+ }
+
+ @RemotingExclude
+ public boolean remove(Company company) {
+ int count = this.template.update("DELETE FROM company WHERE id=?", company.getId());
+ return count == 1;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/ICompanyDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/ICompanyDAO.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/ICompanyDAO.java
new file mode 100755
index 0000000..30e66df
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/ICompanyDAO.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.company;
+
+import org.springframework.flex.samples.dao.IGenericDAO;
+
+public interface ICompanyDAO extends IGenericDAO<Company> {
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/Contact.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/Contact.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/Contact.java
new file mode 100755
index 0000000..364e128
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/Contact.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.contact;
+
+import java.io.Serializable;
+
+public class Contact implements Serializable {
+
+ static final long serialVersionUID = 103844514947365244L;
+
+ private int id;
+
+ private String firstName;
+
+ private String lastName;
+
+ private String address;
+
+ private String city;
+
+ private String state;
+
+ private String zip;
+
+ private String phone;
+
+ private String email;
+
+ public Contact() {
+
+ }
+
+ public int getId() {
+ return this.id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getFirstName() {
+ return this.firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return this.lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getAddress() {
+ return this.address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getCity() {
+ return this.city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getState() {
+ return this.state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getZip() {
+ return this.zip;
+ }
+
+ public void setZip(String zip) {
+ this.zip = zip;
+ }
+
+ public String getPhone() {
+ return this.phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+
+ public String getEmail() {
+ return this.email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/ContactDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/ContactDAO.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/ContactDAO.java
new file mode 100755
index 0000000..8c7115a
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/ContactDAO.java
@@ -0,0 +1,107 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+ /*
+ * This file has been modified by Adobe (Adobe Systems Incorporated).
+ * Date: April 10, 2010
+ * Reason: Migrated the DB used for samples-spring web app to HSQL.
+ */
+
+package org.springframework.flex.samples.contact;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.sql.DataSource;
+
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
+import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
+import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
+
+public class ContactDAO implements IContactDAO {
+
+ private final SimpleJdbcTemplate template;
+
+ private final SimpleJdbcInsert insertContact;
+
+ private final RowMapper<Contact> rowMapper = new ParameterizedRowMapper<Contact>() {
+
+ public Contact mapRow(ResultSet rs, int rowNum) throws SQLException {
+ Contact contact = new Contact();
+ contact.setId(rs.getInt("id"));
+ contact.setFirstName(rs.getString("first_name"));
+ contact.setLastName(rs.getString("last_name"));
+ contact.setAddress(rs.getString("address"));
+ contact.setCity(rs.getString("city"));
+ contact.setState(rs.getString("state"));
+ contact.setZip(rs.getString("zip"));
+ contact.setPhone(rs.getString("phone"));
+ contact.setEmail(rs.getString("email"));
+ return contact;
+ }
+ };
+
+ public ContactDAO(DataSource dataSource) {
+ this.template = new SimpleJdbcTemplate(dataSource);
+ this.insertContact = new SimpleJdbcInsert(dataSource).withTableName("CONTACT").usingGeneratedKeyColumns("ID");
+ }
+
+ public List<Contact> findAll() {
+ return this.template.query("SELECT * FROM contact ORDER BY first_name, last_name", this.rowMapper);
+ }
+
+ public List<Contact> findByName(String name) {
+ return this.template.query("SELECT * FROM contact WHERE UPPER(CONCAT(CONCAT(first_name, ' '), last_name)) LIKE ? ORDER BY first_name, last_name",
+ this.rowMapper, "%" + name.toUpperCase() + "%");
+ }
+
+ public Contact findById(int id) {
+ return this.template.queryForObject("SELECT * FROM contact WHERE id=?", this.rowMapper, id);
+ }
+
+ public Contact create(Contact contact) {
+ Map<String, Object> parameters = new HashMap<String, Object>();
+ parameters.put("first_name", contact.getFirstName());
+ parameters.put("last_name", contact.getLastName());
+ parameters.put("address", contact.getAddress());
+ parameters.put("city", contact.getCity());
+ parameters.put("state", contact.getState());
+ parameters.put("zip", contact.getZip());
+ parameters.put("phone", contact.getPhone());
+ parameters.put("email", contact.getEmail());
+ Number id = this.insertContact.executeAndReturnKey(parameters);
+ contact.setId(id.intValue());
+ return contact;
+ }
+
+ public boolean update(Contact contact) {
+ int count = this.template.update(
+ "UPDATE contact SET first_name=?, last_name=?, address=?, city=?, state=?, zip=?, phone=?, email=? WHERE id=?", contact.getFirstName(),
+ contact.getLastName(), contact.getAddress(), contact.getCity(), contact.getState(), contact.getZip(), contact.getPhone(),
+ contact.getEmail(), contact.getId());
+ return count == 1;
+ }
+
+ public boolean remove(Contact contact) {
+ int count = this.template.update("DELETE FROM contact WHERE id=?", contact.getId());
+ return count == 1;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/IContactDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/IContactDAO.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/IContactDAO.java
new file mode 100755
index 0000000..5096acf
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/IContactDAO.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.contact;
+
+import org.springframework.flex.samples.dao.IGenericDAO;
+
+public interface IContactDAO extends IGenericDAO<Contact> {
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/dao/IGenericDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/dao/IGenericDAO.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/dao/IGenericDAO.java
new file mode 100755
index 0000000..ecd5a6e
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/dao/IGenericDAO.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.dao;
+
+import java.util.List;
+
+public interface IGenericDAO<T> {
+
+ public List<T> findAll();
+
+ public List<T> findByName(String name);
+
+ public T findById(int id);
+
+ public T create(T item);
+
+ public boolean update(T item);
+
+ public boolean remove(T item);
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IIndustryDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IIndustryDAO.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IIndustryDAO.java
new file mode 100755
index 0000000..2444f6f
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IIndustryDAO.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.industry;
+
+import org.springframework.flex.samples.dao.IGenericDAO;
+
+public interface IIndustryDAO extends IGenericDAO<Industry> {
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/Industry.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/Industry.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/Industry.java
new file mode 100755
index 0000000..92292b2
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/Industry.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.industry;
+
+import java.io.Serializable;
+
+public class Industry implements Serializable {
+
+ static final long serialVersionUID = 103844514947365244L;
+
+ private int id;
+
+ private String name;
+
+ public Industry() {
+
+ }
+
+ public int getId() {
+ return this.id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IndustryDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IndustryDAO.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IndustryDAO.java
new file mode 100755
index 0000000..47cda01
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IndustryDAO.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.industry;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.sql.DataSource;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.flex.remoting.RemotingDestination;
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
+import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
+import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
+import org.springframework.stereotype.Service;
+
+@Service("industryService")
+@RemotingDestination(channels = { "my-amf" })
+public class IndustryDAO implements IIndustryDAO {
+
+ private final SimpleJdbcTemplate template;
+
+ private final SimpleJdbcInsert insertIndustry;
+
+ private final RowMapper<Industry> rowMapper = new ParameterizedRowMapper<Industry>() {
+
+ public Industry mapRow(ResultSet rs, int rowNum) throws SQLException {
+ Industry industry = new Industry();
+ industry.setId(rs.getInt("id"));
+ industry.setName(rs.getString("name"));
+ return industry;
+ }
+ };
+
+ public List<Industry> findAll() {
+ return this.template.query("SELECT * FROM industry ORDER BY name", this.rowMapper);
+ }
+
+ public List<Industry> findByName(String name) {
+ return this.template.query("SELECT * FROM industry WHERE UPPER(name) LIKE ? ORDER BY name", this.rowMapper, "%" + name.toUpperCase() + "%");
+ }
+
+ @Autowired
+ public IndustryDAO(DataSource dataSource) {
+ this.template = new SimpleJdbcTemplate(dataSource);
+ this.insertIndustry = new SimpleJdbcInsert(dataSource).withTableName("INDUSTRY").usingGeneratedKeyColumns("ID");
+ }
+
+ public Industry findById(int id) {
+ return this.template.queryForObject("SELECT * FROM industry WHERE id=?", this.rowMapper, id);
+ }
+
+ public Industry create(Industry industry) {
+ Map<String, Object> parameters = new HashMap<String, Object>();
+ parameters.put("name", industry.getName());
+ Number id = this.insertIndustry.executeAndReturnKey(parameters);
+ industry.setId(id.intValue());
+ return industry;
+ }
+
+ public boolean update(Industry industry) {
+ int count = this.template.update("UPDATE industry SET name=? WHERE id=?", industry.getName());
+ return count == 1;
+ }
+
+ public boolean remove(Industry industry) {
+ int count = this.template.update("DELETE FROM industry WHERE id=?", industry.getId());
+ return count == 1;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/integration/Counter.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/integration/Counter.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/integration/Counter.java
new file mode 100755
index 0000000..b7dd467
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/integration/Counter.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.integration;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class Counter {
+
+ private volatile boolean running;
+
+ private final Log log = LogFactory.getLog(Counter.class);
+
+ private final AtomicInteger count = new AtomicInteger();
+
+ public Integer next() {
+ return this.running ? this.count.getAndIncrement() : null;
+ }
+
+ public void handle(String message) {
+ if ("start".equalsIgnoreCase(message)) {
+ this.running = true;
+ } else if ("stop".equalsIgnoreCase(message)) {
+ this.running = false;
+ } else {
+ try {
+ this.count.set(Integer.parseInt(message));
+ } catch (NumberFormatException e) {
+ this.log.info("UNSUPPORTED FLEX MESSAGE RECEIVED: " + message);
+ }
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/MarketFeed.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/MarketFeed.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/MarketFeed.java
new file mode 100755
index 0000000..db0423f
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/MarketFeed.java
@@ -0,0 +1,196 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+ /*
+ * This file has been modified by Adobe (Adobe Systems Incorporated).
+ * Date: May 19, 2010
+ * Reason(s): Fixed the following issues:
+ * BLZ-533: unexploded war fails to deploy on weblogic
+ *
+ * Date: Oct 7, 2010
+ * Reason(s): Fixed the following issues:
+ * BLZ-573: Cannot create a new company in Company Manager Sample in Spring BlazeDS Integration Test Drive
+ * BLZ-574: Error in creating new contact in insync05 sample in Spring BlazeDS Integration test drive
+ */
+
+package org.springframework.flex.samples.marketfeed;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Random;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.springframework.core.io.Resource;
+import org.springframework.flex.messaging.AsyncMessageCreator;
+import org.springframework.flex.messaging.MessageTemplate;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import flex.messaging.messages.AsyncMessage;
+
+public class MarketFeed {
+
+ private static FeedThread thread;
+
+ private final MessageTemplate template;
+
+ private final List<Stock> stockList;
+
+ public MarketFeed(MessageTemplate template, Resource filePath) throws IOException {
+ this.template = template;
+ this.stockList = getStocks(filePath.getInputStream());
+ }
+
+ public void start() {
+ if (thread == null) {
+ thread = new FeedThread(this.template, this.stockList);
+ thread.start();
+ }
+ }
+
+ public void stop() {
+ if (thread != null) {
+ thread.running = false;
+ thread = null;
+ }
+ }
+
+ private List<Stock> getStocks(InputStream fileInputStream) {
+
+ List<Stock> list = new ArrayList<Stock>();
+
+ try {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setValidating(false);
+ Document doc = factory.newDocumentBuilder().parse(fileInputStream);
+ NodeList stockNodes = doc.getElementsByTagName("stock");
+ int length = stockNodes.getLength();
+ Stock stock;
+ Node stockNode;
+ for (int i = 0; i < length; i++) {
+ stockNode = stockNodes.item(i);
+ stock = new Stock();
+ stock.setSymbol(getStringValue(stockNode, "symbol"));
+ stock.setName(getStringValue(stockNode, "company"));
+ stock.setLast(getDoubleValue(stockNode, "last"));
+ stock.setHigh(stock.getLast());
+ stock.setLow(stock.getLast());
+ stock.setOpen(stock.getLast());
+ stock.setChange(0);
+ list.add(stock);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return list;
+ }
+
+ private String getStringValue(Node node, String name) {
+ return ((Element) node).getElementsByTagName(name).item(0).getFirstChild().getNodeValue();
+ }
+
+ private double getDoubleValue(Node node, String name) {
+ return Double.parseDouble(getStringValue(node, name));
+ }
+
+ public static class FeedThread extends Thread {
+
+ public boolean running = false;
+
+ private final MessageTemplate template;
+
+ private final List<Stock> stockList;
+
+ private final Random random = new Random();
+
+ public FeedThread(MessageTemplate template, List<Stock> stockList) {
+ this.template = template;
+ this.stockList = stockList;
+ }
+
+ @Override
+ public void run() {
+ this.running = true;
+
+ int size = this.stockList.size();
+ int index = 0;
+
+ Stock stock;
+
+ while (this.running) {
+
+ stock = this.stockList.get(index);
+ simulateChange(stock);
+
+ index++;
+ if (index >= size) {
+ index = 0;
+ }
+
+ sendStockUpdate(stock);
+
+ try {
+ Thread.sleep(20);
+ } catch (InterruptedException e) {
+ }
+
+ }
+ }
+
+ private void sendStockUpdate(final Stock stock) {
+ template.send(new AsyncMessageCreator() {
+
+ public AsyncMessage createMessage() {
+ AsyncMessage msg = template.createMessageForDestination("market-feed");
+ msg.setHeader("DSSubtopic", stock.getSymbol());
+ msg.setBody(stock);
+ return msg;
+ }
+ });
+ }
+
+ private void simulateChange(Stock stock) {
+
+ double maxChange = stock.open * 0.005;
+ double change = maxChange - this.random.nextDouble() * maxChange * 2;
+ stock.change = change;
+ double last = stock.last + change;
+
+ if (last < stock.open + stock.open * 0.15 && last > stock.open - stock.open * 0.15) {
+ stock.last = last;
+ } else {
+ stock.last = stock.last - change;
+ }
+
+ if (stock.last > stock.high) {
+ stock.high = stock.last;
+ } else if (stock.last < stock.low) {
+ stock.low = stock.last;
+ }
+ stock.date = new Date();
+
+ }
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/Stock.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/Stock.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/Stock.java
new file mode 100755
index 0000000..c5cbf45
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/Stock.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.marketfeed;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Stock implements Serializable {
+
+ private static final long serialVersionUID = -1763421100056755200L;
+
+ protected String symbol;
+
+ protected String name;
+
+ protected double low;
+
+ protected double high;
+
+ protected double open;
+
+ protected double last;
+
+ protected double change;
+
+ protected Date date;
+
+ public double getChange() {
+ return this.change;
+ }
+
+ public void setChange(double change) {
+ this.change = change;
+ }
+
+ public double getHigh() {
+ return this.high;
+ }
+
+ public void setHigh(double high) {
+ this.high = high;
+ }
+
+ public double getLast() {
+ return this.last;
+ }
+
+ public void setLast(double last) {
+ this.last = last;
+ }
+
+ public double getLow() {
+ return this.low;
+ }
+
+ public void setLow(double low) {
+ this.low = low;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public double getOpen() {
+ return this.open;
+ }
+
+ public void setOpen(double open) {
+ this.open = open;
+ }
+
+ public String getSymbol() {
+ return this.symbol;
+ }
+
+ public void setSymbol(String symbol) {
+ this.symbol = symbol;
+ }
+
+ public Date getDate() {
+ return this.date;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/IProductDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/IProductDAO.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/IProductDAO.java
new file mode 100755
index 0000000..a5f2f54
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/IProductDAO.java
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.product;
+
+import org.springframework.flex.samples.dao.IGenericDAO;
+
+public interface IProductDAO extends IGenericDAO<Product> {
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/Product.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/Product.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/Product.java
new file mode 100755
index 0000000..5e37e19
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/Product.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.product;
+
+import java.io.Serializable;
+
+public class Product implements Serializable {
+
+ static final long serialVersionUID = 103844514947365244L;
+
+ private int productId;
+
+ private String name;
+
+ private String description;
+
+ private String image;
+
+ private String category;
+
+ private double price;
+
+ private int qty;
+
+ public Product() {
+
+ }
+
+ public Product(int productId, String name, String description, String image, String category, double price, int qty) {
+ this.productId = productId;
+ this.name = name;
+ this.description = description;
+ this.image = image;
+ this.category = category;
+ this.price = price;
+ this.qty = qty;
+ }
+
+ public String getCategory() {
+ return this.category;
+ }
+
+ public void setCategory(String category) {
+ this.category = category;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getImage() {
+ return this.image;
+ }
+
+ public void setImage(String image) {
+ this.image = image;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public double getPrice() {
+ return this.price;
+ }
+
+ public void setPrice(double price) {
+ this.price = price;
+ }
+
+ public int getProductId() {
+ return this.productId;
+ }
+
+ public void setProductId(int productId) {
+ this.productId = productId;
+ }
+
+ public int getQty() {
+ return this.qty;
+ }
+
+ public void setQty(int qty) {
+ this.qty = qty;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/ProductDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/ProductDAO.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/ProductDAO.java
new file mode 100755
index 0000000..881b22a
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/ProductDAO.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+package org.springframework.flex.samples.product;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.sql.DataSource;
+
+public class ProductDAO implements IProductDAO {
+
+ private final DataSource dataSource;
+
+ public ProductDAO(DataSource dataSource) {
+ this.dataSource = dataSource;
+ }
+
+ public List<Product> findAll() {
+ List<Product> list = new ArrayList<Product>();
+ Connection c = null;
+
+ try {
+ c = this.dataSource.getConnection();
+ Statement s = c.createStatement();
+ ResultSet rs = s.executeQuery("SELECT * FROM product ORDER BY name");
+ while (rs.next()) {
+ list.add(new Product(rs.getInt("id"), rs.getString("name"), rs.getString("description"), rs.getString("image"),
+ rs.getString("category"), rs.getDouble("price"), rs.getInt("qty")));
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ return list;
+ }
+
+ public List<Product> findByName(String name) {
+ List<Product> list = new ArrayList<Product>();
+ Connection c = null;
+ try {
+ c = this.dataSource.getConnection();
+ PreparedStatement ps = c.prepareStatement("SELECT * FROM product WHERE UPPER(name) LIKE ? ORDER BY name");
+ ps.setString(1, "%" + name.toUpperCase() + "%");
+ ResultSet rs = ps.executeQuery();
+ while (rs.next()) {
+ list.add(new Product(rs.getInt("id"), rs.getString("name"), rs.getString("description"), rs.getString("image"),
+ rs.getString("category"), rs.getDouble("price"), rs.getInt("qty")));
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ return list;
+ }
+
+ public Product findById(int id) {
+ Product product = new Product();
+ Connection c = null;
+ try {
+ c = this.dataSource.getConnection();
+ PreparedStatement ps = c.prepareStatement("SELECT * FROM product WHERE id=?");
+ ps.setInt(1, id);
+ ResultSet rs = ps.executeQuery();
+ if (rs.next()) {
+ product = new Product();
+ product.setProductId(rs.getInt("id"));
+ product.setName(rs.getString("name"));
+ product.setDescription(rs.getString("description"));
+ product.setImage(rs.getString("image"));
+ product.setCategory(rs.getString("category"));
+ product.setPrice(rs.getDouble("price"));
+ product.setQty(rs.getInt("qty"));
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ return product;
+ }
+
+ public Product create(Product product) {
+ Connection c = null;
+ PreparedStatement ps = null;
+ try {
+ c = this.dataSource.getConnection();
+ ps = c.prepareStatement("INSERT INTO product (name, description, image, category, price, qty) VALUES (?, ?, ?, ?, ?, ?)",
+ new String[] { "ID" });
+ ps.setString(1, product.getName());
+ ps.setString(2, product.getDescription());
+ ps.setString(3, product.getImage());
+ ps.setString(4, product.getCategory());
+ ps.setDouble(5, product.getPrice());
+ ps.setInt(6, product.getQty());
+ ps.executeUpdate();
+ ResultSet rs = ps.getGeneratedKeys();
+ rs.next();
+ // Update the id in the returned object. This is important as this value must be returned to the client.
+ int id = rs.getInt(1);
+ product.setProductId(id);
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ return product;
+ }
+
+ public boolean update(Product product) {
+ Connection c = null;
+ try {
+ c = this.dataSource.getConnection();
+ PreparedStatement ps = c.prepareStatement("UPDATE product SET name=?, description=?, image=?, category=?, price=?, qty=? WHERE id=?");
+ ps.setString(1, product.getName());
+ ps.setString(2, product.getDescription());
+ ps.setString(3, product.getImage());
+ ps.setString(4, product.getCategory());
+ ps.setDouble(5, product.getPrice());
+ ps.setInt(6, product.getQty());
+ ps.setInt(7, product.getProductId());
+ return ps.executeUpdate() == 1;
+ } catch (SQLException e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+
+ }
+
+ public boolean remove(Product product) {
+ Connection c = null;
+ try {
+ c = this.dataSource.getConnection();
+ PreparedStatement ps = c.prepareStatement("DELETE FROM product WHERE id=?");
+ ps.setInt(1, product.getProductId());
+ int count = ps.executeUpdate();
+ return count == 1;
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new RuntimeException(e);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/secured/Security3Helper.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/secured/Security3Helper.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/secured/Security3Helper.java
new file mode 100755
index 0000000..60e0fa2
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/secured/Security3Helper.java
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ */
+package org.springframework.flex.samples.secured;
+
+import java.util.Map;
+
+import org.springframework.flex.security3.AuthenticationResultUtils;
+
+
+public class Security3Helper {
+
+ public Map<String, Object> getAuthentication() {
+ return AuthenticationResultUtils.getAuthenticationResult();
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/simplefeed/SimpleFeed.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/simplefeed/SimpleFeed.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/simplefeed/SimpleFeed.java
new file mode 100755
index 0000000..759cbd6
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/simplefeed/SimpleFeed.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+ /*
+ * This file has been modified by Adobe (Adobe Systems Incorporated).
+ * Date: Oct 7, 2010
+ * Reason(s): Fixed the following issues:
+ * BLZ-573: Cannot create a new company in Company Manager Sample in Spring BlazeDS Integration Test Drive
+ * BLZ-574: Error in creating new contact in insync05 sample in Spring BlazeDS Integration test drive
+ */
+
+package org.springframework.flex.samples.simplefeed;
+
+import java.util.Random;
+
+import org.springframework.flex.messaging.MessageTemplate;
+
+public class SimpleFeed {
+
+ private static FeedThread thread;
+
+ private final MessageTemplate template;
+
+ public SimpleFeed(MessageTemplate template) {
+ this.template = template;
+ }
+
+ public void start() {
+ if (thread == null) {
+ thread = new FeedThread(this.template);
+ thread.start();
+ }
+ }
+
+ public void stop() {
+ if (thread != null) {
+ thread.running = false;
+ thread = null;
+ }
+ }
+
+ public static class FeedThread extends Thread {
+
+ public boolean running = false;
+
+ private final MessageTemplate template;
+
+ public FeedThread(MessageTemplate template) {
+ this.template = template;
+ }
+
+ @Override
+ public void run() {
+ this.running = true;
+ Random random = new Random();
+ double initialValue = 35;
+ double currentValue = 35;
+ double maxChange = initialValue * 0.005;
+
+ while (this.running) {
+ double change = maxChange - random.nextDouble() * maxChange * 2;
+ double newValue = currentValue + change;
+
+ if (currentValue < initialValue + initialValue * 0.15 && currentValue > initialValue - initialValue * 0.15) {
+ currentValue = newValue;
+ } else {
+ currentValue -= change;
+ }
+
+ this.template.send("simple-feed", new Double(currentValue));
+
+ try {
+ Thread.sleep(300);
+ } catch (InterruptedException e) {
+ }
+
+ }
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/util/DatabaseInitializer.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/util/DatabaseInitializer.java b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/util/DatabaseInitializer.java
new file mode 100755
index 0000000..4f67140
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/util/DatabaseInitializer.java
@@ -0,0 +1,300 @@
+/*
+ * Copyright 2002-2009 the original author or authors.
+ *
+ * Licensed 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.
+ */
+
+ /*
+ * This file has been modified by Adobe (Adobe Systems Incorporated).
+ * Date: Apr 10, 2010
+ * Reason: Migrated the DB used for samples-spring web app to HSQL
+ *
+ * Date: Oct 7, 2010
+ * Reason(s): Fixed the following issues:
+ * BLZ-573: Cannot create a new company in Company Manager Sample in Spring BlazeDS Integration Test Drive
+ * BLZ-574: Error in creating new contact in insync05 sample in Spring BlazeDS Integration test drive
+ */
+
+package org.springframework.flex.samples.util;
+
+import javax.sql.DataSource;
+
+import org.springframework.jdbc.core.JdbcTemplate;
+
+public class DatabaseInitializer {
+
+ private final JdbcTemplate template;
+
+ public DatabaseInitializer(DataSource ds) {
+ this.template = new JdbcTemplate(ds);
+ createTableProduct();
+ insertProducts();
+ createTableContact();
+ insertContacts();
+ createTableIndustry();
+ insertIndustries();
+ createTableCompany();
+ insertCompanies();
+ createTableAccount();
+ insertAccounts();
+ }
+
+ public void createTableContact() {
+ String sql = "CREATE TABLE CONTACT (" + "ID INT IDENTITY PRIMARY KEY, " + "FIRST_NAME VARCHAR(50), "
+ + "LAST_NAME VARCHAR(50), " + "ADDRESS VARCHAR(50), " + "CITY VARCHAR(50), " + "STATE VARCHAR(20), " + "ZIP VARCHAR(20), "
+ + "PHONE VARCHAR(50), " + "EMAIL VARCHAR(50), " + "DOB DATE)";
+ this.template.execute(sql);
+ }
+
+ public void createTableCompany() {
+ String sql = "CREATE TABLE COMPANY (" + "ID INT IDENTITY PRIMARY KEY, " + "NAME VARCHAR(50), " + "ADDRESS VARCHAR(50), "
+ + "CITY VARCHAR(50), " + "STATE VARCHAR(20), " + "ZIP VARCHAR(20), " + "PHONE VARCHAR(50), " + "INDUSTRY_ID INT)";
+ this.template.execute(sql);
+ }
+
+ public void createTableIndustry() {
+ String sql = "CREATE TABLE INDUSTRY (" + "ID INT IDENTITY PRIMARY KEY, " + "NAME VARCHAR(50))";
+ this.template.execute(sql);
+ }
+
+ public void createTableProduct() {
+ String sql = "CREATE TABLE PRODUCT (" + "ID INT IDENTITY PRIMARY KEY, " + "NAME VARCHAR(50), " + "CATEGORY VARCHAR(50), "
+ + "DESCRIPTION LONGVARCHAR, " + "IMAGE VARCHAR(255), " + "PRICE DOUBLE, " + "QTY INT)";
+ this.template.execute(sql);
+ }
+
+ public void createTableAccount() {
+ String sql = "CREATE TABLE ACCOUNT (" + "ID INT IDENTITY PRIMARY KEY, " + "NAME VARCHAR(50)," + "TYPE INT,"
+ + "INDUSTRY INT," + "OWNER INT," + "PHONE VARCHAR(30)," + "FAX VARCHAR(30)," + "TICKER VARCHAR(10)," + "OWNERSHIP VARCHAR(20),"
+ + "NUMBER_EMPLOYEES INT," + "ANNUAL_REVENUE DOUBLE," + "PRIORITY INT," + "RATING INT," + "ADDRESS1 VARCHAR(50),"
+ + "ADDRESS2 VARCHAR(50)," + "CITY VARCHAR(50)," + "STATE VARCHAR(50)," + "ZIP VARCHAR(20)," + "URL VARCHAR(50)," + "NOTES LONGVARCHAR,"
+ + "CURRENT_YEAR_RESULTS DOUBLE," + "LAST_YEAR_RESULTS DOUBLE)";
+ this.template.execute(sql);
+ }
+
+ public void insertContacts() {
+ int rowCount = this.template.queryForInt("SELECT COUNT(*) FROM CONTACT");
+ if (rowCount > 0) {
+ return;
+ }
+ String sql = "INSERT INTO CONTACT (FIRST_NAME, LAST_NAME, ADDRESS, CITY, STATE, ZIP, PHONE, EMAIL) VALUES (?,?,?,?,?,?,?,?)";
+ this.template.update(sql, new Object[] { "Christophe", "Coenraets", "275 Grove St", "Newton", "MA", "02476", "617-219-2000",
+ "ccoenrae@adobe.com" });
+ this.template.update(sql, new Object[] { "John", "Smith", "1 Main st", "Boston", "MA", "01744", "617-219-2001", "jsmith@mail.com" });
+ this.template.update(sql, new Object[] { "Lisa", "Taylor", "501 Townsend st", "San Francisco", "CA", "", "415-534-7865", "ltaylor@mail.com" });
+ this.template.update(sql, new Object[] { "Noah", "Jones", "1200 5th Avenue ", "New York", "NY", "", "212-764-2345", "njones@mail.com" });
+ this.template.update(sql, new Object[] { "Bill", "Johnson", "1345 6th street", "Chicago", "IL", "", "", "bjohnson@mail.com" });
+ this.template.update(sql, new Object[] { "Chloe", "Rodriguez", "34 Elm street", "Dallas", "TX", "", "415-534-7865", "crodriguez@mail.com" });
+ this.template.update(sql, new Object[] { "Jorge", "Espinosa", "23 Putnam Avenue", "Seattle", "WA", "", "", "jespinosa@mail.com" });
+ this.template.update(sql, new Object[] { "Amy", "King", "11 Summer st", "Miami", "FL", "", "", "aking@mail.com" });
+ this.template.update(sql, new Object[] { "Boris", "Jefferson", "222 Spring st", "Denver", "CO", "", "415-534-7865", "bjefferson@mail.com" });
+ this.template.update(sql, new Object[] { "Linda", "Madison", "564 Winter st", "Washington", "DC", "", "", "lmadison@mail.com" });
+ }
+
+ public void insertCompanies() {
+ int rowCount = this.template.queryForInt("SELECT COUNT(*) FROM COMPANY");
+ if (rowCount > 0) {
+ return;
+ }
+ String sql = "INSERT INTO COMPANY (NAME, ADDRESS, CITY, STATE, ZIP, PHONE, INDUSTRY_ID) VALUES (?,?,?,?,?,?,?)";
+ this.template.update(sql, new Object[] { "Adobe", "", "San Jose", "CA", "", "408", 1 });
+ this.template.update(sql, new Object[] { "SpringSource", "", "New York", "NY", "", "212", 2 });
+ this.template.update(sql, new Object[] { "Allaire", "", "Cambridge", "MA", "", "212", 3 });
+ this.template.update(sql, new Object[] { "Acme", "", "Denver", "CO", "", "212", 4 });
+ this.template.update(sql, new Object[] { "Macromedia", "", "San Francisco", "CA", "", "212", 1 });
+ this.template.update(sql, new Object[] { "Alpha Corp", "", "Chicago", "IL", "", "", 1 });
+ }
+
+ public void insertIndustries() {
+ int rowCount = this.template.queryForInt("SELECT COUNT(*) FROM INDUSTRY");
+ if (rowCount > 0) {
+ return;
+ }
+ String sql = "INSERT INTO INDUSTRY (NAME) VALUES (?)";
+ this.template.update(sql, new Object[] { "Telecommunication" });
+ this.template.update(sql, new Object[] { "Government" });
+ this.template.update(sql, new Object[] { "Financial Services" });
+ this.template.update(sql, new Object[] { "Life Sciences" });
+ this.template.update(sql, new Object[] { "Manufacturing" });
+ this.template.update(sql, new Object[] { "Education" });
+ }
+
+ public void insertProducts() {
+ int rowCount = this.template.queryForInt("SELECT COUNT(*) FROM PRODUCT");
+ if (rowCount > 0) {
+ return;
+ }
+ String sql = "INSERT INTO PRODUCT (NAME, CATEGORY, IMAGE, PRICE, DESCRIPTION, QTY) VALUES (?,?,?,?,?,?)";
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 6010",
+ "6000",
+ "Nokia_6010.gif",
+ 99.0E0,
+ "Easy to use without sacrificing style, the Nokia 6010 phone offers functional voice communication supported by text messaging, multimedia messaging, mobile internet, games and more.",
+ 21 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 3100 Blue",
+ "9000",
+ "Nokia_3100_blue.gif",
+ 109.0E0,
+ "Light up the night with a glow-in-the-dark cover - when it is charged with light you can easily find your phone in the dark. When you get a call, the Nokia 3100 phone flashes in tune with your ringing tone. And when you snap on a Nokia Xpress-on gaming cover, you will get luminescent light effects in time to the gaming action.",
+ 99 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 3100 Pink",
+ "3000",
+ "Nokia_3100_pink.gif",
+ 139.0E0,
+ "Light up the night with a glow-in-the-dark cover - when it is charged with light you can easily find your phone in the dark. When you get a call, the Nokia 3100 phone flashes in tune with your ringing tone. And when you snap on a Nokia Xpress-on gaming cover, you will get luminescent light effects in time to the gaming action.",
+ 30 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 3120",
+ "3000",
+ "Nokia_3120.gif",
+ 159.99E0,
+ "Designed for both business and pleasure, the elegant Nokia 3120 phone offers a pleasing mix of features. Enclosed within its chic, compact body, you will discover the benefits of tri-band compatibility, a color screen, MMS, XHTML browsing, cheerful screensavers, and much more.",
+ 10 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 3220",
+ "3000",
+ "Nokia_3220.gif",
+ 199.0E0,
+ "The Nokia 3220 phone is a fresh new cut on some familiar ideas - animate your MMS messages with cute characters, see the music with lights that flash in time with your ringing tone, download wallpapers and screensavers with matching color schemes for the interface.",
+ 20 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 3650",
+ "3000",
+ "Nokia_3650.gif",
+ 200.0E0,
+ "Messaging is more personal, versatile and fun with the Nokia 3650 camera phone. Capture experiences as soon as you see them and send the photos you take to you friends and family.",
+ 11 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 6820",
+ "6000",
+ "Nokia_6820.gif",
+ 299.99E0,
+ "Messaging just got a whole lot smarter. The Nokia 6820 messaging device puts the tools you need for rich communication - full messaging keyboard, digital camera, mobile email, MMS, SMS, and Instant Messaging - right at your fingertips, in a small, sleek device.",
+ 8 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 6670",
+ "6000",
+ "Nokia_6670.gif",
+ 319.99E0,
+ "Classic business tools meet your creative streak in the Nokia 6670 imaging smartphone. It has a Netfront Web browser with PDF support, document viewer applications for email attachments, a direct printing application, and a megapixel still camera that also shoots up to 10 minutes of video.",
+ 2 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 6620",
+ "6000",
+ "Nokia_6620.gif",
+ 329.99E0,
+ "Shoot a basket. Shoot a movie. Video phones from Nokia... the perfect way to save and share life\u2019s playful moments. Feel connected.",
+ 10 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 3230 Silver",
+ "3000",
+ "Nokia_3230_black.gif",
+ 500.0E0,
+ "Get creative with the Nokia 3230 smartphone. Create your own ringing tones, print your mobile images, play multiplayer games over a wireless Bluetooth connection, and browse HTML and xHTML Web pages. ",
+ 10 });
+ this.template.update(sql,
+ new Object[] { "Nokia 6680", "6000", "Nokia_6680.gif", 222.0E0, "The Nokia 6680 is an imaging smartphone that", 36 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 6630",
+ "6000",
+ "Nokia_6630.gif",
+ 379.0E0,
+ "The Nokia 6630 imaging smartphone is a 1.3 megapixel digital imaging device (1.3 megapixel camera sensor, effective resolution 1.23 megapixels for image capture, image size 1280 x 960 pixels});.",
+ 8 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 7610 Black",
+ "7000",
+ "Nokia_7610_black.gif",
+ 450.0E0,
+ "The Nokia 7610 imaging phone with its sleek, compact design stands out in any crowd. Cut a cleaner profile with a megapixel camera and 4x digital zoom. Quality prints are all the proof you need of your cutting edge savvy.",
+ 20 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 7610 White",
+ "7000",
+ "Nokia_7610_white.gif",
+ 399.99E0,
+ "The Nokia 7610 imaging phone with its sleek, compact design stands out in any crowd. Cut a cleaner profile with a megapixel camera and 4x digital zoom. Quality prints are all the proof you need of your cutting edge savvy.",
+ 7 });
+ this.template.update(sql, new Object[] { "Nokia 6680", "6000", "Nokia_6680.gif", 219.0E0, "The Nokia 6680 is an imaging smartphone.", 15 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 9300",
+ "9000",
+ "Nokia_9300_close.gif",
+ 599.0E0,
+ "The Nokia 9300 combines popular voice communication features with important productivity applications in one well-appointed device. Now the tools you need to stay in touch and on top of schedules, email, news, and messages are conveniently at your fingertips.",
+ 26 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia 9500",
+ "9000",
+ "Nokia_9500_close.gif",
+ 799.99E0,
+ "Fast data connectivity with Wireless LAN. Browse the Internet in full color, on a wide, easy-to-view screen. Work with office documents not just email with attachments and memos, but presentations and databases too.",
+ 54 });
+ this.template.update(
+ sql,
+ new Object[] {
+ "Nokia N90",
+ "9000",
+ "Nokia_N90.gif",
+ 499.0E0,
+ "Twist and shoot. It is a pro-photo taker. A personal video-maker. Complete with Carl Zeiss Optics for crisp, bright images you can view, edit, print and share. Meet the Nokia N90.",
+ 12 });
+ }
+
+ public void insertAccounts() {
+ int rowCount = this.template.queryForInt("SELECT COUNT(*) FROM ACCOUNT");
+ if (rowCount > 0) {
+ return;
+ }
+ String sql = "INSERT INTO ACCOUNT (NAME, ADDRESS1, CITY, STATE, ZIP, PHONE) VALUES (?,?,?,?,?,?)";
+ this.template.update(sql, new Object[] { "Adobe", "", "San Jose", "CA", "", "408" });
+ this.template.update(sql, new Object[] { "SpringSource", "", "New York", "NY", "", "212" });
+ this.template.update(sql, new Object[] { "Allaire", "", "Cambridge", "MA", "", "212" });
+ this.template.update(sql, new Object[] { "Acme", "", "Denver", "CO", "", "212" });
+ this.template.update(sql, new Object[] { "Macromedia", "", "San Francisco", "CA", "", "212" });
+ this.template.update(sql, new Object[] { "Alpha Corp", "", "Chicago", "IL", "", "" });
+ }
+}
[32/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/util/DatabaseInitializer.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/util/DatabaseInitializer.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/util/DatabaseInitializer.java
deleted file mode 100755
index 4f67140..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/util/DatabaseInitializer.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
- /*
- * This file has been modified by Adobe (Adobe Systems Incorporated).
- * Date: Apr 10, 2010
- * Reason: Migrated the DB used for samples-spring web app to HSQL
- *
- * Date: Oct 7, 2010
- * Reason(s): Fixed the following issues:
- * BLZ-573: Cannot create a new company in Company Manager Sample in Spring BlazeDS Integration Test Drive
- * BLZ-574: Error in creating new contact in insync05 sample in Spring BlazeDS Integration test drive
- */
-
-package org.springframework.flex.samples.util;
-
-import javax.sql.DataSource;
-
-import org.springframework.jdbc.core.JdbcTemplate;
-
-public class DatabaseInitializer {
-
- private final JdbcTemplate template;
-
- public DatabaseInitializer(DataSource ds) {
- this.template = new JdbcTemplate(ds);
- createTableProduct();
- insertProducts();
- createTableContact();
- insertContacts();
- createTableIndustry();
- insertIndustries();
- createTableCompany();
- insertCompanies();
- createTableAccount();
- insertAccounts();
- }
-
- public void createTableContact() {
- String sql = "CREATE TABLE CONTACT (" + "ID INT IDENTITY PRIMARY KEY, " + "FIRST_NAME VARCHAR(50), "
- + "LAST_NAME VARCHAR(50), " + "ADDRESS VARCHAR(50), " + "CITY VARCHAR(50), " + "STATE VARCHAR(20), " + "ZIP VARCHAR(20), "
- + "PHONE VARCHAR(50), " + "EMAIL VARCHAR(50), " + "DOB DATE)";
- this.template.execute(sql);
- }
-
- public void createTableCompany() {
- String sql = "CREATE TABLE COMPANY (" + "ID INT IDENTITY PRIMARY KEY, " + "NAME VARCHAR(50), " + "ADDRESS VARCHAR(50), "
- + "CITY VARCHAR(50), " + "STATE VARCHAR(20), " + "ZIP VARCHAR(20), " + "PHONE VARCHAR(50), " + "INDUSTRY_ID INT)";
- this.template.execute(sql);
- }
-
- public void createTableIndustry() {
- String sql = "CREATE TABLE INDUSTRY (" + "ID INT IDENTITY PRIMARY KEY, " + "NAME VARCHAR(50))";
- this.template.execute(sql);
- }
-
- public void createTableProduct() {
- String sql = "CREATE TABLE PRODUCT (" + "ID INT IDENTITY PRIMARY KEY, " + "NAME VARCHAR(50), " + "CATEGORY VARCHAR(50), "
- + "DESCRIPTION LONGVARCHAR, " + "IMAGE VARCHAR(255), " + "PRICE DOUBLE, " + "QTY INT)";
- this.template.execute(sql);
- }
-
- public void createTableAccount() {
- String sql = "CREATE TABLE ACCOUNT (" + "ID INT IDENTITY PRIMARY KEY, " + "NAME VARCHAR(50)," + "TYPE INT,"
- + "INDUSTRY INT," + "OWNER INT," + "PHONE VARCHAR(30)," + "FAX VARCHAR(30)," + "TICKER VARCHAR(10)," + "OWNERSHIP VARCHAR(20),"
- + "NUMBER_EMPLOYEES INT," + "ANNUAL_REVENUE DOUBLE," + "PRIORITY INT," + "RATING INT," + "ADDRESS1 VARCHAR(50),"
- + "ADDRESS2 VARCHAR(50)," + "CITY VARCHAR(50)," + "STATE VARCHAR(50)," + "ZIP VARCHAR(20)," + "URL VARCHAR(50)," + "NOTES LONGVARCHAR,"
- + "CURRENT_YEAR_RESULTS DOUBLE," + "LAST_YEAR_RESULTS DOUBLE)";
- this.template.execute(sql);
- }
-
- public void insertContacts() {
- int rowCount = this.template.queryForInt("SELECT COUNT(*) FROM CONTACT");
- if (rowCount > 0) {
- return;
- }
- String sql = "INSERT INTO CONTACT (FIRST_NAME, LAST_NAME, ADDRESS, CITY, STATE, ZIP, PHONE, EMAIL) VALUES (?,?,?,?,?,?,?,?)";
- this.template.update(sql, new Object[] { "Christophe", "Coenraets", "275 Grove St", "Newton", "MA", "02476", "617-219-2000",
- "ccoenrae@adobe.com" });
- this.template.update(sql, new Object[] { "John", "Smith", "1 Main st", "Boston", "MA", "01744", "617-219-2001", "jsmith@mail.com" });
- this.template.update(sql, new Object[] { "Lisa", "Taylor", "501 Townsend st", "San Francisco", "CA", "", "415-534-7865", "ltaylor@mail.com" });
- this.template.update(sql, new Object[] { "Noah", "Jones", "1200 5th Avenue ", "New York", "NY", "", "212-764-2345", "njones@mail.com" });
- this.template.update(sql, new Object[] { "Bill", "Johnson", "1345 6th street", "Chicago", "IL", "", "", "bjohnson@mail.com" });
- this.template.update(sql, new Object[] { "Chloe", "Rodriguez", "34 Elm street", "Dallas", "TX", "", "415-534-7865", "crodriguez@mail.com" });
- this.template.update(sql, new Object[] { "Jorge", "Espinosa", "23 Putnam Avenue", "Seattle", "WA", "", "", "jespinosa@mail.com" });
- this.template.update(sql, new Object[] { "Amy", "King", "11 Summer st", "Miami", "FL", "", "", "aking@mail.com" });
- this.template.update(sql, new Object[] { "Boris", "Jefferson", "222 Spring st", "Denver", "CO", "", "415-534-7865", "bjefferson@mail.com" });
- this.template.update(sql, new Object[] { "Linda", "Madison", "564 Winter st", "Washington", "DC", "", "", "lmadison@mail.com" });
- }
-
- public void insertCompanies() {
- int rowCount = this.template.queryForInt("SELECT COUNT(*) FROM COMPANY");
- if (rowCount > 0) {
- return;
- }
- String sql = "INSERT INTO COMPANY (NAME, ADDRESS, CITY, STATE, ZIP, PHONE, INDUSTRY_ID) VALUES (?,?,?,?,?,?,?)";
- this.template.update(sql, new Object[] { "Adobe", "", "San Jose", "CA", "", "408", 1 });
- this.template.update(sql, new Object[] { "SpringSource", "", "New York", "NY", "", "212", 2 });
- this.template.update(sql, new Object[] { "Allaire", "", "Cambridge", "MA", "", "212", 3 });
- this.template.update(sql, new Object[] { "Acme", "", "Denver", "CO", "", "212", 4 });
- this.template.update(sql, new Object[] { "Macromedia", "", "San Francisco", "CA", "", "212", 1 });
- this.template.update(sql, new Object[] { "Alpha Corp", "", "Chicago", "IL", "", "", 1 });
- }
-
- public void insertIndustries() {
- int rowCount = this.template.queryForInt("SELECT COUNT(*) FROM INDUSTRY");
- if (rowCount > 0) {
- return;
- }
- String sql = "INSERT INTO INDUSTRY (NAME) VALUES (?)";
- this.template.update(sql, new Object[] { "Telecommunication" });
- this.template.update(sql, new Object[] { "Government" });
- this.template.update(sql, new Object[] { "Financial Services" });
- this.template.update(sql, new Object[] { "Life Sciences" });
- this.template.update(sql, new Object[] { "Manufacturing" });
- this.template.update(sql, new Object[] { "Education" });
- }
-
- public void insertProducts() {
- int rowCount = this.template.queryForInt("SELECT COUNT(*) FROM PRODUCT");
- if (rowCount > 0) {
- return;
- }
- String sql = "INSERT INTO PRODUCT (NAME, CATEGORY, IMAGE, PRICE, DESCRIPTION, QTY) VALUES (?,?,?,?,?,?)";
- this.template.update(
- sql,
- new Object[] {
- "Nokia 6010",
- "6000",
- "Nokia_6010.gif",
- 99.0E0,
- "Easy to use without sacrificing style, the Nokia 6010 phone offers functional voice communication supported by text messaging, multimedia messaging, mobile internet, games and more.",
- 21 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 3100 Blue",
- "9000",
- "Nokia_3100_blue.gif",
- 109.0E0,
- "Light up the night with a glow-in-the-dark cover - when it is charged with light you can easily find your phone in the dark. When you get a call, the Nokia 3100 phone flashes in tune with your ringing tone. And when you snap on a Nokia Xpress-on gaming cover, you will get luminescent light effects in time to the gaming action.",
- 99 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 3100 Pink",
- "3000",
- "Nokia_3100_pink.gif",
- 139.0E0,
- "Light up the night with a glow-in-the-dark cover - when it is charged with light you can easily find your phone in the dark. When you get a call, the Nokia 3100 phone flashes in tune with your ringing tone. And when you snap on a Nokia Xpress-on gaming cover, you will get luminescent light effects in time to the gaming action.",
- 30 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 3120",
- "3000",
- "Nokia_3120.gif",
- 159.99E0,
- "Designed for both business and pleasure, the elegant Nokia 3120 phone offers a pleasing mix of features. Enclosed within its chic, compact body, you will discover the benefits of tri-band compatibility, a color screen, MMS, XHTML browsing, cheerful screensavers, and much more.",
- 10 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 3220",
- "3000",
- "Nokia_3220.gif",
- 199.0E0,
- "The Nokia 3220 phone is a fresh new cut on some familiar ideas - animate your MMS messages with cute characters, see the music with lights that flash in time with your ringing tone, download wallpapers and screensavers with matching color schemes for the interface.",
- 20 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 3650",
- "3000",
- "Nokia_3650.gif",
- 200.0E0,
- "Messaging is more personal, versatile and fun with the Nokia 3650 camera phone. Capture experiences as soon as you see them and send the photos you take to you friends and family.",
- 11 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 6820",
- "6000",
- "Nokia_6820.gif",
- 299.99E0,
- "Messaging just got a whole lot smarter. The Nokia 6820 messaging device puts the tools you need for rich communication - full messaging keyboard, digital camera, mobile email, MMS, SMS, and Instant Messaging - right at your fingertips, in a small, sleek device.",
- 8 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 6670",
- "6000",
- "Nokia_6670.gif",
- 319.99E0,
- "Classic business tools meet your creative streak in the Nokia 6670 imaging smartphone. It has a Netfront Web browser with PDF support, document viewer applications for email attachments, a direct printing application, and a megapixel still camera that also shoots up to 10 minutes of video.",
- 2 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 6620",
- "6000",
- "Nokia_6620.gif",
- 329.99E0,
- "Shoot a basket. Shoot a movie. Video phones from Nokia... the perfect way to save and share life\u2019s playful moments. Feel connected.",
- 10 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 3230 Silver",
- "3000",
- "Nokia_3230_black.gif",
- 500.0E0,
- "Get creative with the Nokia 3230 smartphone. Create your own ringing tones, print your mobile images, play multiplayer games over a wireless Bluetooth connection, and browse HTML and xHTML Web pages. ",
- 10 });
- this.template.update(sql,
- new Object[] { "Nokia 6680", "6000", "Nokia_6680.gif", 222.0E0, "The Nokia 6680 is an imaging smartphone that", 36 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 6630",
- "6000",
- "Nokia_6630.gif",
- 379.0E0,
- "The Nokia 6630 imaging smartphone is a 1.3 megapixel digital imaging device (1.3 megapixel camera sensor, effective resolution 1.23 megapixels for image capture, image size 1280 x 960 pixels});.",
- 8 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 7610 Black",
- "7000",
- "Nokia_7610_black.gif",
- 450.0E0,
- "The Nokia 7610 imaging phone with its sleek, compact design stands out in any crowd. Cut a cleaner profile with a megapixel camera and 4x digital zoom. Quality prints are all the proof you need of your cutting edge savvy.",
- 20 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 7610 White",
- "7000",
- "Nokia_7610_white.gif",
- 399.99E0,
- "The Nokia 7610 imaging phone with its sleek, compact design stands out in any crowd. Cut a cleaner profile with a megapixel camera and 4x digital zoom. Quality prints are all the proof you need of your cutting edge savvy.",
- 7 });
- this.template.update(sql, new Object[] { "Nokia 6680", "6000", "Nokia_6680.gif", 219.0E0, "The Nokia 6680 is an imaging smartphone.", 15 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 9300",
- "9000",
- "Nokia_9300_close.gif",
- 599.0E0,
- "The Nokia 9300 combines popular voice communication features with important productivity applications in one well-appointed device. Now the tools you need to stay in touch and on top of schedules, email, news, and messages are conveniently at your fingertips.",
- 26 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia 9500",
- "9000",
- "Nokia_9500_close.gif",
- 799.99E0,
- "Fast data connectivity with Wireless LAN. Browse the Internet in full color, on a wide, easy-to-view screen. Work with office documents not just email with attachments and memos, but presentations and databases too.",
- 54 });
- this.template.update(
- sql,
- new Object[] {
- "Nokia N90",
- "9000",
- "Nokia_N90.gif",
- 499.0E0,
- "Twist and shoot. It is a pro-photo taker. A personal video-maker. Complete with Carl Zeiss Optics for crisp, bright images you can view, edit, print and share. Meet the Nokia N90.",
- 12 });
- }
-
- public void insertAccounts() {
- int rowCount = this.template.queryForInt("SELECT COUNT(*) FROM ACCOUNT");
- if (rowCount > 0) {
- return;
- }
- String sql = "INSERT INTO ACCOUNT (NAME, ADDRESS1, CITY, STATE, ZIP, PHONE) VALUES (?,?,?,?,?,?)";
- this.template.update(sql, new Object[] { "Adobe", "", "San Jose", "CA", "", "408" });
- this.template.update(sql, new Object[] { "SpringSource", "", "New York", "NY", "", "212" });
- this.template.update(sql, new Object[] { "Allaire", "", "Cambridge", "MA", "", "212" });
- this.template.update(sql, new Object[] { "Acme", "", "Denver", "CO", "", "212" });
- this.template.update(sql, new Object[] { "Macromedia", "", "San Francisco", "CA", "", "212" });
- this.template.update(sql, new Object[] { "Alpha Corp", "", "Chicago", "IL", "", "" });
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/web.xml b/apps/samples-spring/WEB-INF/web.xml
deleted file mode 100755
index 5d32f39..0000000
--- a/apps/samples-spring/WEB-INF/web.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-<?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.
-
--->
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
-
- <display-name>Spring BlazeDS Integration Samples</display-name>
-
- <context-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>
- /WEB-INF/spring/*-config.xml
- </param-value>
- </context-param>
-
- <filter>
- <filter-name>springSecurityFilterChain</filter-name>
- <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>springSecurityFilterChain</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <listener>
- <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
- </listener>
-
- <listener>
- <listener-class>flex.messaging.HttpFlexSession</listener-class>
- </listener>
-
- <servlet>
- <servlet-name>flex</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <!-- Add RDS servlets
- <servlet>
- <servlet-name>RDSDispatchServlet</servlet-name>
- <display-name>RDSDispatchServlet</display-name>
- <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
- <init-param>
- <param-name>useAppserverSecurity</param-name>
- <param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>messageBrokerId</param-name>
- <param-value>_messageBroker</param-value>
- </init-param>
- <load-on-startup>10</load-on-startup>
- </servlet>
-
- <servlet-mapping id="RDS_DISPATCH_MAPPING">
- <servlet-name>RDSDispatchServlet</servlet-name>
- <url-pattern>/CFIDE/main/ide.cfm</url-pattern>
- </servlet-mapping>
- End Add RDS servlets -->
-
- <servlet-mapping>
- <servlet-name>flex</servlet-name>
- <url-pattern>/messagebroker/*</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- </welcome-file-list>
-</web-app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/build.xml b/apps/samples-spring/build.xml
deleted file mode 100755
index 926dfb8..0000000
--- a/apps/samples-spring/build.xml
+++ /dev/null
@@ -1,168 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../..">
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="dist.dir" value="${basedir}/dist"/>
- <property name="src.dir" value="${samples-spring.war}/WEB-INF/src"/>
- <property name="classes.dir" value="${samples-spring.war}/WEB-INF/classes"/>
- <property name="context.root" value="samples-spring" />
-
- <path id="classpath">
- <fileset dir="${samples-spring.war}/WEB-INF/lib" includes="**/*.jar"/>
- <pathelement location="${servlet.jar}"/>
- </path>
-
- <target name="main" depends="clean,samples"/>
- <target name="samples" depends="prepare,copy-resources,compile"/>
-
- <target name="prepare">
- <mkdir dir="${samples-spring.war}/WEB-INF/lib"/>
- <mkdir dir="${samples-spring.war}/WEB-INF/classes"/>
- </target>
-
- <target name="copy-resources">
- <fail unless="local.sdk.lib.dir" message="must specify local.sdk.lib.dir in server/build.properties"/>
- <fail unless="local.sdk.frameworks.dir" message="must specify local.sdk.frameworks.dir in build.properties"/>
-
- <!-- copy to the lib directory -->
- <copy todir="${samples-spring.war}/WEB-INF/lib">
- <fileset dir="${basedir}/lib" includes="${webapp.lib}" />
- <fileset dir="${basedir}/lib/spring" includes="**/*" />
- <fileset dir="${basedir}/lib/aspectj" includes="**/*" />
- <fileset file="${hsqldb.jar}" />
- </copy>
-
- <!-- copy to sampledb directory -->
- <copy todir="${basedir}/sampledb">
- <fileset file="${hsqldb.jar}" />
- </copy>
-
- <!-- copy to the classes directory -->
- <copy todir="${samples-spring.war}/WEB-INF/classes">
- <fileset dir="${samples-spring.war}/WEB-INF/src">
- <include name="**/*.xml"/>
- </fileset>
- <fileset dir="${basedir}/lib" includes="${webapp.classes}"/>
- </copy>
-
- <!-- create version.properties -->
- <propertyfile file="${samples-spring.war}/WEB-INF/flex/version.properties">
- <entry key="build" value="${manifest.Implementation-Version}.${build.number}"/>
- <entry key="minimumSDKVersion" value="${min.sdk.version}"/>
- </propertyfile>
-
- </target>
-
- <target name="run-depend" if="src.depend">
- <echo message="Removing class files that changed and dependent class files."/>
- <depend cache="${classes.dir}" srcdir="${src.dir}" destdir="${classes.dir}"/>
- </target>
-
- <target name="compile" depends="prepare,run-depend,copy-resources" description="compile">
- <javac source="1.5" debug="${src.debug}" destdir="${classes.dir}" srcdir="${src.dir}" classpathref="classpath"/>
- </target>
-
- <target name="compile-swfs">
- <property name="samples.src.dir" value="${samples-spring.war}/WEB-INF/flex-src" />
- <ant antfile="${samples.src.dir}/chat/build.xml" />
- <ant antfile="${samples.src.dir}/collaboration/build.xml" />
- <ant antfile="${samples.src.dir}/companymgr/build.xml" />
- <ant antfile="${samples.src.dir}/feedstarter/build.xml" />
- <ant antfile="${samples.src.dir}/insync01/build.xml" />
- <ant antfile="${samples.src.dir}/insync02/build.xml" />
- <ant antfile="${samples.src.dir}/insync03/build.xml" />
- <ant antfile="${samples.src.dir}/insync04/build.xml" />
- <ant antfile="${samples.src.dir}/insync05/build.xml" />
- <ant antfile="${samples.src.dir}/insync06/build.xml" />
- <ant antfile="${samples.src.dir}/simplepush/build.xml" />
- <ant antfile="${samples.src.dir}/spring-blazeds-101/build.xml" />
- <ant antfile="${samples.src.dir}/spring-blazeds-security-101/build.xml" />
- <ant antfile="${samples.src.dir}/traderdesktop/build.xml" />
- </target>
-
- <target name="package" depends="compile-swfs" description=" Creates distribution war file">
-
- <mkdir dir="${dist.dir}"/>
-
- <!--
- we don't want flex source naked in WEB-INF as that would lead to overlapping eclipse projects
- instead, zip it up and then put it in the war
- -->
- <zip destfile="${samples-spring.war}/WEB-INF/flex-src/flex-src.zip"
- comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label} Spring Integration Samples Flex Source Code">
- <fileset dir="${samples-spring.war}/WEB-INF/flex-src"
- excludes="**/build*.xml,flex-src.zip"/>
- </zip>
-
- <war file="${dist.dir}/samples-spring.war"
- webxml="${samples-spring.war}/WEB-INF/web.xml">
- <manifest>
- <attribute name="Sealed" value="${manifest.sealed}"/>
- <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Spring Integration Samples Application"/>
- <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
- <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
- </manifest>
- <fileset dir="${samples-spring.war}" >
- <exclude name="**/**/build*.xml" />
- <exclude name="**/generated/**/*"/>
- <exclude name="WEB-INF/jsp/**/*" />
- <exclude name="WEB-INF/sessions/**/*" />
- <exclude name="WEB-INF/flex-src/**/*" />
- <!-- This is included in the war task already -->
- <exclude name="WEB-INF/web.xml" />
- </fileset>
- <fileset dir="${samples-spring.war}" includes="WEB-INF/flex-src/flex-src.zip" />
- </war>
-
- <copy todir="${dist.dir}/sampledb">
- <fileset dir="${basedir}/sampledb" />
- <fileset file="${hsqldb.jar}" />
- </copy>
-
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true" includeEmptyDirs="true">
- <fileset dir="${samples-spring.war}/WEB-INF/lib" includes="**/*"/>
- <fileset dir="${samples-spring.war}/WEB-INF/flex/jars" includes="**/*"/>
- <fileset dir="${samples-spring.war}/WEB-INF/flex/locale" includes="**/*"/>
- <fileset dir="${samples-spring.war}/WEB-INF/flex/libs" includes="**/*"/>
- <fileset dir="${classes.dir}" includes="**/*.class"/>
- <fileset dir="${basedir}/sampledb" includes="${hsqldb.jar}"/>
- <fileset file="${dist.dir}/samples-spring.war"/>
- <fileset file="${samples-spring.war}/WEB-INF/flex-src/flex-src.zip"/>
- <fileset dir="${samples-spring.war}/sqladmin"/>
- <fileset dir="${samples-spring.war}/jmschat"/>
- </delete>
- </target>
-
- <target name="generated-clean">
- <delete includeEmptyDirs="true" quiet="true">
- <fileset dir="${samples-spring.war}" includes="**/generated/*" />
- </delete>
- <delete includeEmptyDirs="true" quiet="true">
- <fileset dir="${samples-spring.war}" includes="**/generated" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/index.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/index.html b/apps/samples-spring/index.html
deleted file mode 100755
index a86cafc..0000000
--- a/apps/samples-spring/index.html
+++ /dev/null
@@ -1,330 +0,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.
--->
-<!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 > Import > General > 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 "Get Data": 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 "Save" 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="org.springframework.flex.spring.samples.contact.Contact")] 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 "Save" 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 "Save" 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 "Loosely Coupled" 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 "Save". Notice that the DataGrid is updated to reflect your changes.</li>
- <li>Add a new contact and click "Save" 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 "Send": 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><flex:message-service /></code> inside <code><flex:message-broker /></code>. The "chat" destination is configured using <code><flex:message-destination id="chat" /></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 "simple-feed" destination is configured using <code><flex:message-destination id="simple-feed" /></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><flex:message-destination id="market-feed" allow-subtopics="true" subtopic-separator="." /></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 "Get Data" without logging in first: you get an "Access Denied" exception.</li>
- <li>Log in (use UserId: john / Password: john), and click "Get Data" again: you should now get the data.</li>
- <li>Click "Logout" and "Get Data" again: you get the "Access Denied" 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 "find*" 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/75229759/apps/samples-spring/login.jsp
----------------------------------------------------------------------
diff --git a/apps/samples-spring/login.jsp b/apps/samples-spring/login.jsp
deleted file mode 100755
index 82f9fa8..0000000
--- a/apps/samples-spring/login.jsp
+++ /dev/null
@@ -1,64 +0,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.
--->
-<%@ 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/75229759/apps/samples-spring/main.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/main.css b/apps/samples-spring/main.css
deleted file mode 100755
index 7a5406f..0000000
--- a/apps/samples-spring/main.css
+++ /dev/null
@@ -1,138 +0,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.
- */
-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/75229759/apps/samples-spring/stocklist.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/stocklist.xml b/apps/samples-spring/stocklist.xml
deleted file mode 100755
index b464290..0000000
--- a/apps/samples-spring/stocklist.xml
+++ /dev/null
@@ -1,141 +0,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.
-
--->
-<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/75229759/apps/samples/README.txt
----------------------------------------------------------------------
diff --git a/apps/samples/README.txt b/apps/samples/README.txt
deleted file mode 100755
index 16c2166..0000000
--- a/apps/samples/README.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-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/75229759/apps/samples/WEB-INF/flex-src/dashboard/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/dashboard/build.xml b/apps/samples/WEB-INF/flex-src/dashboard/build.xml
deleted file mode 100755
index bdeff8c..0000000
--- a/apps/samples/WEB-INF/flex-src/dashboard/build.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?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/75229759/apps/samples/WEB-INF/flex-src/dashboard/src/RegionBreakdown.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/dashboard/src/RegionBreakdown.mxml b/apps/samples/WEB-INF/flex-src/dashboard/src/RegionBreakdown.mxml
deleted file mode 100755
index b2f25a8..0000000
--- a/apps/samples/WEB-INF/flex-src/dashboard/src/RegionBreakdown.mxml
+++ /dev/null
@@ -1,176 +0,0 @@
-<?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>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/dashboard/src/RegionDetail.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/dashboard/src/RegionDetail.mxml b/apps/samples/WEB-INF/flex-src/dashboard/src/RegionDetail.mxml
deleted file mode 100755
index 2c01180..0000000
--- a/apps/samples/WEB-INF/flex-src/dashboard/src/RegionDetail.mxml
+++ /dev/null
@@ -1,175 +0,0 @@
-<?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="*"
- title="Region Details">
-
- <fx:Script>
-
- <![CDATA[
- import mx.charts.HitData;
- import mx.controls.Alert;
- import mx.charts.chartClasses.ChartBase;
-
- private var _region:String;
-
- [Bindable]
- public var revenueData:Array;
-
- [Bindable]
- public var selectedMonth:Object;
-
- protected function monthChange(month:Object):void
- {
- selectedMonth = month;
- dispatchEvent(new Event("monthChange"));
- }
-
- protected function currencyFormat(value:Object, arg2:Object, arg3:Object):String
- {
- return cf.format(value);
- }
-
- private function dataGridCurrencyFormat(item:Object, column:Object):String
- {
- return cf.format(item[column.dataField]);
- }
-
- private function sortByDates(obj1:Object, obj2:Object):Number
- {
- var n:Number = SortUtils.sortByDates(obj1, obj2, "name");
- return n;
- }
-
- public function set region(r:String):void
- {
- _region = r;
- this.title = "Region Details [" + r + "]";
- }
-
- private function formatDataTip(hitData:HitData):String
- {
- var month:String = hitData.item.name;
- var revenue:Number = hitData.item.revenue;
- var average:Number = hitData.item.average;
- return "<b>Month: " + month + "</b><br>" + _region + ": " +
- cf.format(revenue) + "<br>Average: " + cf.format(average);
- }
-
- ]]>
-
- </fx:Script>
-
- <fx:Declarations>
- <mx:SeriesInterpolate id="interpolate" elementOffset="10"/>
-
- <mx:CurrencyFormatter id="cf"/>
- </fx:Declarations>
-
- <mx:ViewStack id="vs" width="100%" height="100%">
-
- <mx:VBox id="chartVBox" width="100%" height="100%" icon="@Embed('icon_chart.png')" toolTip="Chart View"
- paddingLeft="4" paddingTop="4" paddingBottom="4" paddingRight="4">
-
- <mx:ColumnChart dataProvider="{revenueData}" width="100%" height="100%" showDataTips="true" dataTipFunction="formatDataTip">
-
- <mx:horizontalAxis>
- <mx:CategoryAxis dataProvider="{revenueData}" categoryField="name"/>
- </mx:horizontalAxis>
-
- <mx:verticalAxis>
- <mx:LinearAxis maximum="160000" labelFunction="currencyFormat"/>
- </mx:verticalAxis>
-
- <mx:series>
- <fx:Array>
- <mx:ColumnSeries yField="revenue" showDataEffect="{interpolate}">
- <mx:fill>
- <mx:LinearGradient>
- <mx:entries>
- <fx:Array>
- <mx:GradientEntry color="#C6D5DD" ratio="0" alpha="100"/>
- <mx:GradientEntry color="#336699" ratio="0.1" alpha="100"/>
- <mx:GradientEntry color="#24496D" ratio="0.9" alpha="100"/>
- <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
- </fx:Array>
- </mx:entries>
- </mx:LinearGradient>
- </mx:fill>
- </mx:ColumnSeries>
-
-
- <mx:LineSeries yField="average" form="curve" showDataEffect="{interpolate}">
- <mx:stroke>
-<!-- SDK4 -->
- <mx:SolidColorStroke color="#708EA4" weight="1"/>
-<!-- SDK3
- <mx:Stroke color="#708EA4" weight="1"/>
--->
- </mx:stroke>
-
- </mx:LineSeries>
-
- </fx:Array>
- </mx:series>
-
- <mx:backgroundElements>
- <fx:Array>
-<!-- SDK4 -->
- <mx:GridLines gridDirection="both">
-<!-- SDK3
- <mx:GridLines direction="both"> -->
- <mx:verticalStroke>
-<!-- SDK4 -->
- <mx:SolidColorStroke weight="1" color="#CCCCCC"/>
-<!-- SDK3
- <mx:Stroke weight="1" color="#CCCCCC"/>
--->
- </mx:verticalStroke>
- </mx:GridLines>
- </fx:Array>
- </mx:backgroundElements>
-
- </mx:ColumnChart>
- </mx:VBox>
-
- <mx:VBox width="100%" height="100%" icon="@Embed('icon_grid.png')" toolTip="Grid View"
- hideEffect="Fade" showEffect="Fade">
- <mx:DataGrid dataProvider="{revenueData}" width="100%" height="100%"
- change="monthChange(DataGrid(event.target).selectedItem)">
- <mx:columns>
- <fx:Array>
- <mx:DataGridColumn dataField="name" headerText="Month"
- sortCompareFunction="sortByDates" />
- <mx:DataGridColumn dataField="revenue" headerText="Total Revenue"
- labelFunction="dataGridCurrencyFormat" />
- <mx:DataGridColumn dataField="average" headerText="Average Across Regions"
- labelFunction="dataGridCurrencyFormat" />
- </fx:Array>
- </mx:columns>
- </mx:DataGrid>
- </mx:VBox>
-
- </mx:ViewStack>
-
- <mx:ControlBar>
- <mx:ToggleButtonBar dataProvider="{vs}"/>
- </mx:ControlBar>
-
-</mx:Panel>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/dashboard/src/RevenueTimeline.mxml
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/dashboard/src/RevenueTimeline.mxml b/apps/samples/WEB-INF/flex-src/dashboard/src/RevenueTimeline.mxml
deleted file mode 100755
index 41e4619..0000000
--- a/apps/samples/WEB-INF/flex-src/dashboard/src/RevenueTimeline.mxml
+++ /dev/null
@@ -1,134 +0,0 @@
-<?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:ViewStack xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns="*" width="100%" height="100%">
-
- <fx:Script>
-
- <![CDATA[
- import mx.charts.HitData;
-
- [Bindable]
- public var revenueData:Array;
-
- [Bindable]
- public var selectedMonth:Object;
-
- private var colors:Array = [0xFF0000, 0x00FF00, 0x0000FF, 0xFFFF00, 0x00FFFF];
-
- protected function monthChange(month:Object):void
- {
- selectedMonth = month;
- dispatchEvent(new Event("monthChange"));
- }
-
- protected function currencyFormat(value:Object, arg2:Object, arg3:Object):String
- {
- return cf.format(value);
- }
-
- private function dataGridCurrencyFormat(item:Object, column:Object):String
- {
- return cf.format(item[column.dataField]);
- }
-
- private function sortByDates(obj1:Object, obj2:Object):Number
- {
- var n:Number = SortUtils.sortByDates(obj1, obj2, "name");
- return n;
- }
-
- private function formatDataTip(hitData:HitData):String
- {
- var name:String = hitData.item.name;
- var revenue:Number = hitData.item.revenue;
- return "<b>Month: "+name+"</b><br>Revenue: "+cf.format(revenue);
- }
-
- ]]>
-
- </fx:Script>
-
- <fx:Metadata>
- [Event("monthChange")]
- </fx:Metadata>
-
- <fx:Declarations>
- <mx:SeriesInterpolate id="interpolate" elementOffset="10"/>
-
- <mx:CurrencyFormatter id="cf"/>
- </fx:Declarations>
-
- <mx:VBox id="chartVBox" width="100%" height="100%" icon="@Embed('icon_chart.png')" toolTip="Chart View"
- paddingLeft="4" paddingTop="4" paddingBottom="4" paddingRight="4">
- <mx:LineChart id="lc" dataProvider="{revenueData}" showDataTips="true" width="100%" height="100%" dataTipFunction="formatDataTip"
- itemClick="monthChange(event.hitData.item)">
-
- <mx:horizontalAxis>
- <mx:CategoryAxis dataProvider="{revenueData}" categoryField="name"/>
- </mx:horizontalAxis>
-
- <mx:verticalAxis>
- <mx:LinearAxis labelFunction="currencyFormat"/>
- </mx:verticalAxis>
-
- <mx:series>
- <mx:LineSeries yField="revenue" showDataEffect="{interpolate}">
- <mx:lineStroke>
- <mx:SolidColorStroke color="#708EA4" weight="1"/>
- </mx:lineStroke>
- </mx:LineSeries>
- <mx:LineSeries yField="license" showDataEffect="{interpolate}">
- <mx:lineStroke>
- <mx:SolidColorStroke weight="1"/>
- </mx:lineStroke>
- </mx:LineSeries>
- </mx:series>
-
- <mx:backgroundElements>
- <fx:Array>
-<!-- SDK4 -->
- <mx:GridLines gridDirection="both">
-<!-- SDK3
- <mx:GridLines direction="both"> -->
- <mx:verticalStroke>
- <mx:SolidColorStroke weight="1" color="#CCCCCC"/>
- </mx:verticalStroke>
- </mx:GridLines>
- </fx:Array>
- </mx:backgroundElements>
-
- </mx:LineChart>
- </mx:VBox>
-
- <mx:VBox width="100%" height="100%" icon="@Embed('icon_grid.png')" toolTip="Grid View">
- <mx:DataGrid dataProvider="{revenueData}" width="100%" height="100%"
- change="monthChange(DataGrid(event.target).selectedItem)">
- <mx:columns>
- <mx:DataGridColumn dataField="name" headerText="Month"
- sortCompareFunction="sortByDates" />
- <mx:DataGridColumn dataField="revenue" headerText="Total Revenue"
- labelFunction="dataGridCurrencyFormat" />
- <mx:DataGridColumn dataField="average" headerText="Region Average"
- labelFunction="dataGridCurrencyFormat" />
- </mx:columns>
- </mx:DataGrid>
- </mx:VBox>
-
-</mx:ViewStack>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples/WEB-INF/flex-src/dashboard/src/SortUtils.as
----------------------------------------------------------------------
diff --git a/apps/samples/WEB-INF/flex-src/dashboard/src/SortUtils.as b/apps/samples/WEB-INF/flex-src/dashboard/src/SortUtils.as
deleted file mode 100755
index a461df1..0000000
--- a/apps/samples/WEB-INF/flex-src/dashboard/src/SortUtils.as
+++ /dev/null
@@ -1,62 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package {
-
-import mx.utils.ObjectUtil;
-
-public class SortUtils
-{
- //lookup the index based on month abbreviation
- static public var monthMap:Object = {
- Jan: 0,
- Feb: 1,
- Mar: 2,
- Apr: 3,
- May: 4,
- Jun: 5,
- Jul: 6,
- Aug: 7,
- Sep: 8,
- Oct: 9,
- Nov: 10,
- Dec: 11
- };
-
- public function SortUtils()
- {
- super();
- }
-
- static public function sortByDates(obj1:Object, obj2:Object, prop:String):Number
- {
- var month:String = obj1[prop].substr(0,3);
- var month1:Number = monthMap[month];
- var year1:String = "20" + obj1[prop].substr(4,2);
- month = obj2[prop].substr(0,3);
- var month2:Number = monthMap[month];
- var year2:String = "20" + obj2[prop].substr(4,2);
- var date1:Date = new Date(Number(year1), month1, 01);
- var date2:Date = new Date(Number(year2), month2, 01);
-
- return ObjectUtil.dateCompare(date1, date2);
- }
-
-}
-
-}
[14/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync02/src/insync02.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync02/src/insync02.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/src/insync02.mxml
new file mode 100755
index 0000000..c7716da
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/src/insync02.mxml
@@ -0,0 +1,60 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.rpc.events.ResultEvent;
+ import mx.rpc.events.FaultEvent;
+ import mx.controls.Alert;
+ import mx.collections.ArrayCollection;
+
+ [Bindable] private var contacts:ArrayCollection;
+
+ private function resultHandler(event:ResultEvent):void
+ {
+ contacts = event.result as ArrayCollection
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <s:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <s:method name="findByName" result="resultHandler(event)"/>
+ </s:RemoteObject>
+ </fx:Declarations>
+
+ <s:controlBarContent>
+ <s:TextInput id="searchStr"/>
+ <s:Button label="Search" click="ro.findByName(searchStr.text)"/>
+ </s:controlBarContent>
+
+ <mx:DataGrid id="dg" dataProvider="{contacts}" top="8" left="8" right="8" bottom="8"/>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.actionScriptProperties
new file mode 100755
index 0000000..61b14e0
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="insync03.mxml" projectUUID="b050a102-5b00-4469-ab6f-b791693123f9" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="insync03.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.project b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.project
new file mode 100755
index 0000000..21c1db5
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>insync03</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/build.xml
new file mode 100755
index 0000000..aeab9cb
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="insync03" />
+ <property name="application.file" value="insync03" />
+ <property name="application.bin.dir" value="${samples-spring.war}/insync03" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync03/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[24/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/throttle/messaging_ThrottleInbound.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/throttle/messaging_ThrottleInbound.mxml b/apps/team/features/messaging/throttle/messaging_ThrottleInbound.mxml
deleted file mode 100755
index b14661f..0000000
--- a/apps/team/features/messaging/throttle/messaging_ThrottleInbound.mxml
+++ /dev/null
@@ -1,155 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A sample that one can use to talk to messaging destinations with inbound
- throttling and ERROR or IGNORE policies using different channels supported
- by BlazeDS. Destinations have low inbound throttling limits and the sample
- can be used to generate high number of message to see inbound throttling
- handled according to the policy.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Destination to use "/>
- <mx:ComboBox id="destinationsCB" dataProvider="{destinations}" selectedIndex="0" width="300"
- change="setupChannelsCB();"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Channel to use "/>
- <mx:ComboBox id="channelsCB" selectedIndex="0" width="200"
- change="setupComponents()"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send 10 Foo{counter}" click="sendMessage(10)"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:HBox width="100%">
- <mx:Spacer width="100%"/>
- <mx:CheckBox id="dmCB" label="Display received messages?" selected="{displayMessages}"/>
- <mx:Button label="Clear" click='output.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="output" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Binding source="dmCB.selected" destination="displayMessages"/>
-
- <mx:Producer id="producer"
- fault="producerFaultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- fault="consumerFaultHandler(event)"
- message="consumerMessageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.collections.ArrayCollection;
- import mx.messaging.ChannelSet;
- import mx.messaging.config.ServerConfig;
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- [Bindable]
- public var destinations:Array = ['messaging_ThrottleInbound_PolicyError',
- 'messaging_ThrottleInbound_PolicyIgnore'];
- [Bindable]
- public var destinationId:String;
- [Bindable]
- public var displayMessages:Boolean;
-
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- displayMessages = true;
- setupChannelsCB();
- setupComponents();
- }
-
- private function setupChannelsCB():void
- {
- destinationId = destinationsCB.selectedLabel;
- channelsCB.dataProvider = new ArrayCollection((ServerConfig.getChannelSet(destinationId) as ChannelSet).channelIds);
- }
-
- private function setupComponents():void
- {
- // Setup consumer.
- consumer.unsubscribe();
- consumer.destination = destinationId;
- var cs:ChannelSet = new ChannelSet();
- cs.addChannel(ServerConfig.getChannel(channelsCB.selectedItem.toString()));
- consumer.channelSet = cs;
-
- // Setup producer.
- producer.destination = destinationId;
- producer.channelSet = cs;
- }
-
- private function sendMessage(n:int=1):void
- {
- var msg:AsyncMessage = null;
- for (var i:int = 0; i < n; i++)
- {
- msg = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
- }
-
- private function consumerMessageHandler(event:MessageEvent):void
- {
- if (displayMessages)
- output.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function consumerFaultHandler(event:MessageFaultEvent):void
- {
- output.text += "Consumer received fault: " + event.faultString + "\n";
- }
-
- private function producerFaultHandler(event:MessageFaultEvent):void
- {
- output.text += "Producer received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/throttle/messaging_ThrottleOutbound.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/throttle/messaging_ThrottleOutbound.mxml b/apps/team/features/messaging/throttle/messaging_ThrottleOutbound.mxml
deleted file mode 100755
index 5fbbaf9..0000000
--- a/apps/team/features/messaging/throttle/messaging_ThrottleOutbound.mxml
+++ /dev/null
@@ -1,228 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A sample that one can use to talk to messaging destinations with outbound
- throttling and IGNORE policy using different channels supported by BlazeDS.
- Destinations have low outbound throttling limits and the sample
- can be used to generate high number of message to see outbound throttling
- handled according to the policy.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Destination to use "/>
- <mx:ComboBox id="destinationsCB" dataProvider="{destinations}" selectedIndex="0" width="300"
- change="setupChannelsCB();"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Channel to use "/>
- <mx:ComboBox id="channelsCB" selectedIndex="0" width="200"
- change="setupComponents();"/>
- <mx:Button label="Poll" click="poll()"
- enabled="{!currentChannel.mx_internal::realtime}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Push messages"/>
- <mx:Label text="Push rate per second"/>
- <mx:TextInput id="ti1" width="50" text="10"/>
- <mx:Label text="Number of runs"/>
- <mx:TextInput id="ti2" width="50" text="-1"/>
- <mx:Button label="Start push" click="startPush();"/>
- <mx:Button label="Stop push" click="stopPush();"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumerSubscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumerUnsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Message receive rate"/>
- <mx:Label text="In the last second: {currentRate.toFixed(2)}m/s"/>
- <mx:Label text="Since subscribe: {globalRate.toFixed(2)}m/s"/>
- </mx:HBox>
- <mx:HBox width="100%">
- <mx:Spacer width="100%"/>
- <mx:CheckBox id="dmCB" label="Display received messages?" selected="{displayMessages}"/>
- <mx:Button label="Clear" click='output.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="output" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Binding source="dmCB.selected" destination="displayMessages"/>
-
- <mx:RemoteObject id="serverPushRO" destination="serverPushRO"/>
-
- <mx:Consumer id="consumer"
- fault="consumerFaultHandler(event)"
- message="consumerMessageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.collections.ArrayCollection;
- import mx.core.mx_internal;
- import mx.messaging.ChannelSet;
- import mx.messaging.Channel;
- import mx.messaging.channels.PollingChannel;
- import mx.messaging.config.ServerConfig;
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var currentChannel:Channel;
- [Bindable]
- public var destinations:Array = ['messaging_ThrottleOutbound_PolicyIgnore'];
- [Bindable]
- public var destinationId:String;
- [Bindable]
- public var displayMessages:Boolean;
-
- // How often to measure the message rate.
- public const MEASUREMENT_TIME_MILLIS:int = 1000;
- private var measurementTimer:Timer;
-
- // Used to keep track of global message receive rate since subscription.
- [Bindable]
- public var globalRate:Number;
- private var globalStartTime:Number;
- private var globalMessages:int;
-
- // Used to keep track of message receive rate in the last second.
- [Bindable]
- private var currentRate:Number;
- [Bindable]
- private var interval:Number;
- private var startTime:int = 0;
- private var currentMessages:int;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- displayMessages = true;
- setupChannelsCB();
- setupComponents();
-
- measurementTimer = new Timer(MEASUREMENT_TIME_MILLIS, 0);
- measurementTimer.addEventListener(TimerEvent.TIMER, measurementTimerHandler);
- }
-
- private function setupChannelsCB():void
- {
- destinationId = destinationsCB.selectedLabel;
- channelsCB.dataProvider = new ArrayCollection((ServerConfig.getChannelSet(destinationId) as ChannelSet).channelIds);
- }
-
- private function setupComponents():void
- {
- currentChannel = ServerConfig.getChannel(channelsCB.selectedItem.toString());
-
- consumer.unsubscribe();
- consumer.destination = destinationId;
- var cs:ChannelSet = new ChannelSet();
- cs.addChannel(currentChannel);
- consumer.channelSet = cs;
- }
-
- private function consumerSubscribe():void
- {
- globalStartTime = getTimer();
- globalMessages = 0;
- currentMessages = 0;
- startTime = 0;
-
- if (!measurementTimer.running)
- measurementTimer.start();
-
- consumer.subscribe();
- }
-
- private function consumerUnsubscribe():void
- {
- globalRate = 0;
- currentRate = 0;
- if (measurementTimer.running)
- measurementTimer.stop();
- if (consumer.subscribed)
- consumer.unsubscribe();
- }
-
- private function consumerMessageHandler(event:MessageEvent):void
- {
- currentMessages++;
- globalMessages++;
-
- if (displayMessages)
- output.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function consumerFaultHandler(event:MessageFaultEvent):void
- {
- output.text += "Consumer received fault: " + event.faultString + "\n";
- }
-
- private function measurementTimerHandler(event:TimerEvent):void
- {
- var now:int = getTimer();
- if (startTime == 0)
- {
- globalStartTime = now;
- startTime = now;
- }
-
- var temp:Number = Number(now - startTime);
- if (temp >= MEASUREMENT_TIME_MILLIS)
- {
- interval = temp;
- currentRate = 1000.0 * currentMessages / interval;
- globalRate = 1000.0 * globalMessages / Number(now - globalStartTime);
- currentMessages = 0;
- startTime = now;
- }
- }
-
- private function startPush():void
- {
- serverPushRO.startPush(destinationId, uint(ti1.text), 1000, uint(ti2.text));
- }
-
- private function stopPush():void
- {
- serverPushRO.stopPush();
- }
-
- private function poll():void
- {
- output.text += "Polling" + "\n";
- (currentChannel as PollingChannel).poll();
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/remoting/externalizable/ExternalizableClass.as
----------------------------------------------------------------------
diff --git a/apps/team/features/remoting/externalizable/ExternalizableClass.as b/apps/team/features/remoting/externalizable/ExternalizableClass.as
deleted file mode 100755
index fefddd5..0000000
--- a/apps/team/features/remoting/externalizable/ExternalizableClass.as
+++ /dev/null
@@ -1,56 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- import flash.utils.IDataInput;
- import flash.utils.IDataOutput;
- import flash.utils.IExternalizable;
-
- /**
- * A simple class that uses IExternalizable interface to read and write its properties.
- */
- [RemoteClass(alias="features.remoting.externalizable.ExternalizableClass")]
- public class ExternalizableClass implements IExternalizable
- {
- public var property1:String;
- public var property2:String;
-
- public function ExternalizableClass()
- {
- }
-
- public function readExternal(input:IDataInput):void
- {
- property1 = input.readObject() as String;
- property2 = input.readObject() as String;
- }
-
- public function writeExternal(output:IDataOutput):void
- {
- output.writeObject(property1);
- output.writeObject(property2);
- }
-
- public function toString():String
- {
- return "ExternalizableClass [property1: " + property1 + ", property2: " + property2 + "]";
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/remoting/externalizable/remoting_Externalizable.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/remoting/externalizable/remoting_Externalizable.mxml b/apps/team/features/remoting/externalizable/remoting_Externalizable.mxml
deleted file mode 100755
index 25cd31d..0000000
--- a/apps/team/features/remoting/externalizable/remoting_Externalizable.mxml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!--
- A remoting example that sends and receives classes that use Externalizable
- interfaces to read and writes their properties.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Enter properties of the ExternalizableClass"/>
- <mx:TextInput id="ti1" text="property1"/>
- <mx:TextInput id="ti2" text="property2"/>
- <mx:Button label="Send" click="echo()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="remoting_AMF"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- private var value:ExternalizableClass = new ExternalizableClass();
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function echo():void
- {
- value.property1 = ti1.text;
- value.property2 = ti2.text;
- remoteObject.echoExternalizableClass(value);
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- var returnedValue:ExternalizableClass = event.result as ExternalizableClass;
- ta.text += "Server responded: " + returnedValue + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/remoting/filteredAckRemoting.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/remoting/filteredAckRemoting.mxml b/apps/team/features/remoting/filteredAckRemoting.mxml
deleted file mode 100755
index 1a888aa..0000000
--- a/apps/team/features/remoting/filteredAckRemoting.mxml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A simple remoting sample where client sends a text and server simply
- echoes it back using an AMF channel.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Enter a text for the server to echo"/>
- <mx:TextInput id="ti" text="Hello World!"/>
- <mx:Button label="Send" click="echo()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="filteredAck"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function echo():void
- {
- var text:String = ti.text;
- remoteObject.echo(text);
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "Server responded: "+ event.result + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/remoting/filteredFaultRemoting.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/remoting/filteredFaultRemoting.mxml b/apps/team/features/remoting/filteredFaultRemoting.mxml
deleted file mode 100755
index 586ddf8..0000000
--- a/apps/team/features/remoting/filteredFaultRemoting.mxml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A simple remoting sample where client sends a text and server simply
- echoes it back using an AMF channel.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Enter a text for the server to echo"/>
- <mx:TextInput id="ti" text="Hello World!"/>
- <mx:Button label="Send" click="echo()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="filteredFault"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function echo():void
- {
- var text:String = ti.text;
- remoteObject.echo(text);
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "Server responded: "+ event.result + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/remoting/remoting_AMF.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/remoting/remoting_AMF.mxml b/apps/team/features/remoting/remoting_AMF.mxml
deleted file mode 100755
index f0d876f..0000000
--- a/apps/team/features/remoting/remoting_AMF.mxml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A simple remoting sample where client sends a text and server simply
- echoes it back using an AMF channel.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Enter a text for the server to echo"/>
- <mx:TextInput id="ti" text="Hello World!"/>
- <mx:Button label="Send" click="echo()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="remoting_AMF"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function echo():void
- {
- var text:String = ti.text;
- remoteObject.echo(text);
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "Server responded: "+ event.result + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/remoting/remoting_AMFX.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/remoting/remoting_AMFX.mxml b/apps/team/features/remoting/remoting_AMFX.mxml
deleted file mode 100755
index 0f2b7f0..0000000
--- a/apps/team/features/remoting/remoting_AMFX.mxml
+++ /dev/null
@@ -1,77 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A simple remoting sample where client sends a text and server simply
- echoes it back using an AMF channel.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Enter a text for the server to echo"/>
- <mx:TextInput id="ti" text="Hello World!"/>
- <mx:Button label="Send" click="echo()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="remoting_AMFX"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function echo():void
- {
- var text:String = ti.text;
- remoteObject.echo(text);
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "Server responded: "+ event.result + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/remoting/remoting_AMF_Dictionary.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/remoting/remoting_AMF_Dictionary.mxml b/apps/team/features/remoting/remoting_AMF_Dictionary.mxml
deleted file mode 100755
index c7f9488..0000000
--- a/apps/team/features/remoting/remoting_AMF_Dictionary.mxml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A remoting sample where client sends the new Dictionary type to the server
- which in turn echoes the Dictionary back using AMF.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Button label="Echo Sparse Array" click="echoSparseArray()"/>
- <mx:Button label="Echo Dense Array" click="echoDenseArray()"/>
- <mx:Button label="Echo Map" click="echoMap()"/>
- <mx:Button label="Echo Dictionary" click="echoDictionary()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="remoting_AMF"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function echoDenseArray():void
- {
- var array:Array = [];
- for (var i:int = 0; i < 5; i++)
- array[i] = "value" + i;
- remoteObject.echoDenseArray(array);
- }
-
- private function echoSparseArray():void
- {
- var array:Array = [];
- for (var i:int = 0; i < 5; i++)
- array["foo" + i] = "value" + i;
- remoteObject.echoSparseArray(array);
- }
-
- private function echoMap():void
- {
- var map:Object = new Object();
- for (var i:int = 0; i < 5; i++)
- map["key"+ i] = "value" + i;
- remoteObject.echoMap(map);
- }
-
- private function echoDictionary():void
- {
- var dict:Dictionary = new Dictionary(true);
- for (var i:int = 0; i < 5; i++)
- dict["key"+ i] = "value" + i;
- remoteObject.echoDictionary(dict);
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "Server responded: "+ event.result + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/remoting/remoting_AMF_Legacy.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/remoting/remoting_AMF_Legacy.mxml b/apps/team/features/remoting/remoting_AMF_Legacy.mxml
deleted file mode 100755
index be09cad..0000000
--- a/apps/team/features/remoting/remoting_AMF_Legacy.mxml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
- <!--
- This is an example of legacy way of making remote object calls with a
- NetConnection, rather than RemoteObject.
- -->
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Enter a text for the server to echo"/>
- <mx:TextInput id="ti" text="Hello World!"/>
- <mx:Button label="Send" click="echo()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Script>
- <![CDATA[
- import flash.net.NetConnection;
- import flash.net.ObjectEncoding;
- import flash.net.Responder;
-
- private var nc:NetConnection
-
- private function creationCompleteHandler():void
- {
- nc = new NetConnection();
- nc.client = this;
- nc.objectEncoding = ObjectEncoding.AMF0;
- nc.connect("http://localhost:8400/team/messagebroker/amf" );
- }
-
- private function echo():void
- {
- nc.call( "remoting_AMF.echo", new Responder( resultHandler, faultHandler ), ti.text );
- }
-
- private function resultHandler(result:Object):void
- {
- ta.text += "Server responded: "+ result + "\n";
- }
-
- private function faultHandler(fault:Object):void
- {
- ta.text += "Received fault: " + fault + "\n";
- }
-
- /**
- * Called when AppendToGatewayUrl header is in the AMF message.
- */
- public function AppendToGatewayUrl(value:String):void
- {
- //No-op
- }
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/remoting/remoting_AMF_ReadOnly.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/remoting/remoting_AMF_ReadOnly.mxml b/apps/team/features/remoting/remoting_AMF_ReadOnly.mxml
deleted file mode 100755
index b9aa571..0000000
--- a/apps/team/features/remoting/remoting_AMF_ReadOnly.mxml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A simple remoting sample where the client receives a read-only object
- from the server.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Button label="Echo read-only" click="remoteObject.echoReadOnly()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="remoting_AMF"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "Server responded: "+ event.result.property + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/remoting/remoting_AMF_Vector.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/remoting/remoting_AMF_Vector.mxml b/apps/team/features/remoting/remoting_AMF_Vector.mxml
deleted file mode 100755
index b4c6d69..0000000
--- a/apps/team/features/remoting/remoting_AMF_Vector.mxml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A remoting sample where client sends the new Vector type to the server
- which in turn echoes the Vector back using AMF. Make sure you enable the
- prefer-vectors flag in the channel configuration.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Button label="Echo Int Vector" click="echoIntVector()"/>
- <mx:Button label="Echo UInt Vector" click="echoUIntVector()"/>
- <mx:Button label="Echo Double Vector" click="echoDoubleVector()"/>
- <mx:Button label="Echo Object Vector" click="echoObjectVector()"/>
- <mx:Button label="Echo String Vector" click="echoStringVector()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- </mx:HBox>
- <mx:HBox>
- <mx:Button label="Echo Fixed Int Vector" click="echoIntVector(true)"/>
- <mx:Button label="Echo Fixed UInt Vector" click="echoUIntVector(true)"/>
- <mx:Button label="Echo Fixed Double Vector" click="echoDoubleVector(true)"/>
- <mx:Button label="Echo Fixed Object Vector" click="echoObjectVector(true)"/>
- <mx:Button label="Echo Fixed String Vector" click="echoStringVector(true)"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="remoting_AMF"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function echoIntVector(fixed:Boolean=false):void
- {
- var vector:Vector.<int> = new Vector.<int>(5, fixed);
- for (var i:int = 0; i < 5; i++)
- vector[i] = i;
- remoteObject.echoIntVector(vector);
- }
-
- private function echoUIntVector(fixed:Boolean=false):void
- {
- var vector:Vector.<uint> = new Vector.<uint>(5, fixed);
- for (var i:uint = 0; i < 5; i++)
- vector[i] = uint.MAX_VALUE;
- remoteObject.echoUIntVector(vector);
- }
-
- private function echoDoubleVector(fixed:Boolean=false):void
- {
- var vector:Vector.<Number> = new Vector.<Number>(5, fixed);
- for (var i:int = 0; i < 5; i++)
- vector[i] = Number(i);
- remoteObject.echoDoubleVector(vector);
- }
-
- private function echoObjectVector(fixed:Boolean=false):void
- {
- var vector:Vector.<Object> = new Vector.<Object>(5, fixed);
- for (var i:int = 0; i < 5; i++)
- vector[i] = "value" + i;
- remoteObject.echoObjectVector(vector);
- }
-
- private function echoStringVector(fixed:Boolean=false):void
- {
- var vector:Vector.<String> = new Vector.<String>(5, fixed);
- for (var i:int = 0; i < 5; i++)
- vector[i] = "value" + i;
- remoteObject.echoStringVector(vector);
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "Server responded: "+ event.result + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/runtimeconfig/runtimeconfig_MessageDestination.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/runtimeconfig/runtimeconfig_MessageDestination.mxml b/apps/team/features/runtimeconfig/runtimeconfig_MessageDestination.mxml
deleted file mode 100755
index 7ea1683..0000000
--- a/apps/team/features/runtimeconfig/runtimeconfig_MessageDestination.mxml
+++ /dev/null
@@ -1,150 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- This sample calls a remote object to dynamically create a message
- destination and tries to use that destination.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Button label="Create Destination" click="createDestination();"
- enabled="{!destinationCreated}"/>
- <mx:Button label="Remove Destination" click="removeDestination();"
- enabled="{destinationCreated}"/>
- </mx:HBox>
- <mx:HBox enabled="{destinationCreated}">
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox enabled="{destinationCreated}">
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="runtimeConfigurator"
- destination="RuntimeConfigurator"/>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Poll_Runtime"
- fault="messageFaultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Poll_Runtime"
- fault="messageFaultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.ChannelSet;
- import mx.messaging.channels.AMFChannel;
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.rpc.AsyncToken;
- import mx.rpc.AsyncResponder;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var destinationCreated:Boolean = false;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- // Need to set the ChannelSet for dynamically created destinations.
- // This channel should match with whatever channel the destination uses.
- var channelSet:ChannelSet = new ChannelSet();
- var channel:AMFChannel = new AMFChannel("my-amf-poll", "http://localhost:8400/team/messagebroker/myamfpoll");
- channelSet.addChannel(channel);
- producer.channelSet = channelSet;
- consumer.channelSet = channelSet;
- }
-
- private function createDestination():void
- {
- var token:AsyncToken = runtimeConfigurator.createMessageDestination();
- token.addResponder(new AsyncResponder(
- function (event:ResultEvent, token:Object=null):void
- {
- ta.text += "RuntimeConfigurator result: "+ event.result + "\n";
- destinationCreated = true;
- },
- function (event:FaultEvent, token:Object=null):void
- {
- ta.text += "RuntimeConfigurator fault: " + event.fault + "\n";
- destinationCreated = false;
- }));
- }
-
- private function removeDestination():void
- {
- var token:AsyncToken = runtimeConfigurator.removeMessageDestination();
- token.addResponder(new AsyncResponder(
- function (event:ResultEvent, token:Object=null):void
- {
- ta.text += "RuntimeConfigurator result: "+ event.result + "\n";
- destinationCreated = false;
- },
- function (event:FaultEvent, token:Object=null):void
- {
- ta.text += "RuntimeConfigurator fault: " + event.fault + "\n";
- destinationCreated = false;
- }));
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo";
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function messageFaultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/runtimeconfig/runtimeconfig_MessageDestinationWithJMS.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/runtimeconfig/runtimeconfig_MessageDestinationWithJMS.mxml b/apps/team/features/runtimeconfig/runtimeconfig_MessageDestinationWithJMS.mxml
deleted file mode 100755
index 4aa0167..0000000
--- a/apps/team/features/runtimeconfig/runtimeconfig_MessageDestinationWithJMS.mxml
+++ /dev/null
@@ -1,131 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- This sample calls a remote object to dynamically create a message
- destination that uses JMSAdapter and tries to use that destination.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Button label="Create Destination" click="createDestination();"/>
- </mx:HBox>
- <mx:HBox enabled="{destinationCreated}">
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox enabled="{destinationCreated}">
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="runtimeConfigurator"
- destination="RuntimeConfigurator"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Poll_JMS_Topic_Runtime"
- fault="messageFaultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Poll_JMS_Topic_Runtime"
- fault="messageFaultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.ChannelSet;
- import mx.messaging.channels.AMFChannel;
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var destinationCreated:Boolean = false;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- // Need to set the ChannelSet for dynamically created destinations.
- // This channel should match with whatever channel the destination uses.
- var channelSet:ChannelSet = new ChannelSet();
- var channel:AMFChannel = new AMFChannel("my-amf-poll", "http://localhost:8400/team/messagebroker/myamfpoll");
- channelSet.addChannel(channel);
- producer.channelSet = channelSet;
- consumer.channelSet = channelSet;
- }
-
- private function createDestination():void
- {
- runtimeConfigurator.createMessageDestinationWithJMSAdapter();
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "RuntimeConfigurator result: "+ event.result + "\n";
- destinationCreated = true;
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "RuntimeConfigurator fault: " + event.fault + "\n";
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo";
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function messageFaultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/security-constraints/README.txt
----------------------------------------------------------------------
diff --git a/apps/team/features/security-constraints/README.txt b/apps/team/features/security-constraints/README.txt
deleted file mode 100755
index 3f7a722..0000000
--- a/apps/team/features/security-constraints/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-This is an overview of how to secure BlazeDS destinations:
-
-1- In services-config.xml, under security section, uncomment a login command for your application server.
-2- In services-config.xml, under security section, define a security constraint that your destinatios will refer to. A security constraint can be basic or custom and it can have one or more roles. Basic authentication means a browser window pops up asking the user for username and password when the client tries to access the destination. Custom authentication means instead of a browser window, the Flex application itself passes the authentication to BlazeDS. Roles are application server specific. For example, in Tomcat, they are defined in conf/tomcat-user.xml file.
-3- In your destination definition, refer to the security constraint you defined in the previous step with "<security-constraint ref=""/>" tag.
-4- If your destinations are using basic authentication, then no extra work is required in your Flex application. If they are using custom authentication, then you need to pass the credentials to BlazeDS, preferably using ChannelSet.login method and listening for authentication success or failure with AsyncToken pattern.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/security-constraints/securityConstraint_Basic.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/security-constraints/securityConstraint_Basic.mxml b/apps/team/features/security-constraints/securityConstraint_Basic.mxml
deleted file mode 100755
index f9ecde9..0000000
--- a/apps/team/features/security-constraints/securityConstraint_Basic.mxml
+++ /dev/null
@@ -1,71 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A simple remoting sample where client sends a text and server simply
- echoes it back. The destination is secured using basic security constraint
- where a browser window pops up for username and password.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Enter a text for the server to echo"/>
- <mx:TextInput id="ti" text="Hello World!"/>
- <mx:Button label="Send" click="remoteObject.echo(ti.text);"/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="remoting_AMF_SecurityConstraint_Basic"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "Server responded: "+ event.result + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/security-constraints/securityConstraint_Custom.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/security-constraints/securityConstraint_Custom.mxml b/apps/team/features/security-constraints/securityConstraint_Custom.mxml
deleted file mode 100755
index de90fef..0000000
--- a/apps/team/features/security-constraints/securityConstraint_Custom.mxml
+++ /dev/null
@@ -1,140 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A simple remoting sample where client sends a text and server simply
- echoes it back. The destination is secured using custom security constraint
- where instead of a browser window for username and password, application
- itself handles authentication.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Username"/>
- <mx:TextInput id="unameTI" text="sampleuser"/>
- <mx:Label text="Password"/>
- <mx:TextInput id="passTI" text="samplepassword"/>
- <mx:Button label="Login" click="login(unameTI.text, passTI.text)"/>
- <mx:Button label="Logout" click="logout()"/>
- <mx:CheckBox id="authenticatedCB" label="Authenticated?"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Enter a text for the server to echo"/>
- <mx:TextInput id="ti" text="Hello World!"/>
- <mx:Button label="Echo" click="remoteObject.echo(ti.text);" enabled="{authenticatedCB.selected}"/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="remoting_AMF_SecurityConstraint_Custom"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.binding.utils.BindingUtils;
- import mx.controls.Alert;
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
- import mx.messaging.config.ServerConfig;
- import mx.rpc.AsyncResponder;
- import mx.rpc.AsyncToken;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- // Pre-initialize channelSet, so we can login and bind to authenticatedCB.
- if (remoteObject.channelSet == null)
- {
- remoteObject.channelSet = ServerConfig.getChannelSet(remoteObject.destination);
- BindingUtils.bindProperty(authenticatedCB, "selected", remoteObject.channelSet, "authenticated");
- }
- }
-
- private function login(username:String, password:String):void
- {
- // Login and handle success or failure of authentication
- var token:AsyncToken = remoteObject.channelSet.login(username, password);
- token.addResponder(new AsyncResponder(
- function(event:ResultEvent, token:Object=null):void
- {
- switch(event.result)
- {
- case "success":
- trace("authentication success");
- break;
- default:
- trace(event.result);
- }
- },
- function(event:FaultEvent, token:Object=null):void
- {
- switch(event.fault.faultCode)
- {
- case "Client.Authentication":
- default:
- Alert.show("Login failure: " + event.fault.faultString);
- }
- }));
- }
-
- private function logout():void
- {
- // Logout and handle success or failure of authentication
- var token:AsyncToken = remoteObject.channelSet.logout();
- token.addResponder(new AsyncResponder(
- function(event:ResultEvent, token:Object=null):void
- {
- switch (event.result)
- {
- case "success":
- authenticatedCB.selected = false;
- break;
- default:
- trace(event.result);
- }
- },
- function(event:FaultEvent, token:Object=null):void
- {
- trace(event.fault);
- }));
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "Server responded: "+ event.result + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/security-constraints/securityConstraint_Legacy.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/security-constraints/securityConstraint_Legacy.mxml b/apps/team/features/security-constraints/securityConstraint_Legacy.mxml
deleted file mode 100755
index 501c44c..0000000
--- a/apps/team/features/security-constraints/securityConstraint_Legacy.mxml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- A simple remoting sample where client sends a text and server simply
- echoes it back. The destination is secured using custom security constraint
- where instead of a browser window for username and password, application
- itself handles authentication.
-
- Note that this sample uses legacy authentication where RemoteObject#setCredentials
- are used instead of ChannelSet#login. This is not recommended.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Username"/>
- <mx:TextInput id="unameTI" text="sampleuser"/>
- <mx:Label text="Password"/>
- <mx:TextInput id="passTI" text="samplepassword"/>
- <mx:Button label="SetCredentials" click="setCredentials(unameTI.text, passTI.text)"/>
- <mx:Button label="Logout" click="logout()"/>
- <mx:CheckBox id="authenticatedCB" label="Authenticated?"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Enter a text for the server to echo"/>
- <mx:TextInput id="ti" text="Hello World!"/>
- <mx:Button label="Echo" click="remoteObject.echo(ti.text);"/>
- </mx:HBox>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:RemoteObject id="remoteObject"
- destination="remoting_AMF_SecurityConstraint_Custom"
- result="resultHandler(event)"
- fault="faultHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.binding.utils.BindingUtils;
- import mx.controls.Alert;
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
- import mx.messaging.config.ServerConfig;
- import mx.rpc.AsyncResponder;
- import mx.rpc.AsyncToken;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- // Pre-initialize channelSet, so we can bind to authenticatedCB.
- if (remoteObject.channelSet == null)
- {
- remoteObject.channelSet = ServerConfig.getChannelSet(remoteObject.destination);
- BindingUtils.bindProperty(authenticatedCB, "selected", remoteObject.channelSet, "authenticated");
- }
- }
-
- private function setCredentials(username:String, password:String):void
- {
- remoteObject.setCredentials(username, password);
- }
-
- private function logout():void
- {
- remoteObject.logout();
- }
-
- private function resultHandler(event:ResultEvent):void
- {
- ta.text += "Server responded: "+ event.result + "\n";
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- ta.text += "Received fault: " + event.fault + "\n";
- }
-
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
[48/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/AdvancedPanel.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/AdvancedPanel.as b/apps/ds-console/console/containers/AdvancedPanel.as
deleted file mode 100755
index 9140987..0000000
--- a/apps/ds-console/console/containers/AdvancedPanel.as
+++ /dev/null
@@ -1,169 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console.containers
-{
- import console.ConsoleManager;
- import console.containers.*;
- import console.events.*;
- import mx.collections.ListCollectionView;
- import mx.rpc.events.ResultEvent;
- import mx.messaging.management.MBeanInfo;
- import mx.messaging.management.MBeanAttributeInfo;
- import mx.events.*;
- import mx.controls.Tree;
- import mx.controls.DataGrid;
- import flash.events.Event;
- import flash.events.MouseEvent;
- import mx.containers.Box;
-
- public class AdvancedPanel extends UpdateListener
- {
- private var display:AdvancedPanelDisplay;
- private var _manager:ConsoleManager;
- private var _currentMBeanName:String;
- private var _currentMBeanInfo:MBeanInfo;
-
- public function AdvancedPanel():void
- {
- super();
- initialize();
-
- percentWidth = 100;
- percentHeight = 100;
-
- display = new AdvancedPanelDisplay();
- this.addChild(display);
-
- label = "Generic Administration View";
-
- display.mbeanTree.addEventListener(ListEvent.CHANGE, manageMBean);
- display.attributeGrid.addEventListener(ListEvent.CHANGE, showSelectedValue);
- display.refreshButton.addEventListener(MouseEvent.CLICK, handleRefreshClick);
- display.operationsUI.tabnav = display.main;
-
- _manager = ConsoleManager.getInstance();
- _manager.registerListener(this, []);
- display.operationsUI.addEventListener(ManagementOperationInvokeEvent.INVOKE, _manager.invokeOperation);
- }
-
- public override function mbeanModelUpdate(model:Object):void
- {
- display.mbeanTree.dataProvider = model;
- }
-
- /**
- * Exposes a selected MBean for management.
- */
- private function manageMBean(e:Event):void
- {
- var node:Object = display.mbeanTree.selectedItem;
- if (node && node.hasOwnProperty("objectName"))
- {
- _currentMBeanName = node["objectName"].canonicalName;
- display.mbeanNameText.text = _currentMBeanName;
- _manager.getMBeanInfo(_currentMBeanName, this, handleMBeanInfo);
- }
- }
-
- /**
- * Handles the result of getMBeanInfo().
- */
- public function handleMBeanInfo(e:ResultEvent):void
- {
- _currentMBeanInfo = MBeanInfo(e.result);
- // Update string descriptions for the selected MBean.
- display.mbeanClassText.text = _currentMBeanInfo.className;
- display.mbeanDescriptionText.text = _currentMBeanInfo.description;
- display.mbeanInfoOutput.text = _currentMBeanInfo.toString();
- // Update the Operations tab.
- display.operationsUI.mbeanInfo = _currentMBeanInfo;
- display.operationsUI.mbeanName = _currentMBeanName;
- // Fetch current attribute values for the selected MBean.
- // Clear out currently selected attribute value.
- display.selectedValueText.text = "";
-
- if (_currentMBeanInfo.attributes.length)
- {
- _manager.getAllAttributes(_currentMBeanName, _currentMBeanInfo, this, handleAttributes);
- }
- }
-
- /**
- * Handles the refresh button click.
- */
- private function handleRefreshClick(event:MouseEvent):void
- {
- refreshAttributes();
- }
-
- /**
- * Refreshes the displayed attribute values for the currently selected MBean.
- */
- private function refreshAttributes():void
- {
- if (_currentMBeanInfo != null)
- {
- _manager.getAllAttributes(_currentMBeanName, _currentMBeanInfo, this, handleAttributes);
- }
- }
-
- /**
- * Handles the result of getAttributes().
- */
- private function handleAttributes(e:ResultEvent):void
- {
- var attribs:Array = e.result as Array;
- var attribLength:int = attribs.length;
- display.attributeGrid.dataProvider = e.result;
- // Show selected item value.
- var index:int = display.attributeGrid.selectedIndex;
- if (index != -1)
- {
- var item:Object = ListCollectionView(display.attributeGrid.dataProvider).getItemAt(index);
- if ((item != null) && (item.value != null))
- {
- display.selectedValueText.text = item.value.toString();
- }
- }
- else
- {
- display.selectedValueText.text = "";
- }
- }
-
-
- /**
- * Hack function to show the selected grid value - we should get rid of this with
- * a nice attributes grid that renders values nicely in a selectable fashion.
- */
- private function showSelectedValue(e:Event):void
- {
- var value:Object = DataGrid(e.target).selectedItem.value;
- if (value != null)
- {
- display.selectedValueText.text = value.toString();
- }
- else
- {
- display.selectedValueText.text = "null";
- }
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/AdvancedPanelDisplay.mxml
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/AdvancedPanelDisplay.mxml b/apps/ds-console/console/containers/AdvancedPanelDisplay.mxml
deleted file mode 100755
index 213e4a3..0000000
--- a/apps/ds-console/console/containers/AdvancedPanelDisplay.mxml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?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:Box xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:console="console.containers.*" xmlns="*" width="100%" height="100%">
-
- <mx:HDividedBox width="100%" height="100%">
-
- <mx:VBox height="100%" width="300">
- <mx:Label text="MBeans"/>
- <mx:Tree id="mbeanTree" height="100%" width="100%" />
- </mx:VBox>
-
- <mx:VBox id="mbeanDetails" height="100%" width="100%">
-
- <mx:HBox width="100%">
- <mx:Label text="Name: "/>
- <mx:Text id="mbeanNameText" width="100%" selectable="true"/>
- </mx:HBox>
-
- <mx:TabNavigator id="main" creationPolicy="all" width="100%" height="100%" tabWidth="150">
-
- <mx:VBox label="Attributes" width="100%" height="100%">
- <mx:HBox width="100%">
- <mx:Label text="Selected Value: "/>
- <mx:Text id="selectedValueText" text="" width="100%" selectable="true" />
- </mx:HBox>
- <mx:DataGrid id="attributeGrid" width="100%" height="100%" />
- <mx:Button label="Refresh" id="refreshButton" />
- </mx:VBox>
-
- <mx:VBox label="Operations" id="operationTab" width="100%" height="100%">
- <console:OperationSet id="operationsUI" />
- </mx:VBox>
-
- <mx:VBox label="Info" width="100%" height="100%" >
- <mx:HBox width="100%">
- <mx:Label text="MBean Class:"/>
- <mx:Text id="mbeanClassText" width="100%" selectable="true"/>
- </mx:HBox>
- <mx:HBox width="100%">
- <mx:Label text="Description:" />
- <mx:Text id="mbeanDescriptionText" width="100%" selectable="true"/>
- </mx:HBox>
- <mx:TextArea id="mbeanInfoOutput" height="100%" width="100%"/>
- </mx:VBox>
-
- </mx:TabNavigator>
-
- </mx:VBox>
-
- </mx:HDividedBox>
-
-</mx:Box>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/DefaultPanel.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/DefaultPanel.as b/apps/ds-console/console/containers/DefaultPanel.as
deleted file mode 100755
index 9b3bf0c..0000000
--- a/apps/ds-console/console/containers/DefaultPanel.as
+++ /dev/null
@@ -1,41 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console.containers
-{
- import console.ConsoleManager;
- import mx.containers.Panel;
- import flash.events.Event;
-
- public class DefaultPanel extends UpdateListener
- {
- private var display:DefaultPanelDisplay;
-
- public function DefaultPanel():void
- {
- super();
- display = new DefaultPanelDisplay;
- this.addChild(display);
- label = "Console";
-
- // No data is ever used, but to ensure compatibility with the rest of
- // the app this panel still registers with the ConsoleManager
- ConsoleManager.getInstance().registerListener(this, []);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/DefaultPanelDisplay.mxml
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/DefaultPanelDisplay.mxml b/apps/ds-console/console/containers/DefaultPanelDisplay.mxml
deleted file mode 100755
index 16b3bea..0000000
--- a/apps/ds-console/console/containers/DefaultPanelDisplay.mxml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?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:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
- <mx:TextArea width="100%" height="20%" editable="false" enabled="true" fontSize="12" paddingLeft="10" paddingRight="10">
- <mx:htmlText>
- <![CDATA[
- <font size="18">Welcome to the <strong>Administration Console</font><br />
- Get started by choosing a panel in the tab navigation above.<br />
- ]]>
- </mx:htmlText>
- </mx:TextArea>
-</mx:VBox>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/DestinationManager.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/DestinationManager.as b/apps/ds-console/console/containers/DestinationManager.as
deleted file mode 100755
index 71ca7bc..0000000
--- a/apps/ds-console/console/containers/DestinationManager.as
+++ /dev/null
@@ -1,238 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console.containers
-{
- import console.data.Bindable3DHashMap;
- import console.ConsoleManager;
- import mx.collections.ArrayCollection;
- import mx.events.ListEvent;
- import flash.events.Event;
- import mx.charts.LineChart;
- import mx.charts.series.LineSeries;
- import mx.controls.listClasses.ListBase;
- import mx.events.CollectionEvent;
-
- public class DestinationManager extends UpdateListener
- {
- private static const pollableTypes:Array = [
- ConsoleManager.DESTINATION_POLLABLE ];
-
- private var _manager:ConsoleManager;
- private var display:DestinationManagerDisplay;
- private var selectedDestinationId:String;
- private var selectedMBean:String;
- private var dataCache:Bindable3DHashMap;
- private var pollableAttributes:Object;
-
- [Bindable]
- private var selectedBeanProperties:ArrayCollection;
-
- [Bindable]
- private var selectedPropertyValues:ArrayCollection;
-
- public override function dataUpdate(type:int, data:Object):void
- {
- var dataArray:ArrayCollection = new ArrayCollection;
-
- // This finds any exposed properties under any destination node and
- // adds them to the proper data structures so that all data in MBeans
- // underneath destinations can be accesed by the destination's id
- for (var name:String in data)
- {
- var mapKey:String;
- var mapValue:String;
-
- // Gets all properties for this MBean
- var propertyArrayForMBean:Array = data[name];
-
- // split the mbean name on the commas, then split on the periods and get the last
- // type. if it contains destination, insert it into the array
- // otherwise find the destination tag and insert it into it's data cache key.
- var mbeanNames:Array = name.split(",");
-
- // find the actual type of this MBean, and if it is a Destination, we can use the id
- // as the map key, otherwise, we have to find the MBean's parent which is a Destination
- var types:Array = (mbeanNames[mbeanNames.length - 1] as String).split(".");
- if ((types[types.length - 1] as String).indexOf("Destination") >= 0)
- {
- // we are going after the id pairing here, most often it will be the second
- // to last pair but since WAS 6.1 inserts nodes and servers into
- // the MBean name it may not be the case. For optimization we'll still
- // go after the second to last pair, but will verify that this is indeed
- // the id pair and if not will look for it explicitly.
- var namePair:Array = (mbeanNames[mbeanNames.length - 2] as String).split("=");
-
- mapKey = namePair[0];
- mapValue = namePair[1];
- if (mapKey != "id")
- {
- // did not find id where expected go through entire name pair collection
- // looking for the id pair
- for each (var mbeanNamePair:String in mbeanNames)
- {
- var loopNamePair:Array = mbeanNamePair.split("=");
- mapKey =loopNamePair[0];
- mapValue = loopNamePair[1];
- if (mapKey == "id")
- {
- break;
- }
- }
- }
- }
- else
- {
- for each (var id:String in mbeanNames)
- {
- if (id.indexOf("Destination") >= 0)
- {
- // Get the Destination's id name as the key into the map
- mapValue = id.split("=")[1];
- break;
- }
- }
- }
-
- // For each property, add the property and value to the appropriate map
- for (var i:int = 0; i < propertyArrayForMBean.length; i++)
- {
- if (pollableTypes.indexOf(type) >= 0)
- dataCache.update(mapValue, propertyArrayForMBean[i].name, propertyArrayForMBean[i].value);
- else
- dataCache.updateNoPollable(mapValue, propertyArrayForMBean[i].name, propertyArrayForMBean[i].value)
- }
- }
- }
-
- public override function mbeanModelUpdate(model:Object):void
- {
- refreshDestinations();
- }
-
- public function DestinationManager():void
- {
- super();
- display = new DestinationManagerDisplay;
- this.addChild(display);
-
- this.label = "Destination Management";
-
- _manager = ConsoleManager.getInstance();
- var registerTypes:Array = [
- {type: ConsoleManager.DESTINATION_GENERAL, poll: false},
- {type: ConsoleManager.DESTINATION_POLLABLE, poll: true},
- ];
-
- _manager.registerListener(this, registerTypes);
- display.dataList.addEventListener(ListEvent.CHANGE, selectedService);
- display.httpList.addEventListener(ListEvent.CHANGE, selectedService);
- display.messageList.addEventListener(ListEvent.CHANGE, selectedService);
- display.remotingList.addEventListener(ListEvent.CHANGE, selectedService);
-
- display.destinationAttributes.addEventListener(ListEvent.CHANGE, selectedAttribute);
-
- pollableAttributes = new Object;
- dataCache = new Bindable3DHashMap();
-
- selectedBeanProperties = new ArrayCollection();
- selectedPropertyValues = new ArrayCollection();
- }
-
- private function selectedAttribute(e:Event):void
- {
- var property:String = e.target.selectedItem.Property as String;
- var ret:ArrayCollection = dataCache.getBindableDataArray(selectedDestinationId, property);
- if ((ret != null) && (ret.length >= 0))
- {
- display.attrgraph.dataProvider = ret;
- display.graphLabel.text = property;
- }
- /*
- return;
-
- for (var type:* in pollableAttributes)
- {
- for each (var pollable:Object in pollableAttributes[type][selectedDestinationId])
- {
- if (pollable.name == property)
- {
- display.attrgraph.dataProvider = dataCache.getBindableDataArray(selectedDestinationId, property);
- display.graphLabel.text = property;
- return;
- }
- }
- }
- */
- }
-
- private function selectedService(e:Event):void
- {
- selectedDestinationId = e.currentTarget.selectedItem.label;
- selectedMBean = e.currentTarget.selectedItem.objectName.canonicalName.split(":")[1];
- display.destinationAttributes.dataProvider = dataCache.getBindableKeyArray(selectedDestinationId);
- display.selectedProperty.text = e.currentTarget.selectedItem.label;
- display.graphLabel.text = null;
- display.attrgraph.dataProvider = null;
-
- if (e.currentTarget != display.httpList)
- display.httpList.selectedIndex = -1;
- if (e.currentTarget != display.messageList)
- display.messageList.selectedIndex = -1;
- if (e.currentTarget != display.dataList)
- display.dataList.selectedIndex = -1;
- if (e.currentTarget != display.remotingList)
- display.remotingList.selectedIndex = -1;
- }
-
- public override function appChanged(s:String):void
- {
- dataCache.clearData();
- refreshDestinations();
- display.destinationAttributes.dataProvider = null;
- display.selectedProperty.text = null;
- display.graphLabel.text = null;
- display.attrgraph.dataProvider = null;
- }
-
- private function refreshDestinations():void
- {
- // TODO: Handle not having any specific services gracefully
- display.dataList.dataProvider = getChildTree("DataService");
- display.httpList.dataProvider = getChildTree("HTTPProxyService");
- display.messageList.dataProvider = getChildTree("MessageService");
- display.remotingList.dataProvider = getChildTree("RemotingService");
- }
-
- /**
- * This is just a helper method to find the proper MBeans for each Service
- * from the ConsoleManager's model. The model is a complicated structure
- * of maps and arrays.
- */
- private function getChildTree(child:String):Array
- {
- var childArray:Array = _manager.getChildTree(child);
- if ((childArray.length > 0) && (childArray[0].hasOwnProperty("children")))
- childArray = childArray[0].children as Array;
- if ((childArray.length > 0) && (childArray[0].hasOwnProperty("children")))
- childArray = childArray[0].children as Array;
-
- return childArray;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/DestinationManagerDisplay.mxml
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/DestinationManagerDisplay.mxml b/apps/ds-console/console/containers/DestinationManagerDisplay.mxml
deleted file mode 100755
index 5e5d6a7..0000000
--- a/apps/ds-console/console/containers/DestinationManagerDisplay.mxml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?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:Box xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
- <mx:HDividedBox width="100%" height="100%">
- <mx:VDividedBox height="100%" width="350">
- <mx:DataGrid id="httpList" width="100%">
- <mx:columns>
- <mx:DataGridColumn headerText="HTTP Proxy Service" dataField="label" />
- </mx:columns>
- </mx:DataGrid>
- <mx:DataGrid id="messageList" width="100%">
- <mx:columns>
- <mx:DataGridColumn headerText="Message Service" dataField="label" />
- </mx:columns>
- </mx:DataGrid>
- <mx:DataGrid id="dataList" width="100%">
- <mx:columns>
- <mx:DataGridColumn headerText="Data Service" dataField="label" />
- </mx:columns>
- </mx:DataGrid>
- <mx:DataGrid id="remotingList" width="100%">
- <mx:columns>
- <mx:DataGridColumn headerText="Remoting Service" dataField="label" />
- </mx:columns>
- </mx:DataGrid>
- </mx:VDividedBox>
- <mx:VDividedBox height="100%">
- <mx:HBox>
- <mx:Label text="Selected Attribute" />
- <mx:Text id="selectedProperty" />
- </mx:HBox>
- <mx:DataGrid id="destinationAttributes" width="100%" height="50%" />
- <mx:Label id="graphLabel" />
- <mx:LineChart id="attrgraph" width="100%">
- <mx:verticalAxis>
- <mx:LinearAxis id="attrgraphAxis" />
- </mx:verticalAxis>
- <mx:series>
- <mx:LineSeries id="attrgraphSeries" yField="Value" />
- </mx:series>
- </mx:LineChart>
- </mx:VDividedBox>
- </mx:HDividedBox>
-</mx:Box>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/EndpointManager.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/EndpointManager.as b/apps/ds-console/console/containers/EndpointManager.as
deleted file mode 100755
index 0c7a538..0000000
--- a/apps/ds-console/console/containers/EndpointManager.as
+++ /dev/null
@@ -1,149 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console.containers
-{
- import console.data.Bindable3DHashMap;
- import console.ConsoleManager;
- import mx.collections.ArrayCollection;
- import mx.events.ListEvent;
- import flash.events.Event;
- import mx.charts.LineChart;
- import mx.charts.series.LineSeries;
- import mx.controls.listClasses.ListBase;
- import mx.events.CollectionEvent;
-
- public class EndpointManager extends UpdateListener
- {
- private static const pollableTypes:Array = [
- ConsoleManager.ENDPOINT_POLLABLE ];
-
- private var _manager:ConsoleManager;
- private var display:EndpointManagerDisplay;
- private var selectedMBean:String;
- private var dataCache:Bindable3DHashMap;
- private var pollableAttributes:Object;
-
- [Bindable]
- private var selectedBeanProperties:ArrayCollection;
-
- [Bindable]
- private var selectedPropertyValues:ArrayCollection;
-
- public override function dataUpdate(type:int, data:Object):void
- {
- var dataArray:ArrayCollection = new ArrayCollection;
-
- for (var name:String in data)
- {
-
- var propertyArrayForMBean:Array = data[name];
-
- for (var i:int = 0; i < propertyArrayForMBean.length; i++)
- {
- dataCache.update(name, propertyArrayForMBean[i].name, propertyArrayForMBean[i].value);
- }
- }
-
- if (pollableTypes.indexOf(type) >= 0)
- pollableAttributes[type] = data;
- }
-
- public override function mbeanModelUpdate(model:Object):void
- {
- refreshEndpoints();
- }
-
- public function EndpointManager():void
- {
- super();
- display = new EndpointManagerDisplay;
- this.addChild(display);
-
- this.label = "Endpoint Management";
-
- _manager = ConsoleManager.getInstance();
- var registerTypes:Array = [
- {type: ConsoleManager.ENDPOINT_POLLABLE, poll: true},
- {type: ConsoleManager.ENDPOINT_SCALAR, poll: false}
- ]
- _manager.registerListener(this, registerTypes);
- display.rtmpEndpointsList.addEventListener(ListEvent.CHANGE, selectedEndpoint);
- display.amfEndpointsList.addEventListener(ListEvent.CHANGE, selectedEndpoint);
- display.httpEndpointsList.addEventListener(ListEvent.CHANGE, selectedEndpoint);
-
- display.endpointAttributes.addEventListener(ListEvent.CHANGE, selectedAttribute);
-
- pollableAttributes = new Object;
- dataCache = new Bindable3DHashMap();
-
- selectedBeanProperties = new ArrayCollection();
- selectedPropertyValues = new ArrayCollection();
- }
-
- private function selectedAttribute(e:Event):void
- {
- var property:String = e.currentTarget.selectedItem.Property as String;
- for (var type:* in pollableAttributes)
- {
- for each (var pollable:Object in pollableAttributes[type][selectedMBean])
- {
- if (pollable.name == property)
- {
- display.attrgraph.dataProvider = dataCache.getBindableDataArray(selectedMBean, property);
- display.graphLabel.text = property;
- return;
- }
- }
- }
- }
-
- private function selectedEndpoint(e:Event):void
- {
- selectedMBean = ((e.currentTarget.selectedItem.objectName.canonicalName as String).split(":") as Array)[1];
- display.endpointAttributes.dataProvider = dataCache.getBindableKeyArray(selectedMBean);
- display.selectedProperty.text = e.currentTarget.selectedItem.label;
- display.graphLabel.text = null;
- display.attrgraph.dataProvider = null;
-
- if (e.currentTarget != display.amfEndpointsList)
- display.amfEndpointsList.selectedIndex = -1;
- if (e.currentTarget != display.httpEndpointsList)
- display.httpEndpointsList.selectedIndex = -1;
- if (e.currentTarget != display.rtmpEndpointsList)
- display.rtmpEndpointsList.selectedIndex = -1;
- }
-
- public override function appChanged(s:String):void
- {
- dataCache.clearData();
- refreshEndpoints();
- display.endpointAttributes.dataProvider = null;
- display.selectedProperty.text = null;
- display.graphLabel.text = null;
- display.attrgraph.dataProvider = null;
- }
-
- private function refreshEndpoints():void
- {
- display.httpEndpointsList.dataProvider = _manager.getChildTrees("HTTPEndpoint", "StreamingHTTPEndpoint", "NIOHTTPEndpoint", "StreamingNIOHTTPEndpoint");
- display.rtmpEndpointsList.dataProvider = _manager.getChildTree("RTMPEndpoint");
- display.amfEndpointsList.dataProvider = _manager.getChildTrees("AMFEndpoint", "StreamingAMFEndpoint", "NIOAMFEndpoint", "StreamingNIOAMFEndpoint");
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/EndpointManagerDisplay.mxml
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/EndpointManagerDisplay.mxml b/apps/ds-console/console/containers/EndpointManagerDisplay.mxml
deleted file mode 100755
index c5f69ef..0000000
--- a/apps/ds-console/console/containers/EndpointManagerDisplay.mxml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?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:Box xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
- <mx:HDividedBox width="100%" height="100%">
- <mx:VDividedBox height="100%" width="350">
- <mx:DataGrid id="rtmpEndpointsList" width="100%">
- <mx:columns>
- <mx:DataGridColumn headerText="RTMP Endpoints" dataField="label" />
- </mx:columns>
- </mx:DataGrid>
- <mx:DataGrid id="httpEndpointsList" width="100%">
- <mx:columns>
- <mx:DataGridColumn headerText="HTTP Endpoints" dataField="label" />
- </mx:columns>
- </mx:DataGrid>
- <mx:DataGrid id="amfEndpointsList" width="100%">
- <mx:columns>
- <mx:DataGridColumn headerText="AMF Endpoints" dataField="label" />
- </mx:columns>
- </mx:DataGrid>
- </mx:VDividedBox>
- <mx:VDividedBox height="100%">
- <mx:HBox>
- <mx:Label text="Selected Endpoint" />
- <mx:Text id="selectedProperty" />
- </mx:HBox>
- <mx:DataGrid id="endpointAttributes" width="100%" height="50%" />
- <mx:Label id="graphLabel" />
- <mx:LineChart id="attrgraph" width="100%">
- <mx:verticalAxis>
- <mx:LinearAxis id="attrgraphAxis" />
- </mx:verticalAxis>
- <mx:series>
- <mx:LineSeries id="attrgraphSeries" yField="Value" />
- </mx:series>
- </mx:LineChart>
- </mx:VDividedBox>
- </mx:HDividedBox>
-</mx:Box>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/LogManager.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/LogManager.as b/apps/ds-console/console/containers/LogManager.as
deleted file mode 100755
index a44dc06..0000000
--- a/apps/ds-console/console/containers/LogManager.as
+++ /dev/null
@@ -1,189 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console.containers
-{
- import console.ConsoleManager;
- import flash.events.Event;
- import mx.controls.ComboBox;
- import console.events.ManagementOperationInvokeEvent;
- import mx.events.ListEvent;
- import flash.events.MouseEvent;
- import mx.collections.ArrayCollection;
-
- public class LogManager extends UpdateListener
- {
- private var _manager:ConsoleManager;
- private var _logMBean:String;
- private var _logTree:Array;
- private var display:LogManagerDisplay;
-
- public static var targetLevels:Array = new Array(
- {label:"NONE", value:"2000"},
- {label:"FATAL", value:"1000"},
- {label:"ERROR", value:"8"},
- {label:"WARN", value:"6"},
- {label:"INFO", value:"4"},
- {label:"DEBUG", value:"2"},
- {label:"ALL", value:"0"}
- );
-
- public function LogManager():void
- {
- super();
-
- display = new LogManagerDisplay;
- this.addChild(display);
-
- this.label = "Log Manager";
-
- _manager = ConsoleManager.getInstance();
- _manager.registerListener(this, []);
-
- // On selecting a log target, invoke 'getTargetFilters' to populate the table of filters
- display.logTargetSelect.addEventListener(ListEvent.CHANGE, selectLogTarget);
- display.logTargetLevel.dataProvider = targetLevels;
-
- // Handler for removing a target
- display.deleteCategory.addEventListener(MouseEvent.CLICK,
- function(e:Event):void {
-
- _manager.invokeOperation(
-
- new ManagementOperationInvokeEvent(_logMBean,
- "removeFilterForTarget",
- [display.logTargetSelect.selectedItem, display.currentCategories.selectedItem],
- ["java.lang.String", "java.lang.String"]),
-
- function (e:Event):void { display.logTargetSelect.dispatchEvent(
- new Event(ListEvent.CHANGE)); } );
- }
- );
-
- // Handler for adding a target
- display.addFilterButton.addEventListener(MouseEvent.CLICK,
- function(e:Event):void {
-
- _manager.invokeOperation(
-
- new ManagementOperationInvokeEvent(_logMBean,
- "addFilterForTarget",
- [display.logTargetSelect.selectedItem, display.addFilterTextInput.text],
- ["java.lang.String", "java.lang.String"]),
- // Simple callback function to refresh the Log View
- function (e:Event):void {
- display.logTargetSelect.dispatchEvent(new Event(ListEvent.CHANGE));
- display.addFilterTextInput.text = "";
- }
- );
- }
- );
-
- // Handler for adding a target
- display.addCommonFilterButton.addEventListener(MouseEvent.CLICK,
- function(e:Event):void {
-
- _manager.invokeOperation(
-
- new ManagementOperationInvokeEvent(_logMBean,
- "addFilterForTarget",
- [display.logTargetSelect.selectedItem, display.commonCategories.selectedItem],
- ["java.lang.String", "java.lang.String"]),
- // Simple callback function to refresh the Log View
- function (e:Event):void {
- display.logTargetSelect.dispatchEvent(new Event(ListEvent.CHANGE));
- display.addFilterTextInput.text = "";
- }
- );
- }
- );
-
- // Handler for changing the target's level
- display.logTargetLevel.addEventListener(ListEvent.CHANGE, function(e:Event):void
- {
- _manager.invokeOperation(
-
- new ManagementOperationInvokeEvent(_logMBean,
- "changeTargetLevel",
- [display.logTargetSelect.selectedItem, display.logTargetLevel.selectedItem.value],
- ["java.lang.String", "java.lang.String"]),
- new Function
- );
- }
- );
-
- }
-
- public override function mbeanModelUpdate(model:Object):void
- {
- _logTree = _manager.getChildTree("Log");
- if (_logTree != null && _logTree.length != 0)
- {
- _logMBean = _logTree[0]["objectName"]["canonicalName"];
- // Get the targets for the current application
- _manager.getAttributes(_logMBean, ["Targets"], this, updateTargets);
- _manager.getAttributes(_logMBean, ["Categories"], this, updateCommonCats);
- }
- }
-
- public override function appChanged(s:String):void
- {
- mbeanModelUpdate(null);
- }
-
- public function updateCommonCats(e:Event):void
- {
- display.commonCategories.dataProvider = (e["result"] as Array)[0].value;
- display.commonCategories.selectedIndex = 0;
- display.commonCategories.dispatchEvent(new Event(ListEvent.CHANGE));
- }
-
- public function updateTargets(e:Event):void
- {
- var logTargets:Array = (e["result"] as Array)[0].value;
- display.logTargetSelect.dataProvider = logTargets;
- display.logTargetSelect.selectedIndex = 0;
- display.logTargetSelect.dispatchEvent(new Event(ListEvent.CHANGE));
- }
-
- public function updateFilters(e:Event):void
- {
- display.currentCategories.dataProvider = e["result"] as Array;
- }
-
- public function selectLogTarget(e:Event):void
- {
- _manager.invokeOperation(new ManagementOperationInvokeEvent(_logMBean,
- "getTargetFilters", [display.logTargetSelect.selectedItem], ["java.lang.String"]),
- updateFilters);
- _manager.invokeOperation(new ManagementOperationInvokeEvent(_logMBean,
- "getTargetLevel", [display.logTargetSelect.selectedItem], ["java.lang.String"]),
- handleGetTargetLevel);
- }
-
- public function handleGetTargetLevel(e:Event):void
- {
- var currentLevelInt:String = e["message"]["body"];
- for (var i:int = 0; i < targetLevels.length; i++)
- {
- if (targetLevels[i].value == currentLevelInt)
- display.logTargetLevel.selectedIndex = i;
- }
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/LogManagerDisplay.mxml
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/LogManagerDisplay.mxml b/apps/ds-console/console/containers/LogManagerDisplay.mxml
deleted file mode 100755
index 969c9d4..0000000
--- a/apps/ds-console/console/containers/LogManagerDisplay.mxml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?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:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
- <mx:HBox width="100%" height="100%">
- <mx:Form>
- <mx:FormItem label="Log Target:">
- <mx:ComboBox id="logTargetSelect" />
- </mx:FormItem>
- <mx:FormItem label="Target Level:">
- <mx:ComboBox id="logTargetLevel"></mx:ComboBox>
- </mx:FormItem>
- <mx:HRule width="100%"/>
- <mx:FormItem label="Add a Custom Category">
- <mx:TextInput id="addFilterTextInput" />
- </mx:FormItem>
- <mx:FormItem>
- <mx:Button label="Add Category" id="addFilterButton" />
- </mx:FormItem>
- </mx:Form>
- <mx:VBox width="100%">
- <mx:DataGrid id="currentCategories" width="100%">
- <mx:columns>
- <mx:DataGridColumn headerText="Current Categories" dataField="filters" />
- </mx:columns>
- </mx:DataGrid>
- <mx:Button label="Remove Category" id="deleteCategory" />
- </mx:VBox>
- <mx:VBox width="100%">
- <mx:DataGrid id="commonCategories" width="100%">
- <mx:columns>
- <mx:DataGridColumn headerText="Common Categories" dataField="common"/>
- </mx:columns>
- </mx:DataGrid>
- <mx:Button label="Add Category" id="addCommonFilterButton" />
- </mx:VBox>
- </mx:HBox>
-</mx:VBox>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/Operation.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/Operation.as b/apps/ds-console/console/containers/Operation.as
deleted file mode 100755
index 2b9788e..0000000
--- a/apps/ds-console/console/containers/Operation.as
+++ /dev/null
@@ -1,169 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package console.containers
-{
-
-import flash.events.MouseEvent;
-import mx.containers.HBox;
-import mx.controls.Button;
-import mx.controls.Label;
-import mx.controls.TextInput;
-import mx.messaging.management.MBeanOperationInfo;
-import mx.messaging.management.MBeanParameterInfo;
-
-/**
- * The Operation container is an HBox that renders UI to invoke an operation on
- * an MBean. When the operationInfo property of an Operation is set, the current
- * UI for the Operation is torn down, and new UI is rendered based on the new
- * MBeanOperationInfo metadata provided.
- * <p>
- * This container/control should not be instantiated directly. A parent OperationSet
- * container will create nested Operations based on its MBean metadata.
- */
-public class Operation extends HBox
-{
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * Constructor.
- */
- public function Operation(wrapper:OperationSet)
- {
- super();
-
- _wrapper = wrapper;
- _values = [];
- _signature = [];
- }
-
- /**
- * @private
- * The parent container.
- */
- private var _wrapper:OperationSet;
-
- /**
- * @private
- * Array to store references to controls for each argument.
- */
- private var _values:Array;
-
- /**
- * @private
- * Array to store the type signature for this operation.
- */
- private var _signature:Array;
-
- //----------------------------------
- // MBeanOperationInfo
- //----------------------------------
-
- /**
- * @private
- * Storage for the operation info.
- */
- private var _operationInfo:MBeanOperationInfo;
-
- /**
- * MBean operation metadata that drives the UI for this component.
- */
- public function get operationInfo():MBeanOperationInfo
- {
- return _operationInfo;
- }
-
- public function set operationInfo(value:MBeanOperationInfo):void
- {
- var i:int;
-
- _operationInfo = value;
- // Remove any existing children and refs to argument values.
- _values.splice(0);
- _signature.splice(0);
- for (i = numChildren - 1; i >= 0; --i)
- {
- removeChildAt(i);
- }
-
- // Build UI for this operation.
- var opName:Button = new Button();
- opName.label = value.name;
- opName.addEventListener("click", invokeOperation);
- addChild(opName);
-
- var openParen:Label = new Label();
- openParen.text = " (";
- addChild(openParen);
-
- var comma:Label = new Label();
- comma.text = ", ";
- var paramName:String;
- var n:int = value.signature.length;
- for (i = 0; i < n; ++i)
- {
- var pName:Label = new Label();
- paramName = value.signature[i].name;
- if (paramName.length > 0)
- {
- pName.text = paramName;
- }
- else
- {
- pName.text = "p" + (i + 1);
- }
- addChild(pName);
- var pValue:TextInput = new TextInput();
- addChild(pValue);
- _values[i] = pValue;
- _signature[i] = value.signature[i].type;
- if (i != (n - 1))
- {
- addChild(comma);
- }
- }
-
- var closeParen:Label = new Label();
- closeParen.text = " ) ";
- addChild(closeParen);
- }
-
- /**
- * @private
- * Calls back into the parent OperationSet to dispatch an
- * event for this operation invocation request.
- */
- private function invokeOperation(e:MouseEvent):void
- {
- var argsToPass:Array = [];
- var n:int = _values.length;
- for (var i:int = 0; i < n; ++i)
- {
- argsToPass.push(_values[i].text);
- }
- _wrapper.dispatchInvokeEvent(_operationInfo.name, argsToPass, _signature);
- }
-}
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/OperationSet.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/OperationSet.as b/apps/ds-console/console/containers/OperationSet.as
deleted file mode 100755
index 98ca6de..0000000
--- a/apps/ds-console/console/containers/OperationSet.as
+++ /dev/null
@@ -1,149 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package console.containers
-{
-
-import console.events.ManagementOperationInvokeEvent;
-
-import mx.containers.*;
-import mx.messaging.management.MBeanInfo;
-
-//--------------------------------------
-// Events
-//--------------------------------------
-
-/**
- * Broadcast when a request has been made to invoke an Operation within this OperationSet.
- */
-[Event(name="invoke", type="console.events.ManagementOperationInvokeEvent")]
-
-/**
- * The OperationSet is a VBox containing an Operation for each operation exposed by a
- * MBean. When the mbeanInfo property is set, the current UI of the OperationSet is torn
- * down and new UI is built based upon the MBeanInfo metadata provided.
- *
- * <p><b>MXML Syntax</b></p>
- *
- * <p>The <code><mx:OperationSet></code> tag inherits all the properties
- * of its parent classes and adds the following properties:</p>
- *
- * <p>
- * <pre>
- * <mx:Button
- * mbeanInfo="<i>No default</i>."
- * />
- * </pre>
- * </p>
- */
-public class OperationSet extends VBox
-{
- //--------------------------------------------------------------------------
- //
- // Constructor
- //
- //--------------------------------------------------------------------------
-
- /**
- * @private
- * Constructor.
- */
- public function OperationSet()
- {
- super();
- }
-
-
-
-
- //----------------------------------
- // MBeanOperationInfo
- //----------------------------------
-
- private var _mbeanName:String;
- public function set mbeanName(name:String):void
- {
- _mbeanName = name;
- }
-
- /**
- * @private
- * Storage for the Mbean info.
- */
- private var _mbeanInfo:MBeanInfo;
-
- /**
- * MBean metadata to drive the UI for this component.
- */
- public function get mbeanInfo():MBeanInfo
- {
- return _mbeanInfo;
- }
-
-
- private var _tabnav:TabNavigator;
- public function set tabnav(p:TabNavigator):void
- {
- _tabnav = p;
- }
-
- public function set mbeanInfo(value:MBeanInfo):void
- {
- var i:int;
-
- _mbeanInfo = value;
- // Remove any existing children.
- for (i = numChildren - 1; i >= 0; --i)
- {
- removeChildAt(i);
- }
- if (value != null)
- {
- var n:int = value.operations.length;
-
- // If there are no operations for this MBean, disable the Operations tab.
- if (n == 0)
- _tabnav.getTabAt(1).enabled = false;
-
- // Otherwise, build UI for the set of operations exposed by this MBean.
- else
- {
- _tabnav.getTabAt(1).enabled = true;
- for (i = 0; i < n; ++i)
- {
- var op:Operation = new Operation(this);
- addChild(op);
- op.operationInfo = value.operations[i];
- }
- }
- }
- }
-
- /**
- * Raises an operation invoke event for a nested Operation.
- */
- public function dispatchInvokeEvent(name:String, values:Array, signature:Array):void
- {
- var event:ManagementOperationInvokeEvent = new ManagementOperationInvokeEvent(_mbeanName, name, values, signature);
- dispatchEvent(event);
- }
-
-}
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/PollableAttributeChart.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/PollableAttributeChart.as b/apps/ds-console/console/containers/PollableAttributeChart.as
deleted file mode 100755
index a8470c5..0000000
--- a/apps/ds-console/console/containers/PollableAttributeChart.as
+++ /dev/null
@@ -1,42 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console.containers
-{
- import mx.charts.LineChart;
- import mx.charts.series.LineSeries;
-
- public class PollableAttributeChart extends LineChart
- {
- function PollableAttributeChart(provider:Object):void
- {
- super();
-
- dataProvider = provider;
- this.percentHeight = 100;
- this.percentWidth = 100;
-
- var series:LineSeries = new LineSeries;
- series.dataProvider = provider;
- series.yField = "value";
- this.addChild(series);
-
- initialize();
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/ServerManager.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/ServerManager.as b/apps/ds-console/console/containers/ServerManager.as
deleted file mode 100755
index 719556c..0000000
--- a/apps/ds-console/console/containers/ServerManager.as
+++ /dev/null
@@ -1,138 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console.containers
-{
- import console.ConsoleManager;
- import mx.collections.ArrayCollection;
- import mx.events.ListEvent;
- import flash.events.Event;
- import mx.charts.LineChart;
- import mx.charts.series.LineSeries;
- import mx.utils.ObjectProxy;
- import flash.utils.setInterval;
- import mx.collections.ICollectionView;
- import console.data.Bindable3DHashMap;
- import flash.events.TextEvent;
- import console.events.ManagementOperationInvokeEvent;
- import mx.controls.DataGrid;
- import mx.events.DataGridEvent;
- import mx.events.FlexEvent;
-
- public class ServerManager extends UpdateListener
- {
- private var _manager:ConsoleManager;
- private var display:ServerManagerDisplay;
- private var dataCache:Bindable3DHashMap;
- private var pollableAttributes:Object;
- private var visibleTypes:Array;
-
- public function ServerManager():void
- {
- super();
- display = new ServerManagerDisplay;
- this.addChild(display);
-
- this.label = "Server Management";
- display.scalarProperties.addEventListener(ListEvent.CHANGE, selectedScalar);
- display.pollableProperties.addEventListener(ListEvent.CHANGE, selectedPollable);
- _manager = ConsoleManager.getInstance();
- _manager.registerListener(this, [{type: ConsoleManager.GENERAL_OPERATION, poll: false},
- {type: ConsoleManager.GENERAL_SERVER, poll: false},
- {type: ConsoleManager.GENERAL_POLLABLE, poll: true}]);
- setupDataCache();
- }
-
- public override function dataUpdate(type:int, data:Object):void
- {
- var dataArray:ArrayCollection = new ArrayCollection;
-
- for (var name:String in data)
- {
-
- var propertyArrayForMBean:Array = data[name];
-
- for (var i:int = 0; i < propertyArrayForMBean.length; i++)
- {
- dataCache.update(String(type), propertyArrayForMBean[i].name, propertyArrayForMBean[i].value);
- }
- }
-
- if (type == ConsoleManager.GENERAL_POLLABLE)
- pollableAttributes = data;
- }
-
- private function setupDataCache():void
- {
- dataCache = new Bindable3DHashMap();
- dataCache.update(String(ConsoleManager.GENERAL_OPERATION),null,null);
- dataCache.update(String(ConsoleManager.GENERAL_POLLABLE),null,null);
- dataCache.update(String(ConsoleManager.GENERAL_SERVER),null,null);
-
- display.scalarProperties.dataProvider = dataCache.getBindableKeyArray(String(ConsoleManager.GENERAL_SERVER));
- display.pollableProperties.dataProvider = dataCache.getBindableKeyArray(String(ConsoleManager.GENERAL_POLLABLE));
- }
-
- private function invokeOp(mbean:String, operation:String, value:String):void
- {
- _manager.invokeOperation(
- new ManagementOperationInvokeEvent(mbean, operation, [value], ["java.lang.String"]),
- function (e:Event):void {
-
- }
- );
- }
-
- private function selectedScalar(e:Event):void
- {
- // It's possible that the data has changed since it was clicked because of polling
- // if the selected item is null, then return.
- // TODO: Handle this more gracefully.
- if (display.scalarProperties.selectedItem == -1) return;
-
- var attr:String = display.scalarProperties.selectedItem.propertyName;
- var mbean:String = display.scalarProperties.selectedItem.mbeanName;
- display.selectedProperty.text = attr;
- display.pollableProperties.selectedIndex = -1;
- }
-
- private function selectedPollable(e:Event):void
- {
- // It's possible that the data has changed since it was clicked because of polling
- // if the selected item is null, then return.
- // TODO: Handle this more gracefully.
- if (display.pollableProperties.selectedItem == null) return;
-
- var attr:String = display.pollableProperties.selectedItem.Property
- display.selectedProperty.text = attr;
-
- display.attrgraph.dataProvider = dataCache.getBindableDataArray(String(ConsoleManager.GENERAL_POLLABLE), attr);
- display.attrgraphSeries.dataProvider = dataCache.getBindableDataArray(String(ConsoleManager.GENERAL_POLLABLE), attr);
- display.scalarProperties.selectedIndex = -1;
- }
-
- public override function appChanged(s:String):void
- {
- display.attrgraph.dataProvider = null;
- display.attrgraphSeries.dataProvider = null;
- display.selectedProperty.text = "None";
- setupDataCache();
- _manager.updateData(this);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/ServerManagerDisplay.mxml
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/ServerManagerDisplay.mxml b/apps/ds-console/console/containers/ServerManagerDisplay.mxml
deleted file mode 100755
index 2bf1152..0000000
--- a/apps/ds-console/console/containers/ServerManagerDisplay.mxml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?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:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
- <mx:HDividedBox width="100%" height="100%">
- <mx:VBox height="100%" width="400">
- <mx:DataGrid id="scalarProperties" width="100%">
- <mx:columns>
- <mx:DataGridColumn dataField="mbeanName" visible="false" />
- <mx:DataGridColumn headerText="Scalar Property" dataField="Property" />
- <mx:DataGridColumn headerText="Value" dataField="Value" />
- </mx:columns>
- </mx:DataGrid>
- <mx:DataGrid id="pollableProperties" width="100%">
- <mx:columns>
- <mx:DataGridColumn dataField="mbeanName" visible="false" />
- <mx:DataGridColumn headerText="Graphable Property" dataField="Property" />
- <mx:DataGridColumn headerText="Value" dataField="Value" />
- </mx:columns>
- </mx:DataGrid>
- </mx:VBox>
- <mx:VDividedBox height="100%">
- <mx:HBox>
- <mx:Label text="Selected Attribute" />
- <mx:Text id="selectedProperty" />
- </mx:HBox>
- <mx:LineChart id="attrgraph" width="100%" height="100%">
- <mx:verticalAxis>
- <mx:LinearAxis id="attrgraphAxis" baseAtZero="false" />
- </mx:verticalAxis>
- <mx:series>
- <mx:LineSeries id="attrgraphSeries" yField="Value" />
- </mx:series>
- </mx:LineChart>
- </mx:VDividedBox>
- </mx:HDividedBox>
-
-</mx:Panel>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/UpdateListener.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/UpdateListener.as b/apps/ds-console/console/containers/UpdateListener.as
deleted file mode 100755
index bd3a464..0000000
--- a/apps/ds-console/console/containers/UpdateListener.as
+++ /dev/null
@@ -1,109 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console.containers
-{
- import mx.containers.Canvas;
- import console.data.Bindable3DHashMap;
- import mx.collections.ArrayCollection;
- import mx.messaging.management.ObjectName;
-
- public class UpdateListener extends Canvas
- {
- protected var _name:String;
- protected var _model:Object;
-
- /**
- * Invoked when the names of the mbeans are retrieved from the server.
- */
- public function mbeanModelUpdate(mbeanModel:Object):void
- {
-
- }
-
- /**
- * Invoked when the data for a given type is updated if the implementing class
- * is registered with the ConsoleManager for the type, and if the implementing class
- * is set to active in the ConsoleManager.
- */
- public function dataUpdate(type:int, data:Object):void
- {
-
- }
-
- /**
- * Invoked when the selected application has changed. An implementing class might
- * want to clear any data it is holding onto since the data will be belonging to
- * objects in an application's MBeans that are no longer being queried.
- */
- public function appChanged(s:String):void
- {
-
- }
-
- /**
- * If the container only wishes to query a select number of MBeans upon dataUpdate, they should be
- * visible in a map keyed on the display type containing arrays of the MBean names.
- *
- * If a null value, or any object that the ConsoleManager can't parse, then all
- * MBeans for all active types are returned upon dataUpdate.
- */
- public function get specificMBeansMap():Object
- {
- return null;
- }
-
- protected function traverseTreeForObject(node:Object, searchType:String = null, searchObject:String = null):Object
- {
- if (node == null)
- {
- return null;
- }
- else if (node.hasOwnProperty("type"))
- {
- // Node is a container of objects of 'type'
- if (searchType != null)
- {
- if (node.type == searchObject)
- return node;
- }
- }
- else if (node.hasOwnProperty("objectName"))
- {
- // Node is a specific object, an instance of parent 'type'
- if (searchObject != null)
- {
- if ((node.objectName as ObjectName).getKeyProperty("id") == searchObject)
- return node;
- }
- }
-
- // recur
- if (node.hasOwnProperty("children") && (node.children is Array))
- {
- for each (var child:Object in (node.children as Array))
- {
- traverseTreeForObject(child, searchType, searchObject);
- }
- }
-
- // not found
- return null;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/containers/UpdateManager.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/containers/UpdateManager.as b/apps/ds-console/console/containers/UpdateManager.as
deleted file mode 100755
index 1f6d7ec..0000000
--- a/apps/ds-console/console/containers/UpdateManager.as
+++ /dev/null
@@ -1,28 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console.containers
-{
- public interface UpdateManager
- {
- function registerListener(listner:UpdateListener, types:Array):void;
- function unregisterListener(listner:UpdateListener):void;
- function activateListener(listener:UpdateListener):void;
- function deactivateListener(listener:UpdateListener):void;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/data/Bindable3DHashMap.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/data/Bindable3DHashMap.as b/apps/ds-console/console/data/Bindable3DHashMap.as
deleted file mode 100755
index 5e4088f..0000000
--- a/apps/ds-console/console/data/Bindable3DHashMap.as
+++ /dev/null
@@ -1,110 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console.data
-{
- import mx.collections.ArrayCollection;
- import mx.utils.ObjectProxy;
- import flash.events.Event;
- import mx.events.PropertyChangeEvent;
- import mx.events.CollectionEvent;
- import mx.controls.listClasses.ListBase;
-
- public class Bindable3DHashMap
- {
- public var objects:ObjectProxy;
- public var objectsForKeyArray:ObjectProxy;
-
- public function Bindable3DHashMap()
- {
- objects = new ObjectProxy;
- objectsForKeyArray = new ObjectProxy;
- }
-
- public function updateNoPollable(object:String, key:String, value:*):void
- {
- if (!objectsForKeyArray.hasOwnProperty(object))
- objectsForKeyArray[object] = new ArrayCollection;
-
- if (!key)
- return;
-
- var keysForKeyArray:ArrayCollection = objectsForKeyArray[object] as ArrayCollection;
-
- var foundKey:Boolean = false;
- for (var i:int = 0; i < keysForKeyArray.length; i++)
- {
- if ((keysForKeyArray[i].hasOwnProperty("Property")) && (keysForKeyArray[i]["Property"] == key))
- {
- keysForKeyArray[i]["Value"] = value;
- foundKey = true;
- break;
- }
- }
-
- if (!foundKey)
- keysForKeyArray.addItem({Property: key, Value:value});
-
- keysForKeyArray.dispatchEvent(new CollectionEvent(CollectionEvent.COLLECTION_CHANGE));
- }
-
- public function update(object:String, key:String, value:*):void
- {
- if (!objects.hasOwnProperty(object))
- {
- objects[object] = new ObjectProxy;
- }
-
- if (!key)
- return;
-
- var keys:ObjectProxy = objects[object] as ObjectProxy;
-
- if (!keys.hasOwnProperty(key))
- keys[key] = new ArrayCollection;
-
- (keys[key] as ArrayCollection).addItem({Name: key, Value: value});
- (keys[key] as ArrayCollection).dispatchEvent(new CollectionEvent(CollectionEvent.COLLECTION_CHANGE));
-
- updateNoPollable(object, key, value);
- }
-
- public function getBindableKeyArray(object:String):ArrayCollection
- {
- if (!objectsForKeyArray.hasOwnProperty(object))
- objectsForKeyArray[object] = new ArrayCollection;
-
- return (objectsForKeyArray[object] as ArrayCollection);
- }
-
- public function getBindableDataArray(object:String, key:String):ArrayCollection
- {
- if (!objects.hasOwnProperty(object))
- objects[object] = new ObjectProxy;
-
- var keys:ObjectProxy = objects[object] as ObjectProxy;
- return keys[key] as ArrayCollection;
- }
-
- public function clearData():void
- {
- objects = new ObjectProxy;
- objectsForKeyArray = new ObjectProxy;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/events/ManagementOperationInvokeEvent.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/events/ManagementOperationInvokeEvent.as b/apps/ds-console/console/events/ManagementOperationInvokeEvent.as
deleted file mode 100755
index 1390c4d..0000000
--- a/apps/ds-console/console/events/ManagementOperationInvokeEvent.as
+++ /dev/null
@@ -1,99 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package console.events
-{
-
-import flash.events.Event;
-
-/**
- * Used to request that an MBean operation be invoked.
- */
-public class ManagementOperationInvokeEvent extends Event
-{
- /**
- * Constructs an instance of this event with the specified type, target,
- * and message.
- */
- public function ManagementOperationInvokeEvent(mbean:String, name:String, values:Array, signature:Array)
- {
- super(INVOKE, false, false);
- _mbean = mbean;
- _name = name;
- _values = values;
- _signature = signature;
- }
-
- /**
- * The mbean of the operation to invoke.
- */
- public function get mbean():String
- {
- return _mbean;
- }
-
- /**
- * The name of the operation to invoke.
- */
- public function get name():String
- {
- return _name;
- }
-
- /**
- * The argument values for the operation.
- */
- public function get values():Array
- {
- return _values;
- }
-
- /**
- * The type signature for operation arguments.
- */
- public function get signature():Array
- {
- return _signature;
- }
-
- /**
- * Because this event can be re-dispatched we have to implement clone to
- * return the appropriate type, otherwise we will get just the standard
- * event type.
- *
- * @return Clone of this <code>ManagementOperationInvokeEvent</code>
- */
- override public function clone():Event
- {
- return new ManagementOperationInvokeEvent(_mbean, _name, _values, _signature);
- }
-
- /**
- * The event type.
- */
- public static const INVOKE:String = "invoke";
-
- // private members
- private var _name:String;
- private var _values:Array;
- private var _signature:Array;
- private var _mbean:String;
-}
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/README.txt
----------------------------------------------------------------------
diff --git a/apps/samples-spring/README.txt b/apps/samples-spring/README.txt
deleted file mode 100755
index 16c2166..0000000
--- a/apps/samples-spring/README.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-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.
-
[36/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/src/Main.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/src/Main.mxml b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/src/Main.mxml
deleted file mode 100755
index f44d71e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/src/Main.mxml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx">
-
- <fx:Declarations>
- <!-- "productService" is defined in Spring's configuration file WEB-INF/config/web-application-config.xml
- and provides remote access to the org.springframework.flex.samples.product.ProductDAO class -->
- <s:RemoteObject id="ro" destination="productService" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}"/>
- </fx:Declarations>
-
- <s:layout>
- <s:VerticalLayout/>
- </s:layout>
-
- <mx:DataGrid dataProvider="{ro.findAll.lastResult}" width="100%" height="100%"/>
-
- <!-- the findAll() method is defined in org.springframework.flex.samples.product.ProductDAO -->
- <s:Button label="Get Data" click="ro.findAll()"/>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.actionScriptProperties
deleted file mode 100755
index 4cf4c69..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="Main.mxml" projectUUID="a11f3dd4-3678-494b-b759-bb8260c1c8bb" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="Main.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.project b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.project
deleted file mode 100755
index 8b82afb..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>spring-blazeds-security-101</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/build.xml b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/build.xml
deleted file mode 100755
index d36a89c..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="spring-blazeds-security-101" />
- <property name="application.file" value="Main" />
- <property name="application.bin.dir" value="${samples-spring.war}/spring-blazeds-security-101" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/spring-blazeds-security-101/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
[04/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/web.xml b/attic/apps/samples-spring/WEB-INF/web.xml
new file mode 100755
index 0000000..2869452
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/web.xml
@@ -0,0 +1,87 @@
+<?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.
+
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
+
+ <display-name>Spring BlazeDS Integration Samples</display-name>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>
+ /WEB-INF/spring/*-config.xml
+ </param-value>
+ </context-param>
+
+ <filter>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <listener>
+ <listener-class>flex.messaging.HttpFlexSession</listener-class>
+ </listener>
+
+ <servlet>
+ <servlet-name>flex</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Add RDS servlets
+ <servlet>
+ <servlet-name>RDSDispatchServlet</servlet-name>
+ <display-name>RDSDispatchServlet</display-name>
+ <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
+ <init-param>
+ <param-name>useAppserverSecurity</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>messageBrokerId</param-name>
+ <param-value>_messageBroker</param-value>
+ </init-param>
+ <load-on-startup>10</load-on-startup>
+ </servlet>
+
+ <servlet-mapping id="RDS_DISPATCH_MAPPING">
+ <servlet-name>RDSDispatchServlet</servlet-name>
+ <url-pattern>/CFIDE/main/ide.cfm</url-pattern>
+ </servlet-mapping>
+ End Add RDS servlets -->
+
+ <servlet-mapping>
+ <servlet-name>flex</servlet-name>
+ <url-pattern>/messagebroker/*</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+</web-app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/build.xml b/attic/apps/samples-spring/build.xml
new file mode 100755
index 0000000..83f6b1b
--- /dev/null
+++ b/attic/apps/samples-spring/build.xml
@@ -0,0 +1,168 @@
+<?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-spring.war/build.xml" default="main" basedir="../..">
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="dist.dir" value="${basedir}/dist"/>
+ <property name="src.dir" value="${samples-spring.war}/WEB-INF/src"/>
+ <property name="classes.dir" value="${samples-spring.war}/WEB-INF/classes"/>
+ <property name="context.root" value="samples-spring" />
+
+ <path id="classpath">
+ <fileset dir="${samples-spring.war}/WEB-INF/lib" includes="**/*.jar"/>
+ <pathelement location="${servlet.jar}"/>
+ </path>
+
+ <target name="main" depends="clean,samples"/>
+ <target name="samples" depends="prepare,copy-resources,compile"/>
+
+ <target name="prepare">
+ <mkdir dir="${samples-spring.war}/WEB-INF/lib"/>
+ <mkdir dir="${samples-spring.war}/WEB-INF/classes"/>
+ </target>
+
+ <target name="copy-resources">
+ <fail unless="local.sdk.lib.dir" message="must specify local.sdk.lib.dir in server/build.properties"/>
+ <fail unless="local.sdk.frameworks.dir" message="must specify local.sdk.frameworks.dir in build.properties"/>
+
+ <!-- copy to the lib directory -->
+ <copy todir="${samples-spring.war}/WEB-INF/lib">
+ <fileset dir="${basedir}/lib" includes="${webapp.lib}" />
+ <fileset dir="${basedir}/lib/spring" includes="**/*" />
+ <fileset dir="${basedir}/lib/aspectj" includes="**/*" />
+ <fileset file="${hsqldb.jar}" />
+ </copy>
+
+ <!-- copy to sampledb directory -->
+ <copy todir="${basedir}/sampledb">
+ <fileset file="${hsqldb.jar}" />
+ </copy>
+
+ <!-- copy to the classes directory -->
+ <copy todir="${samples-spring.war}/WEB-INF/classes">
+ <fileset dir="${samples-spring.war}/WEB-INF/src">
+ <include name="**/*.xml"/>
+ </fileset>
+ <fileset dir="${basedir}/lib" includes="${webapp.classes}"/>
+ </copy>
+
+ <!-- create version.properties -->
+ <propertyfile file="${samples-spring.war}/WEB-INF/flex/version.properties">
+ <entry key="build" value="${manifest.Implementation-Version}.${build.number}"/>
+ <entry key="minimumSDKVersion" value="${min.sdk.version}"/>
+ </propertyfile>
+
+ </target>
+
+ <target name="run-depend" if="src.depend">
+ <echo message="Removing class files that changed and dependent class files."/>
+ <depend cache="${classes.dir}" srcdir="${src.dir}" destdir="${classes.dir}"/>
+ </target>
+
+ <target name="compile" depends="prepare,run-depend,copy-resources" description="compile">
+ <javac source="1.5" debug="${src.debug}" destdir="${classes.dir}" srcdir="${src.dir}" classpathref="classpath"/>
+ </target>
+
+ <target name="compile-swfs">
+ <property name="samples.src.dir" value="${samples-spring.war}/WEB-INF/flex-src" />
+ <ant antfile="${samples.src.dir}/chat/build.xml" />
+ <ant antfile="${samples.src.dir}/collaboration/build.xml" />
+ <ant antfile="${samples.src.dir}/companymgr/build.xml" />
+ <ant antfile="${samples.src.dir}/feedstarter/build.xml" />
+ <ant antfile="${samples.src.dir}/insync01/build.xml" />
+ <ant antfile="${samples.src.dir}/insync02/build.xml" />
+ <ant antfile="${samples.src.dir}/insync03/build.xml" />
+ <ant antfile="${samples.src.dir}/insync04/build.xml" />
+ <ant antfile="${samples.src.dir}/insync05/build.xml" />
+ <ant antfile="${samples.src.dir}/insync06/build.xml" />
+ <ant antfile="${samples.src.dir}/simplepush/build.xml" />
+ <ant antfile="${samples.src.dir}/spring-blazeds-101/build.xml" />
+ <ant antfile="${samples.src.dir}/spring-blazeds-security-101/build.xml" />
+ <ant antfile="${samples.src.dir}/traderdesktop/build.xml" />
+ </target>
+
+ <target name="package" depends="compile-swfs" description=" Creates distribution war file">
+
+ <mkdir dir="${dist.dir}"/>
+
+ <!--
+ we don't want flex source naked in WEB-INF as that would lead to overlapping eclipse projects
+ instead, zip it up and then put it in the war
+ -->
+ <zip destfile="${samples-spring.war}/WEB-INF/flex-src/flex-src.zip"
+ comment="${manifest.Implementation-Title} ${manifest.Implementation-Version}.${label} Spring Integration Samples Flex Source Code">
+ <fileset dir="${samples-spring.war}/WEB-INF/flex-src"
+ excludes="**/build*.xml,flex-src.zip"/>
+ </zip>
+
+ <war file="${dist.dir}/samples-spring.war"
+ webxml="${samples-spring.war}/WEB-INF/web.xml">
+ <manifest>
+ <attribute name="Sealed" value="${manifest.sealed}"/>
+ <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - Spring Integration Samples Application"/>
+ <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
+ <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
+ </manifest>
+ <fileset dir="${samples-spring.war}" >
+ <exclude name="**/**/build*.xml" />
+ <exclude name="**/generated/**/*"/>
+ <exclude name="WEB-INF/jsp/**/*" />
+ <exclude name="WEB-INF/sessions/**/*" />
+ <exclude name="WEB-INF/flex-src/**/*" />
+ <!-- This is included in the war task already -->
+ <exclude name="WEB-INF/web.xml" />
+ </fileset>
+ <fileset dir="${samples-spring.war}" includes="WEB-INF/flex-src/flex-src.zip" />
+ </war>
+
+ <copy todir="${dist.dir}/sampledb">
+ <fileset dir="${basedir}/sampledb" />
+ <fileset file="${hsqldb.jar}" />
+ </copy>
+
+ </target>
+
+ <target name="clean" description="--> Removes jars and classes">
+ <delete quiet="true" includeEmptyDirs="true">
+ <fileset dir="${samples-spring.war}/WEB-INF/lib" includes="**/*"/>
+ <fileset dir="${samples-spring.war}/WEB-INF/flex/jars" includes="**/*"/>
+ <fileset dir="${samples-spring.war}/WEB-INF/flex/locale" includes="**/*"/>
+ <fileset dir="${samples-spring.war}/WEB-INF/flex/libs" includes="**/*"/>
+ <fileset dir="${classes.dir}" includes="**/*.class"/>
+ <fileset dir="${basedir}/sampledb" includes="${hsqldb.jar}"/>
+ <fileset file="${dist.dir}/samples-spring.war"/>
+ <fileset file="${samples-spring.war}/WEB-INF/flex-src/flex-src.zip"/>
+ <fileset dir="${samples-spring.war}/sqladmin"/>
+ <fileset dir="${samples-spring.war}/jmschat"/>
+ </delete>
+ </target>
+
+ <target name="generated-clean">
+ <delete includeEmptyDirs="true" quiet="true">
+ <fileset dir="${samples-spring.war}" includes="**/generated/*" />
+ </delete>
+ <delete includeEmptyDirs="true" quiet="true">
+ <fileset dir="${samples-spring.war}" includes="**/generated" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/index.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/index.html b/attic/apps/samples-spring/index.html
new file mode 100755
index 0000000..ab54259
--- /dev/null
+++ b/attic/apps/samples-spring/index.html
@@ -0,0 +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 > Import > General > 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 "Get Data": 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 "Save" 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="org.springframework.flex.spring.samples.contact.Contact")] 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 "Save" 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 "Save" 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 "Loosely Coupled" 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 "Save". Notice that the DataGrid is updated to reflect your changes.</li>
+ <li>Add a new contact and click "Save" 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 "Send": 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><flex:message-service /></code> inside <code><flex:message-broker /></code>. The "chat" destination is configured using <code><flex:message-destination id="chat" /></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 "simple-feed" destination is configured using <code><flex:message-destination id="simple-feed" /></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><flex:message-destination id="market-feed" allow-subtopics="true" subtopic-separator="." /></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 "Get Data" without logging in first: you get an "Access Denied" exception.</li>
+ <li>Log in (use UserId: john / Password: john), and click "Get Data" again: you should now get the data.</li>
+ <li>Click "Logout" and "Get Data" again: you get the "Access Denied" 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 "find*" 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/75229759/attic/apps/samples-spring/login.jsp
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/login.jsp b/attic/apps/samples-spring/login.jsp
new file mode 100755
index 0000000..5945ad9
--- /dev/null
+++ b/attic/apps/samples-spring/login.jsp
@@ -0,0 +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>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/main.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/main.css b/attic/apps/samples-spring/main.css
new file mode 100755
index 0000000..25bdec0
--- /dev/null
+++ b/attic/apps/samples-spring/main.css
@@ -0,0 +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;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/stocklist.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/stocklist.xml b/attic/apps/samples-spring/stocklist.xml
new file mode 100755
index 0000000..a5efecc
--- /dev/null
+++ b/attic/apps/samples-spring/stocklist.xml
@@ -0,0 +1,141 @@
+<!--
+
+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.
+
+-->
+<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/75229759/attic/apps/samples/README.txt
----------------------------------------------------------------------
diff --git a/attic/apps/samples/README.txt b/attic/apps/samples/README.txt
new file mode 100755
index 0000000..714815e
--- /dev/null
+++ b/attic/apps/samples/README.txt
@@ -0,0 +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.
+
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/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
new file mode 100755
index 0000000..ed10119
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/dashboard/build.xml
@@ -0,0 +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>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/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
new file mode 100755
index 0000000..487238c
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RegionBreakdown.mxml
@@ -0,0 +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>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RegionDetail.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RegionDetail.mxml b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RegionDetail.mxml
new file mode 100755
index 0000000..5678373
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RegionDetail.mxml
@@ -0,0 +1,175 @@
+<?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="*"
+ title="Region Details">
+
+ <fx:Script>
+
+ <![CDATA[
+ import mx.charts.HitData;
+ import mx.controls.Alert;
+ import mx.charts.chartClasses.ChartBase;
+
+ private var _region:String;
+
+ [Bindable]
+ public var revenueData:Array;
+
+ [Bindable]
+ public var selectedMonth:Object;
+
+ protected function monthChange(month:Object):void
+ {
+ selectedMonth = month;
+ dispatchEvent(new Event("monthChange"));
+ }
+
+ protected function currencyFormat(value:Object, arg2:Object, arg3:Object):String
+ {
+ return cf.format(value);
+ }
+
+ private function dataGridCurrencyFormat(item:Object, column:Object):String
+ {
+ return cf.format(item[column.dataField]);
+ }
+
+ private function sortByDates(obj1:Object, obj2:Object):Number
+ {
+ var n:Number = SortUtils.sortByDates(obj1, obj2, "name");
+ return n;
+ }
+
+ public function set region(r:String):void
+ {
+ _region = r;
+ this.title = "Region Details [" + r + "]";
+ }
+
+ private function formatDataTip(hitData:HitData):String
+ {
+ var month:String = hitData.item.name;
+ var revenue:Number = hitData.item.revenue;
+ var average:Number = hitData.item.average;
+ return "<b>Month: " + month + "</b><br>" + _region + ": " +
+ cf.format(revenue) + "<br>Average: " + cf.format(average);
+ }
+
+ ]]>
+
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:SeriesInterpolate id="interpolate" elementOffset="10"/>
+
+ <mx:CurrencyFormatter id="cf"/>
+ </fx:Declarations>
+
+ <mx:ViewStack id="vs" width="100%" height="100%">
+
+ <mx:VBox id="chartVBox" width="100%" height="100%" icon="@Embed('icon_chart.png')" toolTip="Chart View"
+ paddingLeft="4" paddingTop="4" paddingBottom="4" paddingRight="4">
+
+ <mx:ColumnChart dataProvider="{revenueData}" width="100%" height="100%" showDataTips="true" dataTipFunction="formatDataTip">
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis dataProvider="{revenueData}" categoryField="name"/>
+ </mx:horizontalAxis>
+
+ <mx:verticalAxis>
+ <mx:LinearAxis maximum="160000" labelFunction="currencyFormat"/>
+ </mx:verticalAxis>
+
+ <mx:series>
+ <fx:Array>
+ <mx:ColumnSeries yField="revenue" showDataEffect="{interpolate}">
+ <mx:fill>
+ <mx:LinearGradient>
+ <mx:entries>
+ <fx:Array>
+ <mx:GradientEntry color="#C6D5DD" ratio="0" alpha="100"/>
+ <mx:GradientEntry color="#336699" ratio="0.1" alpha="100"/>
+ <mx:GradientEntry color="#24496D" ratio="0.9" alpha="100"/>
+ <mx:GradientEntry color="#000000" ratio="1" alpha="100"/>
+ </fx:Array>
+ </mx:entries>
+ </mx:LinearGradient>
+ </mx:fill>
+ </mx:ColumnSeries>
+
+
+ <mx:LineSeries yField="average" form="curve" showDataEffect="{interpolate}">
+ <mx:stroke>
+<!-- SDK4 -->
+ <mx:SolidColorStroke color="#708EA4" weight="1"/>
+<!-- SDK3
+ <mx:Stroke color="#708EA4" weight="1"/>
+-->
+ </mx:stroke>
+
+ </mx:LineSeries>
+
+ </fx:Array>
+ </mx:series>
+
+ <mx:backgroundElements>
+ <fx:Array>
+<!-- SDK4 -->
+ <mx:GridLines gridDirection="both">
+<!-- SDK3
+ <mx:GridLines direction="both"> -->
+ <mx:verticalStroke>
+<!-- SDK4 -->
+ <mx:SolidColorStroke weight="1" color="#CCCCCC"/>
+<!-- SDK3
+ <mx:Stroke weight="1" color="#CCCCCC"/>
+-->
+ </mx:verticalStroke>
+ </mx:GridLines>
+ </fx:Array>
+ </mx:backgroundElements>
+
+ </mx:ColumnChart>
+ </mx:VBox>
+
+ <mx:VBox width="100%" height="100%" icon="@Embed('icon_grid.png')" toolTip="Grid View"
+ hideEffect="Fade" showEffect="Fade">
+ <mx:DataGrid dataProvider="{revenueData}" width="100%" height="100%"
+ change="monthChange(DataGrid(event.target).selectedItem)">
+ <mx:columns>
+ <fx:Array>
+ <mx:DataGridColumn dataField="name" headerText="Month"
+ sortCompareFunction="sortByDates" />
+ <mx:DataGridColumn dataField="revenue" headerText="Total Revenue"
+ labelFunction="dataGridCurrencyFormat" />
+ <mx:DataGridColumn dataField="average" headerText="Average Across Regions"
+ labelFunction="dataGridCurrencyFormat" />
+ </fx:Array>
+ </mx:columns>
+ </mx:DataGrid>
+ </mx:VBox>
+
+ </mx:ViewStack>
+
+ <mx:ControlBar>
+ <mx:ToggleButtonBar dataProvider="{vs}"/>
+ </mx:ControlBar>
+
+</mx:Panel>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RevenueTimeline.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RevenueTimeline.mxml b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RevenueTimeline.mxml
new file mode 100755
index 0000000..79a04ef
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/RevenueTimeline.mxml
@@ -0,0 +1,134 @@
+<?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:ViewStack xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns="*" width="100%" height="100%">
+
+ <fx:Script>
+
+ <![CDATA[
+ import mx.charts.HitData;
+
+ [Bindable]
+ public var revenueData:Array;
+
+ [Bindable]
+ public var selectedMonth:Object;
+
+ private var colors:Array = [0xFF0000, 0x00FF00, 0x0000FF, 0xFFFF00, 0x00FFFF];
+
+ protected function monthChange(month:Object):void
+ {
+ selectedMonth = month;
+ dispatchEvent(new Event("monthChange"));
+ }
+
+ protected function currencyFormat(value:Object, arg2:Object, arg3:Object):String
+ {
+ return cf.format(value);
+ }
+
+ private function dataGridCurrencyFormat(item:Object, column:Object):String
+ {
+ return cf.format(item[column.dataField]);
+ }
+
+ private function sortByDates(obj1:Object, obj2:Object):Number
+ {
+ var n:Number = SortUtils.sortByDates(obj1, obj2, "name");
+ return n;
+ }
+
+ private function formatDataTip(hitData:HitData):String
+ {
+ var name:String = hitData.item.name;
+ var revenue:Number = hitData.item.revenue;
+ return "<b>Month: "+name+"</b><br>Revenue: "+cf.format(revenue);
+ }
+
+ ]]>
+
+ </fx:Script>
+
+ <fx:Metadata>
+ [Event("monthChange")]
+ </fx:Metadata>
+
+ <fx:Declarations>
+ <mx:SeriesInterpolate id="interpolate" elementOffset="10"/>
+
+ <mx:CurrencyFormatter id="cf"/>
+ </fx:Declarations>
+
+ <mx:VBox id="chartVBox" width="100%" height="100%" icon="@Embed('icon_chart.png')" toolTip="Chart View"
+ paddingLeft="4" paddingTop="4" paddingBottom="4" paddingRight="4">
+ <mx:LineChart id="lc" dataProvider="{revenueData}" showDataTips="true" width="100%" height="100%" dataTipFunction="formatDataTip"
+ itemClick="monthChange(event.hitData.item)">
+
+ <mx:horizontalAxis>
+ <mx:CategoryAxis dataProvider="{revenueData}" categoryField="name"/>
+ </mx:horizontalAxis>
+
+ <mx:verticalAxis>
+ <mx:LinearAxis labelFunction="currencyFormat"/>
+ </mx:verticalAxis>
+
+ <mx:series>
+ <mx:LineSeries yField="revenue" showDataEffect="{interpolate}">
+ <mx:lineStroke>
+ <mx:SolidColorStroke color="#708EA4" weight="1"/>
+ </mx:lineStroke>
+ </mx:LineSeries>
+ <mx:LineSeries yField="license" showDataEffect="{interpolate}">
+ <mx:lineStroke>
+ <mx:SolidColorStroke weight="1"/>
+ </mx:lineStroke>
+ </mx:LineSeries>
+ </mx:series>
+
+ <mx:backgroundElements>
+ <fx:Array>
+<!-- SDK4 -->
+ <mx:GridLines gridDirection="both">
+<!-- SDK3
+ <mx:GridLines direction="both"> -->
+ <mx:verticalStroke>
+ <mx:SolidColorStroke weight="1" color="#CCCCCC"/>
+ </mx:verticalStroke>
+ </mx:GridLines>
+ </fx:Array>
+ </mx:backgroundElements>
+
+ </mx:LineChart>
+ </mx:VBox>
+
+ <mx:VBox width="100%" height="100%" icon="@Embed('icon_grid.png')" toolTip="Grid View">
+ <mx:DataGrid dataProvider="{revenueData}" width="100%" height="100%"
+ change="monthChange(DataGrid(event.target).selectedItem)">
+ <mx:columns>
+ <mx:DataGridColumn dataField="name" headerText="Month"
+ sortCompareFunction="sortByDates" />
+ <mx:DataGridColumn dataField="revenue" headerText="Total Revenue"
+ labelFunction="dataGridCurrencyFormat" />
+ <mx:DataGridColumn dataField="average" headerText="Region Average"
+ labelFunction="dataGridCurrencyFormat" />
+ </mx:columns>
+ </mx:DataGrid>
+ </mx:VBox>
+
+</mx:ViewStack>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/dashboard/src/SortUtils.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/dashboard/src/SortUtils.as b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/SortUtils.as
new file mode 100755
index 0000000..525585a
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/SortUtils.as
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package {
+
+import mx.utils.ObjectUtil;
+
+public class SortUtils
+{
+ //lookup the index based on month abbreviation
+ static public var monthMap:Object = {
+ Jan: 0,
+ Feb: 1,
+ Mar: 2,
+ Apr: 3,
+ May: 4,
+ Jun: 5,
+ Jul: 6,
+ Aug: 7,
+ Sep: 8,
+ Oct: 9,
+ Nov: 10,
+ Dec: 11
+ };
+
+ public function SortUtils()
+ {
+ super();
+ }
+
+ static public function sortByDates(obj1:Object, obj2:Object, prop:String):Number
+ {
+ var month:String = obj1[prop].substr(0,3);
+ var month1:Number = monthMap[month];
+ var year1:String = "20" + obj1[prop].substr(4,2);
+ month = obj2[prop].substr(0,3);
+ var month2:Number = monthMap[month];
+ var year2:String = "20" + obj2[prop].substr(4,2);
+ var date1:Date = new Date(Number(year1), month1, 01);
+ var date2:Date = new Date(Number(year2), month2, 01);
+
+ return ObjectUtil.dateCompare(date1, date2);
+ }
+
+}
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/dashboard/src/dashboard.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/dashboard/src/dashboard.mxml b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/dashboard.mxml
new file mode 100755
index 0000000..c40b4de
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/dashboard.mxml
@@ -0,0 +1,209 @@
+<?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:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns="*"
+ pageTitle="Collaborative Dashboard"
+ creationComplete="initApp()">
+
+
+ <fx:Style source="main.css"/>
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.messaging.messages.AsyncMessage;
+ import mx.messaging.messages.IMessage;
+ import mx.collections.ArrayCollection;
+ import mx.messaging.events.MessageEvent;
+ import mx.rpc.events.ResultEvent;
+
+ [Bindable]
+ public var slicedMonthData:ArrayCollection;
+
+ [Bindable]
+ public var slicedRegionData:ArrayCollection;
+
+ private var monthData:Array;
+ private var regionData:Array;
+
+ private function initApp():void
+ {
+ consumer.subscribe();
+ srv.send();
+ slicedMonthData = new ArrayCollection();
+ slicedRegionData = new ArrayCollection();
+ }
+
+ private function resultHandler(event:ResultEvent):void
+ {
+ monthData = event.result.list.month.source as Array;
+ slider.maximum = monthData.length - 1;
+ slider.values = [0, monthData.length - 1];
+ slicedMonthData.source = monthData;
+ regionBreakdown.month = monthData[0];
+
+ regionData = new Array(monthData.length);
+ var monthTotal:Number;
+
+ for (var i:Number = 0; i < monthData.length; i++)
+ {
+ regionData[i] = {name: monthData[i].name, average: 0, revenue: 0};
+ var regions:Array = monthData[i].region.source;
+ monthTotal = 0;
+ for (var j:Number = 0; j < regions.length; j++)
+ {
+ monthTotal += regions[j].revenue;
+ }
+ regionData[i].average = monthTotal/monthData[i].region.length
+ }
+ slicedRegionData.source = regionData.slice(slider.values[0], slider.values[1]);
+ }
+
+ private function getSliderLabel(value:String):String
+ {
+ return monthData[parseInt(value)].name;
+ }
+
+ // Send messages when user's selection changes
+ private function monthChange():void
+ {
+ var message:IMessage = new AsyncMessage();
+ message.body = {month: timeline.selectedMonth};
+ producer.send(message);
+ }
+
+ private function rangeChange():void
+ {
+ var message:IMessage = new AsyncMessage();
+ message.body = {min: slider.values[0], max: slider.values[1]+1};
+ producer.send(message);
+ }
+
+ private function regionChange():void
+ {
+ var message: IMessage = new AsyncMessage();
+ message.body = {region: regionBreakdown.selectedRegion};
+ producer.send(message);
+ }
+
+ // Handle incoming messages
+ private function messageHandler(event:MessageEvent):void
+ {
+ var body:Object = event.message.body;
+
+ if (body.min != null) //range
+ {
+ slider.values = [body.min, body.max - 1];
+
+ if (monthData != null)
+ slicedMonthData.source = monthData.slice(body.min, body.max);
+ if (regionData != null)
+ slicedRegionData.source = regionData.slice(body.min, body.max);
+
+ }
+ else if (body.month != null) //month in timeline
+ {
+ regionBreakdown.month = body.month;
+ }
+ else if (body.region != null) //region from breakdown
+ {
+ regionBreakdown.selectedRegion = body.region;
+ regionDetail.region = body.region.name;
+
+ for (var i: Number = 0; i < monthData.length; i++)
+ {
+ var regions: Array = monthData[i].region.source;
+ for (var j: Number = 0; j < regions.length; j++)
+ {
+ if (regions[j].name == body.region.name)
+ {
+ regionData[i].revenue = regions[j].revenue;
+ break;
+ }
+ }
+ }
+ slicedRegionData.source = regionData.slice(slider.values[0], slider.values[1] + 1);
+ }
+ }
+
+ private function toggleSeries():void
+ {
+ var message: IMessage = new AsyncMessage();
+ if (currentState=="series")
+ {
+ currentState = "";
+ message.body.series = false;
+ }
+ else
+ {
+ currentState = "series";
+ message.body.series = true;
+ }
+ producer.send(message);
+ }
+
+ private function dataGridCurrencyFormat(item:Object, column:Object):String
+ {
+ return cf.format(item[column.dataField]);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:Producer id="producer" destination="dashboard"/>
+ <mx:Consumer id="consumer" destination="dashboard" message="messageHandler(event)"/>
+
+ <mx:HTTPService id="srv" url="results.xml" useProxy="false" result="resultHandler(event)"/>
+
+ <mx:CurrencyFormatter id="cf"/>
+ </fx:Declarations>
+
+ <mx:HBox width="100%" verticalAlign="middle" horizontalAlign="right" paddingRight="40">
+ <mx:Label text="Welcome, Guest |"/>
+ <mx:ComboBox id="cb">
+ <mx:dataProvider>
+ <fx:String>Revenue Timeline</fx:String>
+ </mx:dataProvider>
+ </mx:ComboBox>
+ </mx:HBox>
+
+ <mx:HDividedBox width="100%" height="100%">
+
+ <mx:Panel id="timelinePanel" title="Revenue Timeline" width="100%" height="100%">
+ <RevenueTimeline id="timeline" revenueData="{slicedMonthData.source}"
+ monthChange="monthChange()"/>
+ <mx:ControlBar horizontalGap="4">
+ <mx:ToggleButtonBar dataProvider="{timeline}"/>
+ <mx:Spacer width="10"/>
+ <mx:Label text="Range:"/>
+ <mx:HSlider id="slider" width="150" thumbCount="2" snapInterval="1" minimum="0"
+ dataTipFormatFunction="getSliderLabel"
+ change="rangeChange()"/>
+ </mx:ControlBar>
+ </mx:Panel>
+
+ <mx:VDividedBox width="100%" height="100%">
+ <RegionBreakdown id="regionBreakdown" regionChange="regionChange()" width="100%" height="50%" />
+ <RegionDetail id="regionDetail" revenueData="{slicedRegionData.source}" width="100%" height="50%" />
+ </mx:VDividedBox>
+
+ </mx:HDividedBox>
+
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/dashboard/src/icon_chart.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/dashboard/src/icon_chart.png b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/icon_chart.png
new file mode 100755
index 0000000..7abe2f1
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/icon_chart.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/dashboard/src/icon_grid.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/dashboard/src/icon_grid.png b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/icon_grid.png
new file mode 100755
index 0000000..a44f0bc
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/icon_grid.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/dashboard/src/main.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/dashboard/src/main.css b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/main.css
new file mode 100755
index 0000000..4563e9f
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/main.css
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+@namespace mx "library://ns.adobe.com/flex/mx";
+
+mx|Application {
+ paddingTop: 12;
+ verticalGap: 12;
+}
+
+mx|Panel {
+ cornerRadius: 6;
+ panelBorderStyle: "roundCorners";
+}
+
+mx|Button {
+ cornerRadius: 4;
+}
+
+mx|HSlider {
+ showTrackHighlight: true;
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/dashboard/src/results.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/dashboard/src/results.xml b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/results.xml
new file mode 100755
index 0000000..9727e91
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/dashboard/src/results.xml
@@ -0,0 +1,213 @@
+<!--
+
+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.
+
+-->
+<list>
+
+ <month name="Jan-04" revenue="400263" average="80052">
+ <region name="APAC" revenue="46130"/>
+ <region name="Europe" revenue="106976"/>
+ <region name="Japan" revenue="79554"/>
+ <region name="Latin America" revenue="39252"/>
+ <region name="North America" revenue="128351"/>
+ </month>
+
+ <month name="Feb-04" revenue="379145" average="75829">
+ <region name="APAC" revenue="70324"/>
+ <region name="Europe" revenue="88912"/>
+ <region name="Japan" revenue="69677"/>
+ <region name="Latin America" revenue="59428"/>
+ <region name="North America" revenue="90804"/>
+ </month>
+
+ <month name="Mar-04" revenue="389687" average="77937">
+ <region name="APAC" revenue="60431"/>
+ <region name="Europe" revenue="140982"/>
+ <region name="Japan" revenue="58196"/>
+ <region name="Latin America" revenue="33373"/>
+ <region name="North America" revenue="96705"/>
+ </month>
+
+ <month name="Apr-04" revenue="460329" average="92065">
+ <region name="APAC" revenue="78969"/>
+ <region name="Europe" revenue="85885"/>
+ <region name="Japan" revenue="78107"/>
+ <region name="Latin America" revenue="65796"/>
+ <region name="North America" revenue="151572"/>
+ </month>
+
+ <month name="May-04" revenue="351014" average="70202">
+ <region name="APAC" revenue="64069"/>
+ <region name="Europe" revenue="82415"/>
+ <region name="Japan" revenue="96397"/>
+ <region name="Latin America" revenue="44627"/>
+ <region name="North America" revenue="63506"/>
+ </month>
+
+ <month name="Jun-04" revenue="384855" average="76971">
+ <region name="APAC" revenue="55331"/>
+ <region name="Europe" revenue="113196"/>
+ <region name="Japan" revenue="55371"/>
+ <region name="Latin America" revenue="58323"/>
+ <region name="North America" revenue="102634"/>
+ </month>
+
+ <month name="Jul-04" revenue="335192" average="67038">
+ <region name="APAC" revenue="39445"/>
+ <region name="Europe" revenue="110750"/>
+ <region name="Japan" revenue="73722"/>
+ <region name="Latin America" revenue="50595"/>
+ <region name="North America" revenue="60680"/>
+ </month>
+
+ <month name="Aug-04" revenue="393654" average="78730">
+ <region name="APAC" revenue="44801"/>
+ <region name="Europe" revenue="98806"/>
+ <region name="Japan" revenue="93673"/>
+ <region name="Latin America" revenue="50636"/>
+ <region name="North America" revenue="105738"/>
+ </month>
+
+ <month name="Sep-04" revenue="472554" average="94510">
+ <region name="APAC" revenue="61134"/>
+ <region name="Europe" revenue="136467"/>
+ <region name="Japan" revenue="93624"/>
+ <region name="Latin America" revenue="32293"/>
+ <region name="North America" revenue="149036"/>
+ </month>
+
+ <month name="Oct-04" revenue="324299" average="64859">
+ <region name="APAC" revenue="32078"/>
+ <region name="Europe" revenue="85420"/>
+ <region name="Japan" revenue="80483"/>
+ <region name="Latin America" revenue="64390"/>
+ <region name="North America" revenue="61928"/>
+ </month>
+
+ <month name="Nov-04" revenue="415403" average="83080">
+ <region name="APAC" revenue="58832"/>
+ <region name="Europe" revenue="143128"/>
+ <region name="Japan" revenue="64295"/>
+ <region name="Latin America" revenue="58261"/>
+ <region name="North America" revenue="90887"/>
+ </month>
+
+ <month name="Dec-04" revenue="386089" average="77217">
+ <region name="APAC" revenue="80555"/>
+ <region name="Europe" revenue="118981"/>
+ <region name="Japan" revenue="87520"/>
+ <region name="Latin America" revenue="27154"/>
+ <region name="North America" revenue="71879"/>
+ </month>
+
+ <month name="Jan-05" revenue="400263" average="80052">
+ <region name="APAC" revenue="46130"/>
+ <region name="Europe" revenue="106976"/>
+ <region name="Japan" revenue="79554"/>
+ <region name="Latin America" revenue="39252"/>
+ <region name="North America" revenue="128351"/>
+ </month>
+
+ <month name="Feb-05" revenue="379145" average="75829">
+ <region name="APAC" revenue="70324"/>
+ <region name="Europe" revenue="88912"/>
+ <region name="Japan" revenue="69677"/>
+ <region name="Latin America" revenue="59428"/>
+ <region name="North America" revenue="90804"/>
+ </month>
+
+ <month name="Mar-05" revenue="389687" average="77937">
+ <region name="APAC" revenue="60431"/>
+ <region name="Europe" revenue="140982"/>
+ <region name="Japan" revenue="58196"/>
+ <region name="Latin America" revenue="33373"/>
+ <region name="North America" revenue="96705"/>
+ </month>
+
+ <month name="Apr-05" revenue="460329" average="92065">
+ <region name="APAC" revenue="78969"/>
+ <region name="Europe" revenue="85885"/>
+ <region name="Japan" revenue="78107"/>
+ <region name="Latin America" revenue="65796"/>
+ <region name="North America" revenue="151572"/>
+ </month>
+
+ <month name="May-05" revenue="351014" average="70202">
+ <region name="APAC" revenue="64069"/>
+ <region name="Europe" revenue="82415"/>
+ <region name="Japan" revenue="96397"/>
+ <region name="Latin America" revenue="44627"/>
+ <region name="North America" revenue="63506"/>
+ </month>
+
+ <month name="Jun-05" revenue="384855" average="76971">
+ <region name="APAC" revenue="55331"/>
+ <region name="Europe" revenue="113196"/>
+ <region name="Japan" revenue="55371"/>
+ <region name="Latin America" revenue="58323"/>
+ <region name="North America" revenue="102634"/>
+ </month>
+
+ <month name="Jul-05" revenue="335192" average="67038">
+ <region name="APAC" revenue="39445"/>
+ <region name="Europe" revenue="110750"/>
+ <region name="Japan" revenue="73722"/>
+ <region name="Latin America" revenue="50595"/>
+ <region name="North America" revenue="60680"/>
+ </month>
+
+ <month name="Aug-05" revenue="393654" average="78730">
+ <region name="APAC" revenue="44801"/>
+ <region name="Europe" revenue="98806"/>
+ <region name="Japan" revenue="93673"/>
+ <region name="Latin America" revenue="50636"/>
+ <region name="North America" revenue="105738"/>
+ </month>
+
+ <month name="Sep-05" revenue="472554" average="94510">
+ <region name="APAC" revenue="61134"/>
+ <region name="Europe" revenue="136467"/>
+ <region name="Japan" revenue="93624"/>
+ <region name="Latin America" revenue="32293"/>
+ <region name="North America" revenue="149036"/>
+ </month>
+
+ <month name="Oct-05" revenue="324299" average="64859">
+ <region name="APAC" revenue="32078"/>
+ <region name="Europe" revenue="85420"/>
+ <region name="Japan" revenue="80483"/>
+ <region name="Latin America" revenue="64390"/>
+ <region name="North America" revenue="61928"/>
+ </month>
+
+ <month name="Nov-05" revenue="415403" average="83080">
+ <region name="APAC" revenue="58832"/>
+ <region name="Europe" revenue="143128"/>
+ <region name="Japan" revenue="64295"/>
+ <region name="Latin America" revenue="58261"/>
+ <region name="North America" revenue="90887"/>
+ </month>
+
+ <month name="Dec-05" revenue="386089" average="77217">
+ <region name="APAC" revenue="80555"/>
+ <region name="Europe" revenue="118981"/>
+ <region name="Japan" revenue="87520"/>
+ <region name="Latin America" revenue="27154"/>
+ <region name="North America" revenue="71879"/>
+ </month>
+
+</list>
\ No newline at end of file
[33/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex/services-config.xml b/apps/samples-spring/WEB-INF/flex/services-config.xml
deleted file mode 100755
index 6898ed1..0000000
--- a/apps/samples-spring/WEB-INF/flex/services-config.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<?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.
-
--->
-<services-config>
-
- <services>
- <service-include file-path="remoting-config.xml" />
- <service-include file-path="proxy-config.xml" />
- <service-include file-path="messaging-config.xml" />
- <default-channels>
- <channel ref="my-amf"/>
- </default-channels>
- </services>
-
- <channels>
-
- <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
- </channel-definition>
-
- <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
- <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
- <properties>
- <add-no-cache-headers>false</add-no-cache-headers>
- </properties>
- </channel-definition>
-
- <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>4</polling-interval-seconds>
- </properties>
- </channel-definition>
-
- <channel-definition id="my-longpolling-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amflongpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>5</polling-interval-seconds>
- <wait-interval-millis>60000</wait-interval-millis>
- <client-wait-interval-millis>1</client-wait-interval-millis>
- <max-waiting-poll-requests>200</max-waiting-poll-requests>
- <user-agent-settings>
- <!-- MSIE 5, 6, 7 default max number of permanent HTTP connections is 2. -->
- <user-agent match-on="MSIE" max-streaming-connections-per-session="1"/>
- <!-- MSIE 8 max number is 6. -->
- <user-agent match-on="MSIE 8" max-streaming-connections-per-session="5"/>
- <!-- Firefox 1, 2 max number is 2. -->
- <user-agent match-on="Firefox" max-streaming-connections-per-session="1"/>
- <!-- Firefox 3 max number is 6. -->
- <user-agent match-on="Firefox/3" max-streaming-connections-per-session="5"/>
- <!-- Safari 3, 4 max number is 4. -->
- <user-agent match-on="Safari" max-streaming-connections-per-session="3"/>
- <!-- Chrome 0, 1, 2 max number is 6. -->
- <user-agent match-on="Chrome" max-streaming-connections-per-session="5"/>
- <!-- Opera 7, 9 max number is 4.-->
- <user-agent match-on="Opera" max-streaming-connections-per-session="3"/>
- <!-- Opera 8 max number is 8. -->
- <user-agent match-on="Opera 8" max-streaming-connections-per-session="7"/>
- <!-- Opera 10 max number is 8. -->
- <user-agent match-on="Opera 10" max-streaming-connections-per-session="7"/>
- </user-agent-settings>
- </properties>
- </channel-definition>
-
- <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
- </channel-definition>
-
- </channels>
-
- <security>
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
- <security-constraint id="trusted">
- <roles>
- <role>ROLE_USER</role>
- <role>ROLE_ADMIN</role>
- </roles>
- </security-constraint>
- </security>
-
- <logging>
- <target class="flex.messaging.log.ConsoleTarget" level="Warn">
- <properties>
- <prefix>[BlazeDS] </prefix>
- <includeDate>false</includeDate>
- <includeTime>false</includeTime>
- <includeLevel>false</includeLevel>
- <includeCategory>false</includeCategory>
- </properties>
- <filters>
- <pattern>Endpoint.*</pattern>
- <pattern>Service.*</pattern>
- <pattern>Configuration</pattern>
- </filters>
- </target>
- </logging>
-
- <system>
- <redeploy>
- <enabled>false</enabled>
- </redeploy>
- </system>
-
-</services-config>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/spring/app-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/spring/app-config.xml b/apps/samples-spring/WEB-INF/spring/app-config.xml
deleted file mode 100755
index e13cdb8..0000000
--- a/apps/samples-spring/WEB-INF/spring/app-config.xml
+++ /dev/null
@@ -1,58 +0,0 @@
-<?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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:security="http://www.springframework.org/schema/security"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/security
- http://www.springframework.org/schema/security/spring-security-3.0.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-3.0.xsd">
-
- <!--
- Enable annotation-based configuration. companyService and industryService
- (used in the Company Manager sample) are configured using annotations.
- Open CompanyDAO.java and IndustryDAO.java for details.
- -->
- <context:annotation-config />
- <context:component-scan base-package="org.springframework.flex.samples" />
-
- <!-- Implementation of ProductDAO using low-level JDBC -->
- <bean id="productService" class="org.springframework.flex.samples.product.ProductDAO">
- <constructor-arg ref="dataSource" />
- </bean>
-
- <!-- Implementation of ContactDAO using Spring's JdbcTemplate -->
- <bean id="contactService" class="org.springframework.flex.samples.contact.ContactDAO">
- <constructor-arg ref="dataSource" />
- </bean>
-
- <!-- A secured implementation of ProductDAO -->
- <bean id="securedProductService" class="org.springframework.flex.samples.product.ProductDAO">
- <constructor-arg ref="dataSource" />
- <security:intercept-methods>
- <security:protect method="find*" access="ROLE_USER" />
- </security:intercept-methods>
- </bean>
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/spring/infrastructure-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/spring/infrastructure-config.xml b/apps/samples-spring/WEB-INF/spring/infrastructure-config.xml
deleted file mode 100755
index fa70dd2..0000000
--- a/apps/samples-spring/WEB-INF/spring/infrastructure-config.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:jdbc="http://www.springframework.org/schema/jdbc"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:amq="http://activemq.apache.org/schema/core"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/jdbc
- http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd">
-
- <!-- Create and populate the tables of the embedded database -->
- <bean id="dbInit" class="org.springframework.flex.samples.util.DatabaseInitializer">
- <constructor-arg ref="dataSource" />
- </bean>
-
- <!--
- Simple Spring-managed DataSource for embedded HSQL database
- The dbInit bean takes care of creating and populating the sample tables.
- -->
- <jdbc:embedded-database id="dataSource" type="HSQL" />
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/spring/security-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/spring/security-config.xml b/apps/samples-spring/WEB-INF/spring/security-config.xml
deleted file mode 100755
index 9c342a7..0000000
--- a/apps/samples-spring/WEB-INF/spring/security-config.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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.
-
--->
-<beans:beans xmlns="http://www.springframework.org/schema/security"
- xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
-
- <http entry-point-ref="entryPoint">
- <anonymous enabled="false"/>
- <form-login default-target-url="/spring-blazeds-security-101/index.html" login-page="/login.jsp" />
- </http>
-
- <beans:bean id="entryPoint"
- class="org.springframework.flex.security3.FlexAuthenticationEntryPoint"/>
-
- <authentication-manager>
- <authentication-provider>
- <user-service>
- <user name="john" password="john" authorities="ROLE_USER" />
- <user name="admin" password="admin" authorities="ROLE_USER, ROLE_ADMIN" />
- <user name="guest" password="guest" authorities="ROLE_GUEST" />
- </user-service>
- </authentication-provider>
- </authentication-manager>
-
-</beans:beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/.classpath
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/.classpath b/apps/samples-spring/WEB-INF/src/spring-samples/.classpath
deleted file mode 100755
index 18eb959..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/.classpath
+++ /dev/null
@@ -1,68 +0,0 @@
-<?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.
-
--->
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/aopalliance-1.0.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/aspectjrt-1.6.3.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/aspectjweaver-1.6.5.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/backport-util-concurrent-2.2.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/cglib-nodep-2.1_3.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/commons-codec-1.3.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/commons-httpclient-3.1.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/commons-logging-1.1.1.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-messaging-common.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-messaging-core.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-messaging-opt.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-messaging-proxy.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-messaging-remoting.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/flex-rds-server.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/hsqldb.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/jackson-core-asl-1.0.0.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/jstl-1.1.2.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.aop-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.asm-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.aspects-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.beans-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.context.support-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.context-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.core-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.expression-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.flex-1.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.instrument.tomcat-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.instrument-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.integration-1.0.4.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.jdbc-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.jms-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.orm-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.oxm-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.test-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.transaction-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.web.portlet-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.web.servlet-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.web.struts-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/org.springframework.web-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/spring-security-config-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/spring-security-core-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/spring-security-web-3.0.3.RELEASE.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR/standard-1.1.2.jar"/>
- <classpathentry kind="var" path="WEBAPP_LIB_DIR"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/.project b/apps/samples-spring/WEB-INF/src/spring-samples/.project
deleted file mode 100755
index ae8612b..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/.project
+++ /dev/null
@@ -1,35 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>spring-samples</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/Company.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/Company.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/Company.java
deleted file mode 100755
index f220d2f..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/Company.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.company;
-
-import java.io.Serializable;
-
-import org.springframework.flex.samples.industry.Industry;
-
-public class Company implements Serializable {
-
- static final long serialVersionUID = 103844514947365244L;
-
- private int id;
-
- private String name;
-
- private String address;
-
- private String city;
-
- private String state;
-
- private String zip;
-
- private String phone;
-
- private Industry industry;
-
- public Company() {
-
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getAddress() {
- return this.address;
- }
-
- public void setAddress(String address) {
- this.address = address;
- }
-
- public String getCity() {
- return this.city;
- }
-
- public void setCity(String city) {
- this.city = city;
- }
-
- public String getState() {
- return this.state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public String getZip() {
- return this.zip;
- }
-
- public void setZip(String zip) {
- this.zip = zip;
- }
-
- public String getPhone() {
- return this.phone;
- }
-
- public void setPhone(String phone) {
- this.phone = phone;
- }
-
- public Industry getIndustry() {
- return this.industry;
- }
-
- public void setIndustry(Industry industry) {
- this.industry = industry;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/CompanyDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/CompanyDAO.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/CompanyDAO.java
deleted file mode 100755
index 713e56f..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/CompanyDAO.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.company;
-
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.sql.DataSource;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.flex.remoting.RemotingDestination;
-import org.springframework.flex.remoting.RemotingExclude;
-import org.springframework.flex.remoting.RemotingInclude;
-import org.springframework.flex.samples.industry.IIndustryDAO;
-import org.springframework.jdbc.core.RowMapper;
-import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
-import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
-import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
-import org.springframework.stereotype.Service;
-
-@Service("companyService")
-@RemotingDestination(channels = { "my-amf" })
-public class CompanyDAO implements ICompanyDAO {
-
- private final SimpleJdbcTemplate template;
-
- private final SimpleJdbcInsert insertCompany;
-
- private final IIndustryDAO industryDAO;
-
- private final RowMapper<Company> rowMapper = new ParameterizedRowMapper<Company>() {
-
- public Company mapRow(ResultSet rs, int rowNum) throws SQLException {
- Company company = new Company();
- company.setId(rs.getInt("id"));
- company.setName(rs.getString("name"));
- company.setAddress(rs.getString("address"));
- company.setCity(rs.getString("city"));
- company.setState(rs.getString("state"));
- company.setZip(rs.getString("zip"));
- company.setPhone(rs.getString("phone"));
- company.setIndustry(CompanyDAO.this.industryDAO.findById(rs.getInt("industry_id")));
- return company;
- }
- };
-
- @Autowired
- public CompanyDAO(DataSource dataSource, IIndustryDAO industryDAO) {
- this.template = new SimpleJdbcTemplate(dataSource);
- this.insertCompany = new SimpleJdbcInsert(dataSource).withTableName("COMPANY").usingGeneratedKeyColumns("ID");
- this.industryDAO = industryDAO;
- }
-
- @RemotingInclude
- public Company findById(int id) {
- return this.template.queryForObject("SELECT * FROM company WHERE id=?", this.rowMapper, id);
- }
-
- @RemotingInclude
- public List<Company> findAll() {
- return this.template.query("SELECT * FROM company ORDER BY name", this.rowMapper);
- }
-
- @RemotingInclude
- public List<Company> findByName(String name) {
- return this.template.query("SELECT * FROM company WHERE UPPER(name) LIKE ? ORDER BY name", this.rowMapper, "%" + name.toUpperCase() + "%");
- }
-
- @RemotingInclude
- public Company create(Company company) {
- Map<String, Object> parameters = new HashMap<String, Object>();
- parameters.put("name", company.getName());
- parameters.put("address", company.getAddress());
- parameters.put("city", company.getCity());
- parameters.put("state", company.getState());
- parameters.put("zip", company.getZip());
- parameters.put("phone", company.getPhone());
- parameters.put("industry_id", company.getIndustry().getId());
- Number id = this.insertCompany.executeAndReturnKey(parameters);
- company.setId(id.intValue());
- return company;
- }
-
- @RemotingInclude
- public boolean update(Company company) {
- int count = this.template.update("UPDATE company SET name=?, address=?, city=?, state=?, zip=?, phone=?, industry_id=? WHERE id=?",
- company.getName(), company.getAddress(), company.getCity(), company.getState(), company.getZip(), company.getPhone(),
- company.getIndustry().getId(), company.getId());
- return count == 1;
- }
-
- @RemotingExclude
- public boolean remove(Company company) {
- int count = this.template.update("DELETE FROM company WHERE id=?", company.getId());
- return count == 1;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/ICompanyDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/ICompanyDAO.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/ICompanyDAO.java
deleted file mode 100755
index 30e66df..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/company/ICompanyDAO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.company;
-
-import org.springframework.flex.samples.dao.IGenericDAO;
-
-public interface ICompanyDAO extends IGenericDAO<Company> {
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/Contact.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/Contact.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/Contact.java
deleted file mode 100755
index 364e128..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/Contact.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.contact;
-
-import java.io.Serializable;
-
-public class Contact implements Serializable {
-
- static final long serialVersionUID = 103844514947365244L;
-
- private int id;
-
- private String firstName;
-
- private String lastName;
-
- private String address;
-
- private String city;
-
- private String state;
-
- private String zip;
-
- private String phone;
-
- private String email;
-
- public Contact() {
-
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getFirstName() {
- return this.firstName;
- }
-
- public void setFirstName(String firstName) {
- this.firstName = firstName;
- }
-
- public String getLastName() {
- return this.lastName;
- }
-
- public void setLastName(String lastName) {
- this.lastName = lastName;
- }
-
- public String getAddress() {
- return this.address;
- }
-
- public void setAddress(String address) {
- this.address = address;
- }
-
- public String getCity() {
- return this.city;
- }
-
- public void setCity(String city) {
- this.city = city;
- }
-
- public String getState() {
- return this.state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public String getZip() {
- return this.zip;
- }
-
- public void setZip(String zip) {
- this.zip = zip;
- }
-
- public String getPhone() {
- return this.phone;
- }
-
- public void setPhone(String phone) {
- this.phone = phone;
- }
-
- public String getEmail() {
- return this.email;
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/ContactDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/ContactDAO.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/ContactDAO.java
deleted file mode 100755
index 8c7115a..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/ContactDAO.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
- /*
- * This file has been modified by Adobe (Adobe Systems Incorporated).
- * Date: April 10, 2010
- * Reason: Migrated the DB used for samples-spring web app to HSQL.
- */
-
-package org.springframework.flex.samples.contact;
-
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.sql.DataSource;
-
-import org.springframework.jdbc.core.RowMapper;
-import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
-import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
-import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
-
-public class ContactDAO implements IContactDAO {
-
- private final SimpleJdbcTemplate template;
-
- private final SimpleJdbcInsert insertContact;
-
- private final RowMapper<Contact> rowMapper = new ParameterizedRowMapper<Contact>() {
-
- public Contact mapRow(ResultSet rs, int rowNum) throws SQLException {
- Contact contact = new Contact();
- contact.setId(rs.getInt("id"));
- contact.setFirstName(rs.getString("first_name"));
- contact.setLastName(rs.getString("last_name"));
- contact.setAddress(rs.getString("address"));
- contact.setCity(rs.getString("city"));
- contact.setState(rs.getString("state"));
- contact.setZip(rs.getString("zip"));
- contact.setPhone(rs.getString("phone"));
- contact.setEmail(rs.getString("email"));
- return contact;
- }
- };
-
- public ContactDAO(DataSource dataSource) {
- this.template = new SimpleJdbcTemplate(dataSource);
- this.insertContact = new SimpleJdbcInsert(dataSource).withTableName("CONTACT").usingGeneratedKeyColumns("ID");
- }
-
- public List<Contact> findAll() {
- return this.template.query("SELECT * FROM contact ORDER BY first_name, last_name", this.rowMapper);
- }
-
- public List<Contact> findByName(String name) {
- return this.template.query("SELECT * FROM contact WHERE UPPER(CONCAT(CONCAT(first_name, ' '), last_name)) LIKE ? ORDER BY first_name, last_name",
- this.rowMapper, "%" + name.toUpperCase() + "%");
- }
-
- public Contact findById(int id) {
- return this.template.queryForObject("SELECT * FROM contact WHERE id=?", this.rowMapper, id);
- }
-
- public Contact create(Contact contact) {
- Map<String, Object> parameters = new HashMap<String, Object>();
- parameters.put("first_name", contact.getFirstName());
- parameters.put("last_name", contact.getLastName());
- parameters.put("address", contact.getAddress());
- parameters.put("city", contact.getCity());
- parameters.put("state", contact.getState());
- parameters.put("zip", contact.getZip());
- parameters.put("phone", contact.getPhone());
- parameters.put("email", contact.getEmail());
- Number id = this.insertContact.executeAndReturnKey(parameters);
- contact.setId(id.intValue());
- return contact;
- }
-
- public boolean update(Contact contact) {
- int count = this.template.update(
- "UPDATE contact SET first_name=?, last_name=?, address=?, city=?, state=?, zip=?, phone=?, email=? WHERE id=?", contact.getFirstName(),
- contact.getLastName(), contact.getAddress(), contact.getCity(), contact.getState(), contact.getZip(), contact.getPhone(),
- contact.getEmail(), contact.getId());
- return count == 1;
- }
-
- public boolean remove(Contact contact) {
- int count = this.template.update("DELETE FROM contact WHERE id=?", contact.getId());
- return count == 1;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/IContactDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/IContactDAO.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/IContactDAO.java
deleted file mode 100755
index 5096acf..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/contact/IContactDAO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.contact;
-
-import org.springframework.flex.samples.dao.IGenericDAO;
-
-public interface IContactDAO extends IGenericDAO<Contact> {
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/dao/IGenericDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/dao/IGenericDAO.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/dao/IGenericDAO.java
deleted file mode 100755
index ecd5a6e..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/dao/IGenericDAO.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.dao;
-
-import java.util.List;
-
-public interface IGenericDAO<T> {
-
- public List<T> findAll();
-
- public List<T> findByName(String name);
-
- public T findById(int id);
-
- public T create(T item);
-
- public boolean update(T item);
-
- public boolean remove(T item);
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IIndustryDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IIndustryDAO.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IIndustryDAO.java
deleted file mode 100755
index 2444f6f..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IIndustryDAO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.industry;
-
-import org.springframework.flex.samples.dao.IGenericDAO;
-
-public interface IIndustryDAO extends IGenericDAO<Industry> {
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/Industry.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/Industry.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/Industry.java
deleted file mode 100755
index 92292b2..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/Industry.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.industry;
-
-import java.io.Serializable;
-
-public class Industry implements Serializable {
-
- static final long serialVersionUID = 103844514947365244L;
-
- private int id;
-
- private String name;
-
- public Industry() {
-
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IndustryDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IndustryDAO.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IndustryDAO.java
deleted file mode 100755
index 47cda01..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/industry/IndustryDAO.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.industry;
-
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.sql.DataSource;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.flex.remoting.RemotingDestination;
-import org.springframework.jdbc.core.RowMapper;
-import org.springframework.jdbc.core.simple.ParameterizedRowMapper;
-import org.springframework.jdbc.core.simple.SimpleJdbcInsert;
-import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
-import org.springframework.stereotype.Service;
-
-@Service("industryService")
-@RemotingDestination(channels = { "my-amf" })
-public class IndustryDAO implements IIndustryDAO {
-
- private final SimpleJdbcTemplate template;
-
- private final SimpleJdbcInsert insertIndustry;
-
- private final RowMapper<Industry> rowMapper = new ParameterizedRowMapper<Industry>() {
-
- public Industry mapRow(ResultSet rs, int rowNum) throws SQLException {
- Industry industry = new Industry();
- industry.setId(rs.getInt("id"));
- industry.setName(rs.getString("name"));
- return industry;
- }
- };
-
- public List<Industry> findAll() {
- return this.template.query("SELECT * FROM industry ORDER BY name", this.rowMapper);
- }
-
- public List<Industry> findByName(String name) {
- return this.template.query("SELECT * FROM industry WHERE UPPER(name) LIKE ? ORDER BY name", this.rowMapper, "%" + name.toUpperCase() + "%");
- }
-
- @Autowired
- public IndustryDAO(DataSource dataSource) {
- this.template = new SimpleJdbcTemplate(dataSource);
- this.insertIndustry = new SimpleJdbcInsert(dataSource).withTableName("INDUSTRY").usingGeneratedKeyColumns("ID");
- }
-
- public Industry findById(int id) {
- return this.template.queryForObject("SELECT * FROM industry WHERE id=?", this.rowMapper, id);
- }
-
- public Industry create(Industry industry) {
- Map<String, Object> parameters = new HashMap<String, Object>();
- parameters.put("name", industry.getName());
- Number id = this.insertIndustry.executeAndReturnKey(parameters);
- industry.setId(id.intValue());
- return industry;
- }
-
- public boolean update(Industry industry) {
- int count = this.template.update("UPDATE industry SET name=? WHERE id=?", industry.getName());
- return count == 1;
- }
-
- public boolean remove(Industry industry) {
- int count = this.template.update("DELETE FROM industry WHERE id=?", industry.getId());
- return count == 1;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/integration/Counter.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/integration/Counter.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/integration/Counter.java
deleted file mode 100755
index b7dd467..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/integration/Counter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.integration;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class Counter {
-
- private volatile boolean running;
-
- private final Log log = LogFactory.getLog(Counter.class);
-
- private final AtomicInteger count = new AtomicInteger();
-
- public Integer next() {
- return this.running ? this.count.getAndIncrement() : null;
- }
-
- public void handle(String message) {
- if ("start".equalsIgnoreCase(message)) {
- this.running = true;
- } else if ("stop".equalsIgnoreCase(message)) {
- this.running = false;
- } else {
- try {
- this.count.set(Integer.parseInt(message));
- } catch (NumberFormatException e) {
- this.log.info("UNSUPPORTED FLEX MESSAGE RECEIVED: " + message);
- }
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/MarketFeed.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/MarketFeed.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/MarketFeed.java
deleted file mode 100755
index db0423f..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/MarketFeed.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
- /*
- * This file has been modified by Adobe (Adobe Systems Incorporated).
- * Date: May 19, 2010
- * Reason(s): Fixed the following issues:
- * BLZ-533: unexploded war fails to deploy on weblogic
- *
- * Date: Oct 7, 2010
- * Reason(s): Fixed the following issues:
- * BLZ-573: Cannot create a new company in Company Manager Sample in Spring BlazeDS Integration Test Drive
- * BLZ-574: Error in creating new contact in insync05 sample in Spring BlazeDS Integration test drive
- */
-
-package org.springframework.flex.samples.marketfeed;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Random;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.springframework.core.io.Resource;
-import org.springframework.flex.messaging.AsyncMessageCreator;
-import org.springframework.flex.messaging.MessageTemplate;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import flex.messaging.messages.AsyncMessage;
-
-public class MarketFeed {
-
- private static FeedThread thread;
-
- private final MessageTemplate template;
-
- private final List<Stock> stockList;
-
- public MarketFeed(MessageTemplate template, Resource filePath) throws IOException {
- this.template = template;
- this.stockList = getStocks(filePath.getInputStream());
- }
-
- public void start() {
- if (thread == null) {
- thread = new FeedThread(this.template, this.stockList);
- thread.start();
- }
- }
-
- public void stop() {
- if (thread != null) {
- thread.running = false;
- thread = null;
- }
- }
-
- private List<Stock> getStocks(InputStream fileInputStream) {
-
- List<Stock> list = new ArrayList<Stock>();
-
- try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- Document doc = factory.newDocumentBuilder().parse(fileInputStream);
- NodeList stockNodes = doc.getElementsByTagName("stock");
- int length = stockNodes.getLength();
- Stock stock;
- Node stockNode;
- for (int i = 0; i < length; i++) {
- stockNode = stockNodes.item(i);
- stock = new Stock();
- stock.setSymbol(getStringValue(stockNode, "symbol"));
- stock.setName(getStringValue(stockNode, "company"));
- stock.setLast(getDoubleValue(stockNode, "last"));
- stock.setHigh(stock.getLast());
- stock.setLow(stock.getLast());
- stock.setOpen(stock.getLast());
- stock.setChange(0);
- list.add(stock);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- return list;
- }
-
- private String getStringValue(Node node, String name) {
- return ((Element) node).getElementsByTagName(name).item(0).getFirstChild().getNodeValue();
- }
-
- private double getDoubleValue(Node node, String name) {
- return Double.parseDouble(getStringValue(node, name));
- }
-
- public static class FeedThread extends Thread {
-
- public boolean running = false;
-
- private final MessageTemplate template;
-
- private final List<Stock> stockList;
-
- private final Random random = new Random();
-
- public FeedThread(MessageTemplate template, List<Stock> stockList) {
- this.template = template;
- this.stockList = stockList;
- }
-
- @Override
- public void run() {
- this.running = true;
-
- int size = this.stockList.size();
- int index = 0;
-
- Stock stock;
-
- while (this.running) {
-
- stock = this.stockList.get(index);
- simulateChange(stock);
-
- index++;
- if (index >= size) {
- index = 0;
- }
-
- sendStockUpdate(stock);
-
- try {
- Thread.sleep(20);
- } catch (InterruptedException e) {
- }
-
- }
- }
-
- private void sendStockUpdate(final Stock stock) {
- template.send(new AsyncMessageCreator() {
-
- public AsyncMessage createMessage() {
- AsyncMessage msg = template.createMessageForDestination("market-feed");
- msg.setHeader("DSSubtopic", stock.getSymbol());
- msg.setBody(stock);
- return msg;
- }
- });
- }
-
- private void simulateChange(Stock stock) {
-
- double maxChange = stock.open * 0.005;
- double change = maxChange - this.random.nextDouble() * maxChange * 2;
- stock.change = change;
- double last = stock.last + change;
-
- if (last < stock.open + stock.open * 0.15 && last > stock.open - stock.open * 0.15) {
- stock.last = last;
- } else {
- stock.last = stock.last - change;
- }
-
- if (stock.last > stock.high) {
- stock.high = stock.last;
- } else if (stock.last < stock.low) {
- stock.low = stock.last;
- }
- stock.date = new Date();
-
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/Stock.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/Stock.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/Stock.java
deleted file mode 100755
index c5cbf45..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/marketfeed/Stock.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.marketfeed;
-
-import java.io.Serializable;
-import java.util.Date;
-
-public class Stock implements Serializable {
-
- private static final long serialVersionUID = -1763421100056755200L;
-
- protected String symbol;
-
- protected String name;
-
- protected double low;
-
- protected double high;
-
- protected double open;
-
- protected double last;
-
- protected double change;
-
- protected Date date;
-
- public double getChange() {
- return this.change;
- }
-
- public void setChange(double change) {
- this.change = change;
- }
-
- public double getHigh() {
- return this.high;
- }
-
- public void setHigh(double high) {
- this.high = high;
- }
-
- public double getLast() {
- return this.last;
- }
-
- public void setLast(double last) {
- this.last = last;
- }
-
- public double getLow() {
- return this.low;
- }
-
- public void setLow(double low) {
- this.low = low;
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public double getOpen() {
- return this.open;
- }
-
- public void setOpen(double open) {
- this.open = open;
- }
-
- public String getSymbol() {
- return this.symbol;
- }
-
- public void setSymbol(String symbol) {
- this.symbol = symbol;
- }
-
- public Date getDate() {
- return this.date;
- }
-
- public void setDate(Date date) {
- this.date = date;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/IProductDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/IProductDAO.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/IProductDAO.java
deleted file mode 100755
index a5f2f54..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/IProductDAO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.product;
-
-import org.springframework.flex.samples.dao.IGenericDAO;
-
-public interface IProductDAO extends IGenericDAO<Product> {
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/Product.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/Product.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/Product.java
deleted file mode 100755
index 5e37e19..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/Product.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.product;
-
-import java.io.Serializable;
-
-public class Product implements Serializable {
-
- static final long serialVersionUID = 103844514947365244L;
-
- private int productId;
-
- private String name;
-
- private String description;
-
- private String image;
-
- private String category;
-
- private double price;
-
- private int qty;
-
- public Product() {
-
- }
-
- public Product(int productId, String name, String description, String image, String category, double price, int qty) {
- this.productId = productId;
- this.name = name;
- this.description = description;
- this.image = image;
- this.category = category;
- this.price = price;
- this.qty = qty;
- }
-
- public String getCategory() {
- return this.category;
- }
-
- public void setCategory(String category) {
- this.category = category;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getImage() {
- return this.image;
- }
-
- public void setImage(String image) {
- this.image = image;
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public double getPrice() {
- return this.price;
- }
-
- public void setPrice(double price) {
- this.price = price;
- }
-
- public int getProductId() {
- return this.productId;
- }
-
- public void setProductId(int productId) {
- this.productId = productId;
- }
-
- public int getQty() {
- return this.qty;
- }
-
- public void setQty(int qty) {
- this.qty = qty;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/ProductDAO.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/ProductDAO.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/ProductDAO.java
deleted file mode 100755
index 881b22a..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/product/ProductDAO.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
-package org.springframework.flex.samples.product;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.sql.DataSource;
-
-public class ProductDAO implements IProductDAO {
-
- private final DataSource dataSource;
-
- public ProductDAO(DataSource dataSource) {
- this.dataSource = dataSource;
- }
-
- public List<Product> findAll() {
- List<Product> list = new ArrayList<Product>();
- Connection c = null;
-
- try {
- c = this.dataSource.getConnection();
- Statement s = c.createStatement();
- ResultSet rs = s.executeQuery("SELECT * FROM product ORDER BY name");
- while (rs.next()) {
- list.add(new Product(rs.getInt("id"), rs.getString("name"), rs.getString("description"), rs.getString("image"),
- rs.getString("category"), rs.getDouble("price"), rs.getInt("qty")));
- }
- } catch (SQLException e) {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
- return list;
- }
-
- public List<Product> findByName(String name) {
- List<Product> list = new ArrayList<Product>();
- Connection c = null;
- try {
- c = this.dataSource.getConnection();
- PreparedStatement ps = c.prepareStatement("SELECT * FROM product WHERE UPPER(name) LIKE ? ORDER BY name");
- ps.setString(1, "%" + name.toUpperCase() + "%");
- ResultSet rs = ps.executeQuery();
- while (rs.next()) {
- list.add(new Product(rs.getInt("id"), rs.getString("name"), rs.getString("description"), rs.getString("image"),
- rs.getString("category"), rs.getDouble("price"), rs.getInt("qty")));
- }
- } catch (SQLException e) {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
- return list;
- }
-
- public Product findById(int id) {
- Product product = new Product();
- Connection c = null;
- try {
- c = this.dataSource.getConnection();
- PreparedStatement ps = c.prepareStatement("SELECT * FROM product WHERE id=?");
- ps.setInt(1, id);
- ResultSet rs = ps.executeQuery();
- if (rs.next()) {
- product = new Product();
- product.setProductId(rs.getInt("id"));
- product.setName(rs.getString("name"));
- product.setDescription(rs.getString("description"));
- product.setImage(rs.getString("image"));
- product.setCategory(rs.getString("category"));
- product.setPrice(rs.getDouble("price"));
- product.setQty(rs.getInt("qty"));
- }
- } catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
- return product;
- }
-
- public Product create(Product product) {
- Connection c = null;
- PreparedStatement ps = null;
- try {
- c = this.dataSource.getConnection();
- ps = c.prepareStatement("INSERT INTO product (name, description, image, category, price, qty) VALUES (?, ?, ?, ?, ?, ?)",
- new String[] { "ID" });
- ps.setString(1, product.getName());
- ps.setString(2, product.getDescription());
- ps.setString(3, product.getImage());
- ps.setString(4, product.getCategory());
- ps.setDouble(5, product.getPrice());
- ps.setInt(6, product.getQty());
- ps.executeUpdate();
- ResultSet rs = ps.getGeneratedKeys();
- rs.next();
- // Update the id in the returned object. This is important as this value must be returned to the client.
- int id = rs.getInt(1);
- product.setProductId(id);
- } catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
- return product;
- }
-
- public boolean update(Product product) {
- Connection c = null;
- try {
- c = this.dataSource.getConnection();
- PreparedStatement ps = c.prepareStatement("UPDATE product SET name=?, description=?, image=?, category=?, price=?, qty=? WHERE id=?");
- ps.setString(1, product.getName());
- ps.setString(2, product.getDescription());
- ps.setString(3, product.getImage());
- ps.setString(4, product.getCategory());
- ps.setDouble(5, product.getPrice());
- ps.setInt(6, product.getQty());
- ps.setInt(7, product.getProductId());
- return ps.executeUpdate() == 1;
- } catch (SQLException e) {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
-
- }
-
- public boolean remove(Product product) {
- Connection c = null;
- try {
- c = this.dataSource.getConnection();
- PreparedStatement ps = c.prepareStatement("DELETE FROM product WHERE id=?");
- ps.setInt(1, product.getProductId());
- int count = ps.executeUpdate();
- return count == 1;
- } catch (Exception e) {
- e.printStackTrace();
- throw new RuntimeException(e);
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/secured/Security3Helper.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/secured/Security3Helper.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/secured/Security3Helper.java
deleted file mode 100755
index 24bd1c0..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/secured/Security3Helper.java
+++ /dev/null
@@ -1,29 +0,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.
- */
-package org.springframework.flex.samples.secured;
-
-import java.util.Map;
-
-import org.springframework.flex.security3.AuthenticationResultUtils;
-
-
-public class Security3Helper {
-
- public Map<String, Object> getAuthentication() {
- return AuthenticationResultUtils.getAuthenticationResult();
- }
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/simplefeed/SimpleFeed.java
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/simplefeed/SimpleFeed.java b/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/simplefeed/SimpleFeed.java
deleted file mode 100755
index 759cbd6..0000000
--- a/apps/samples-spring/WEB-INF/src/spring-samples/src/org/springframework/flex/samples/simplefeed/SimpleFeed.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright 2002-2009 the original author or authors.
- *
- * Licensed 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.
- */
-
- /*
- * This file has been modified by Adobe (Adobe Systems Incorporated).
- * Date: Oct 7, 2010
- * Reason(s): Fixed the following issues:
- * BLZ-573: Cannot create a new company in Company Manager Sample in Spring BlazeDS Integration Test Drive
- * BLZ-574: Error in creating new contact in insync05 sample in Spring BlazeDS Integration test drive
- */
-
-package org.springframework.flex.samples.simplefeed;
-
-import java.util.Random;
-
-import org.springframework.flex.messaging.MessageTemplate;
-
-public class SimpleFeed {
-
- private static FeedThread thread;
-
- private final MessageTemplate template;
-
- public SimpleFeed(MessageTemplate template) {
- this.template = template;
- }
-
- public void start() {
- if (thread == null) {
- thread = new FeedThread(this.template);
- thread.start();
- }
- }
-
- public void stop() {
- if (thread != null) {
- thread.running = false;
- thread = null;
- }
- }
-
- public static class FeedThread extends Thread {
-
- public boolean running = false;
-
- private final MessageTemplate template;
-
- public FeedThread(MessageTemplate template) {
- this.template = template;
- }
-
- @Override
- public void run() {
- this.running = true;
- Random random = new Random();
- double initialValue = 35;
- double currentValue = 35;
- double maxChange = initialValue * 0.005;
-
- while (this.running) {
- double change = maxChange - random.nextDouble() * maxChange * 2;
- double newValue = currentValue + change;
-
- if (currentValue < initialValue + initialValue * 0.15 && currentValue > initialValue - initialValue * 0.15) {
- currentValue = newValue;
- } else {
- currentValue -= change;
- }
-
- this.template.send("simple-feed", new Double(currentValue));
-
- try {
- Thread.sleep(300);
- } catch (InterruptedException e) {
- }
-
- }
- }
- }
-
-}
[38/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/src/Contact.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/src/Contact.as b/apps/samples-spring/WEB-INF/flex-src/insync06/src/Contact.as
deleted file mode 100755
index ffa1f02..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/src/Contact.as
+++ /dev/null
@@ -1,35 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- [Bindable]
- [RemoteClass(alias="org.springframework.flex.samples.contact.Contact")]
- public class Contact
- {
- public var id:int = -1;
- public var firstName:String;
- public var lastName:String;
- public var email:String;
- public var phone:String;
- public var address:String;
- public var city:String;
- public var state:String;
- public var zip:String;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactEvent.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactEvent.as b/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactEvent.as
deleted file mode 100755
index 864bf62..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactEvent.as
+++ /dev/null
@@ -1,37 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- import flash.events.Event;
-
- public class ContactEvent extends Event
- {
- public static const CREATED:String = "contactCreated";
- public static const UPDATED:String = "contactUpdated";
- public static const DELETED:String = "contactDeleted";
-
- public var contact:Contact;
-
- public function ContactEvent(type:String, contact:Contact, bubbles:Boolean = true, cancelable:Boolean = false)
- {
- this.contact = contact;
- super(type, bubbles, cancelable);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactForm.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactForm.mxml b/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactForm.mxml
deleted file mode 100755
index c3b4482..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/src/ContactForm.mxml
+++ /dev/null
@@ -1,138 +0,0 @@
-<?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:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
- label="{contact.id>-1?contact.firstName+' '+contact.lastName:'New Contact'}">
-
- <fx:Metadata>
- [Event(name="contactCreated", type="ContactEvent")]
- [Event(name="contactUpdated", type="ContactEvent")]
- [Event(name="contactDeleted", type="ContactEvent")]
- </fx:Metadata>
-
- <fx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
- import mx.controls.Alert;
-
- [Bindable] public var contact:Contact;
-
- private function save():void
- {
- contact.firstName = firstName.text;
- contact.lastName = lastName.text;
- contact.email = email.text;
- contact.phone = phone.text;
- contact.address = address.text;
- contact.city = city.text;
- contact.state = state.text;
- contact.zip = zip.text;
- if (contact.id == -1)
- {
- ro.create(contact);
- }
- else
- {
- ro.update(contact);
- }
- }
-
- private function deleteItem():void
- {
- ro.remove(contact);
- }
-
- private function closeItem():void
- {
- parent.removeChild(this);
- }
-
- private function create_resultHandler(event:ResultEvent):void
- {
- contact.id = event.result.id;
- dispatchEvent(new ContactEvent(ContactEvent.CREATED, contact));
- }
-
- private function update_resultHandler(event:ResultEvent):void
- {
- dispatchEvent(new ContactEvent(ContactEvent.UPDATED, contact));
- }
-
- private function remove_resultHandler(event:ResultEvent):void
- {
- dispatchEvent(new ContactEvent(ContactEvent.DELETED, contact));
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <mx:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <mx:method name="create" result="create_resultHandler(event)"/>
- <mx:method name="update" result="update_resultHandler(event)"/>
- <mx:method name="remove" result="remove_resultHandler(event)"/>
- </mx:RemoteObject>
- </fx:Declarations>
-
- <mx:Form>
- <mx:FormItem label="Id">
- <mx:TextInput text="{contact.id}" enabled="false"/>
- </mx:FormItem>
- <mx:FormItem label="First Name">
- <mx:TextInput id="firstName" text="{contact.firstName}"/>
- </mx:FormItem>
- <mx:FormItem label="Last Name">
- <mx:TextInput id="lastName" text="{contact.lastName}"/>
- </mx:FormItem>
- <mx:FormItem label="Email">
- <mx:TextInput id="email" text="{contact.email}"/>
- </mx:FormItem>
- <mx:FormItem label="Phone">
- <mx:TextInput id="phone" text="{contact.phone}"/>
- </mx:FormItem>
- <mx:FormItem label="Address">
- <mx:TextInput id="address" text="{contact.address}"/>
- </mx:FormItem>
- <mx:FormItem label="City">
- <mx:TextInput id="city" text="{contact.city}"/>
- </mx:FormItem>
- <mx:FormItem label="State">
- <mx:TextInput id="state" text="{contact.state}"/>
- </mx:FormItem>
- <mx:FormItem label="Zip">
- <mx:TextInput id="zip" text="{contact.zip}"/>
- </mx:FormItem>
- </mx:Form>
-
- <s:HGroup left="8" bottom="8">
- <s:Button label="Close" click="closeItem()"/>
- <s:Button label="Save" click="save()"/>
- <s:Button label="Delete" click="deleteItem()"/>
- </s:HGroup>
-
-</mx:Canvas>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/src/insync06.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/src/insync06.mxml b/apps/samples-spring/WEB-INF/flex-src/insync06/src/insync06.mxml
deleted file mode 100755
index f7e1a95..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/src/insync06.mxml
+++ /dev/null
@@ -1,114 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*">
-
- <fx:Script>
- <![CDATA[
-
- import mx.collections.ArrayCollection;
- import mx.controls.Alert;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- [Bindable] private var contacts:ArrayCollection;
-
- private function resultHandler(event:ResultEvent):void
- {
- contacts = event.result as ArrayCollection
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
- public function openContact(contact:Contact):void
- {
- var children:Array = tn.getChildren();
- for (var i:int = 0; i<children.length; i++)
- {
- if (ContactForm(children[i]).contact.id == contact.id)
- {
- tn.selectedChild = children[i];
- return;
- }
- }
-
- var form:ContactForm = new ContactForm();
- form.addEventListener(ContactEvent.CREATED, contactCreatedHandler);
- form.addEventListener(ContactEvent.UPDATED, contactUpdatedHandler);
- form.addEventListener(ContactEvent.DELETED, contactDeletedHandler);
- tn.addChild(form);
- form.contact = contact;
- tn.selectedChild = form;
- }
-
- private function search():void
- {
- ro.findByName(searchStr.text);
- }
-
- private function contactCreatedHandler(event:ContactEvent):void
- {
- search();
- }
-
- private function contactUpdatedHandler(event:ContactEvent):void
- {
- search();
- }
-
- private function contactDeletedHandler(event:ContactEvent):void
- {
- tn.removeChild(event.target as ContactForm);
- search();
- }
-
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <s:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <s:method name="findByName" result="resultHandler(event)"/>
- </s:RemoteObject>
- </fx:Declarations>
-
- <s:controlBarContent>
- <s:TextInput id="searchStr"/>
- <s:Button label="Search" click="search()"/>
- <mx:Button label="New Contact" click="openContact(new Contact())"/>
- </s:controlBarContent>
-
- <mx:HDividedBox top="8" left="8" right="8" bottom="8">
- <mx:DataGrid id="dg" dataProvider="{contacts}" width="30%" height="100%"
- doubleClickEnabled="{dg.selectedItem != null}"
- doubleClick="openContact(dg.selectedItem as Contact)">
- <mx:columns>
- <mx:DataGridColumn dataField="firstName" headerText="First Name"/>
- <mx:DataGridColumn dataField="lastName" headerText="Last Name"/>
- </mx:columns>
- </mx:DataGrid>
- <mx:TabNavigator id="tn" width="70%" height="100%"/>
- </mx:HDividedBox>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/simplepush/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/simplepush/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/simplepush/.actionScriptProperties
deleted file mode 100755
index d2d2c37..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/simplepush/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="simplepush.mxml" projectUUID="8054d1ac-d0ae-40e5-b6a0-30b8baec27da" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="simplepush.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/simplepush/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/simplepush/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/simplepush/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/simplepush/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/simplepush/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/simplepush/.project b/apps/samples-spring/WEB-INF/flex-src/simplepush/.project
deleted file mode 100755
index 1dbd388..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/simplepush/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>simplepush</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/simplepush/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/simplepush/build.xml b/apps/samples-spring/WEB-INF/flex-src/simplepush/build.xml
deleted file mode 100755
index b4e5dc4..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/simplepush/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="simplepush" />
- <property name="application.file" value="simplepush" />
- <property name="application.bin.dir" value="${samples-spring.war}/simplepush" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/simplepush/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
[42/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync02/src/insync02.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync02/src/insync02.mxml b/apps/samples-spring/WEB-INF/flex-src/insync02/src/insync02.mxml
deleted file mode 100755
index 7ad34d0..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync02/src/insync02.mxml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
-
- <fx:Script>
- <![CDATA[
-
- import mx.rpc.events.ResultEvent;
- import mx.rpc.events.FaultEvent;
- import mx.controls.Alert;
- import mx.collections.ArrayCollection;
-
- [Bindable] private var contacts:ArrayCollection;
-
- private function resultHandler(event:ResultEvent):void
- {
- contacts = event.result as ArrayCollection
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <s:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <s:method name="findByName" result="resultHandler(event)"/>
- </s:RemoteObject>
- </fx:Declarations>
-
- <s:controlBarContent>
- <s:TextInput id="searchStr"/>
- <s:Button label="Search" click="ro.findByName(searchStr.text)"/>
- </s:controlBarContent>
-
- <mx:DataGrid id="dg" dataProvider="{contacts}" top="8" left="8" right="8" bottom="8"/>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/insync03/.actionScriptProperties
deleted file mode 100755
index 11b2763..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="insync03.mxml" projectUUID="b050a102-5b00-4469-ab6f-b791693123f9" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="insync03.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/insync03/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/.project b/apps/samples-spring/WEB-INF/flex-src/insync03/.project
deleted file mode 100755
index 815b7a5..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>insync03</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/build.xml b/apps/samples-spring/WEB-INF/flex-src/insync03/build.xml
deleted file mode 100755
index 80c5e37..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="insync03" />
- <property name="application.file" value="insync03" />
- <property name="application.bin.dir" value="${samples-spring.war}/insync03" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync03/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
[34/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
deleted file mode 100755
index d6245f7..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
+++ /dev/null
@@ -1,55 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package {
-
- import mx.controls.Label;
- import flash.display.Graphics;
-
- public class BackgroundColorRenderer extends Label {
-
- public static var symbol:String;
-
- override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
- {
- super.updateDisplayList(unscaledWidth, unscaledHeight);
-
- var g:Graphics = graphics;
-
- g.clear();
-
- if (data && data.date && data.symbol == symbol)
- {
- if( data.change && data.change >= 0 )
- {
- g.beginFill(0x009900, 0.5);
- g.drawRect(0, 0, unscaledWidth, unscaledHeight);
- g.endFill();
- }
- else
- {
- g.beginFill(0xFF0000, 0.5);
- g.drawRect(0, 0, unscaledWidth, unscaledHeight);
- g.endFill();
- }
- }
-
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
deleted file mode 100755
index 93a6553..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
+++ /dev/null
@@ -1,40 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package {
-
- import mx.controls.Label;
- import mx.controls.dataGridClasses.*;
-
- public class ColorRenderer extends Label {
-
- override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
- {
- super.updateDisplayList(unscaledWidth, unscaledHeight);
- if (data && listData && data[DataGridListData(listData).dataField] < 0)
- {
- setStyle("color", 0xFF0000);
- }
- else
- {
- setStyle("color", 0x009900);
- }
- }
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/org/springframework/flex/samples/marketfeed/Stock.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/org/springframework/flex/samples/marketfeed/Stock.as b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/org/springframework/flex/samples/marketfeed/Stock.as
deleted file mode 100755
index 984bdf0..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/org/springframework/flex/samples/marketfeed/Stock.as
+++ /dev/null
@@ -1,35 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.springframework.flex.samples.marketfeed
-{
- [RemoteClass(alias="org.springframework.flex.samples.marketfeed.Stock")]
- [Bindable]
- public class Stock
- {
- public var symbol:String;
- public var name:String;
- public var low:Number;
- public var high:Number;
- public var open:Number;
- public var last:Number;
- public var change:Number = 0;
- public var date:Date;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml b/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
deleted file mode 100755
index 0e9c849..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
+++ /dev/null
@@ -1,147 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx"
- applicationComplete="initApp()">
-
- <fx:Script>
- <![CDATA[
- import mx.collections.ArrayCollection;
- import mx.controls.Alert;
- import mx.messaging.MultiTopicConsumer;
- import mx.messaging.events.MessageEvent;
-
- import org.springframework.flex.samples.marketfeed.Stock;
-
- [Bindable] private var items:ArrayCollection;
-
- private var stockMap:Object;
-
- private function initApp():void
- {
- stockMap = new Object();
- items = new ArrayCollection();
- addSymbol("IBM");
- addSymbol("JBLU");
- addSymbol("ADBE");
- addSymbol("GE");
- addSymbol("C");
- consumer.subscribe();
- }
-
- private function deleteSymbol():void
- {
- var symbol:String = dg.selectedItem.symbol;
- consumer.removeSubscription(symbol);
- items.removeItemAt(dg.selectedIndex);
- delete stockMap[symbol];
- }
-
- private function addSymbol(symbol:String):void
- {
- if (symbol == null || symbol == "")
- {
- Alert.show("Cannot add an empty symbol");
- return;
- }
-
- symbol = symbol.toUpperCase();
- if (stockMap.hasOwnProperty(symbol))
- {
- Alert.show("Symbol '" + symbol + "' is already in the list");
- return;
- }
-
- var stock:Stock = new Stock();
- stock.symbol = symbol;
- stockMap[symbol] = stock;
- items.addItem(stock);
- consumer.addSubscription(symbol);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- var changedStock:Stock = event.message.body as Stock;
- var stock:Stock = stockMap[changedStock.symbol];
-
- BackgroundColorRenderer.symbol = changedStock.symbol;
-
- if (stock)
- {
- stock.open = changedStock.open;
- stock.change = changedStock.change;
- stock.last = changedStock.last;
- stock.high = changedStock.high;
- stock.low = changedStock.low;
- stock.date = changedStock.date;
- }
- }
-
- private function formatNumber(item:Object, column:DataGridColumn):String
- {
- return nf.format(item[column.dataField]);
- }
-
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
-
- <mx:ChannelSet id="cs">
- <mx:StreamingAMFChannel uri="/samples-spring/messagebroker/streamingamf"/>
- <mx:AMFChannel uri="/samples-spring/messagebroker/amflongpolling"/>
- <mx:AMFChannel uri="/samples-spring/messagebroker/amfpolling"/>
- </mx:ChannelSet>
-
- <mx:MultiTopicConsumer id="consumer" destination="market-feed" channelSet="{cs}" message="messageHandler(event)"/>
- <mx:NumberFormatter id="nf" precision="2"/>
-
- </fx:Declarations>
-
- <s:Panel title="Watch List" top="20" left="20" bottom="20" right="20">
- <mx:DataGrid id="dg" dataProvider="{items}" width="100%" height="100%" borderVisible="false">
- <mx:columns>
- <mx:DataGridColumn headerText="Symbol" dataField="symbol" width="80"/>
- <mx:DataGridColumn headerText="Open" dataField="open" labelFunction="formatNumber" textAlign="right" width="60"/>
- <mx:DataGridColumn headerText="Last" dataField="last" itemRenderer="BackgroundColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
- <mx:DataGridColumn headerText="Change" dataField="change" itemRenderer="ColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
- <mx:DataGridColumn headerText="High" dataField="high" labelFunction="formatNumber" textAlign="right" width="60"/>
- <mx:DataGridColumn headerText="Low" dataField="low" labelFunction="formatNumber" textAlign="right" width="60"/>
- </mx:columns>
- </mx:DataGrid>
- <s:controlBarLayout>
- <s:VerticalLayout paddingTop="8" paddingLeft="8" paddingBottom="8" paddingRight="8"/>
- </s:controlBarLayout>
- <s:controlBarContent>
- <s:RichText width="100%">
- <s:text>The stocks available in the sample feed are: XOM, WMT, GM, CVX, COP, GE, C, AIG, GOOG, ADBE, JBLU, COKE, GENZ, YHOO, IBM, BA, SAP, MOT, VZ, MCD.</s:text>
- </s:RichText>
- <s:HGroup width="100%">
- <s:TextInput id="symbol" enter="addSymbol(symbol.text);symbol.text='';" width="50"/>
- <s:Button label="Add Symbol" click="addSymbol(symbol.text);symbol.text='';"/>
- <mx:Spacer width="100%"/>
- <s:Button label="Delete Symbol" click="deleteSymbol()" enabled="{dg.selectedItem}"/>
- </s:HGroup>
- </s:controlBarContent>
- </s:Panel>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex/messaging-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex/messaging-config.xml b/apps/samples-spring/WEB-INF/flex/messaging-config.xml
deleted file mode 100755
index 34f4d3f..0000000
--- a/apps/samples-spring/WEB-INF/flex/messaging-config.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?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.
-
--->
-<service id="message-service"
- class="flex.messaging.services.MessageService">
-
- <adapters>
- <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
- <!-- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/> -->
- </adapters>
-
- <default-channels>
- <channel ref="my-polling-amf"/>
- </default-channels>
-
-</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex/proxy-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex/proxy-config.xml b/apps/samples-spring/WEB-INF/flex/proxy-config.xml
deleted file mode 100755
index 9335e6c..0000000
--- a/apps/samples-spring/WEB-INF/flex/proxy-config.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?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.
-
--->
-<service id="proxy-service"
- class="flex.messaging.services.HTTPProxyService">
-
- <properties>
- <connection-manager>
- <max-total-connections>100</max-total-connections>
- <default-max-connections-per-host>2</default-max-connections-per-host>
- </connection-manager>
- <allow-lax-ssl>true</allow-lax-ssl>
- </properties>
-
- <adapters>
- <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
- <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
- </adapters>
-
- <default-channels>
- <channel ref="my-amf"/>
- </default-channels>
-
- <destination id="DefaultHTTP">
- </destination>
-
-</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex/remoting-config.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex/remoting-config.xml b/apps/samples-spring/WEB-INF/flex/remoting-config.xml
deleted file mode 100755
index 0c55cf8..0000000
--- a/apps/samples-spring/WEB-INF/flex/remoting-config.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?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.
-
--->
-<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>
-
-</service>
[51/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
- Moved old stuff to an "attic" directory
- Changed the directory structure to comply to a default maven directory structure
Project: http://git-wip-us.apache.org/repos/asf/flex-blazeds/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-blazeds/commit/75229759
Tree: http://git-wip-us.apache.org/repos/asf/flex-blazeds/tree/75229759
Diff: http://git-wip-us.apache.org/repos/asf/flex-blazeds/diff/75229759
Branch: refs/heads/4.8.0
Commit: 75229759328dc6e8744d7ef7ddaa5327b9f031f1
Parents: 95f7f47
Author: Christofer Dutz <ch...@codecentric.de>
Authored: Tue Aug 4 11:50:36 2015 +0200
Committer: Christofer Dutz <ch...@codecentric.de>
Committed: Tue Aug 4 11:51:12 2015 +0200
----------------------------------------------------------------------
.gitignore | 208 -
ApproveBlazeDS.xml | 385 -
README | 423 +-
RELEASE_NOTES | 21 +-
.../WEB-INF/classes/commons-logging.properties | 19 -
apps/blazeds-spring/WEB-INF/flex-servlet.xml | 34 -
.../WEB-INF/flex/messaging-config.xml | 32 -
.../WEB-INF/flex/proxy-config.xml | 43 -
.../WEB-INF/flex/remoting-config.xml | 31 -
.../WEB-INF/flex/services-config.xml | 117 -
.../WEB-INF/spring/app-config.xml | 29 -
.../WEB-INF/spring/infrastructure-config.xml | 25 -
.../WEB-INF/spring/security-config.xml | 41 -
apps/blazeds-spring/WEB-INF/web.xml | 102 -
apps/blazeds-spring/build.xml | 97 -
apps/blazeds-spring/index.htm | 50 -
.../WEB-INF/classes/commons-logging.properties | 19 -
apps/blazeds/WEB-INF/flex/messaging-config.xml | 32 -
apps/blazeds/WEB-INF/flex/proxy-config.xml | 43 -
apps/blazeds/WEB-INF/flex/remoting-config.xml | 31 -
apps/blazeds/WEB-INF/flex/services-config.xml | 117 -
apps/blazeds/WEB-INF/web.xml | 82 -
apps/blazeds/build.xml | 99 -
apps/blazeds/index.htm | 50 -
apps/ds-console/ConsoleResultWindow.mxml | 48 -
.../ds-console/WEB-INF/flex/services-config.xml | 116 -
apps/ds-console/WEB-INF/install-web.xml | 48 -
apps/ds-console/WEB-INF/web.xml | 57 -
apps/ds-console/build.xml | 174 -
apps/ds-console/console.mxml | 105 -
apps/ds-console/console/ConsoleListener.as | 43 -
apps/ds-console/console/ConsoleManager.as | 1004 -
.../console/ConsoleTreeDataDescriptor.as | 70 -
.../console/containers/AdvancedPanel.as | 169 -
.../containers/AdvancedPanelDisplay.mxml | 69 -
.../console/containers/DefaultPanel.as | 41 -
.../console/containers/DefaultPanelDisplay.mxml | 29 -
.../console/containers/DestinationManager.as | 238 -
.../containers/DestinationManagerDisplay.mxml | 61 -
.../console/containers/EndpointManager.as | 149 -
.../containers/EndpointManagerDisplay.mxml | 56 -
.../ds-console/console/containers/LogManager.as | 189 -
.../console/containers/LogManagerDisplay.mxml | 54 -
apps/ds-console/console/containers/Operation.as | 169 -
.../console/containers/OperationSet.as | 149 -
.../containers/PollableAttributeChart.as | 42 -
.../console/containers/ServerManager.as | 138 -
.../containers/ServerManagerDisplay.mxml | 54 -
.../console/containers/UpdateListener.as | 109 -
.../console/containers/UpdateManager.as | 28 -
.../console/data/Bindable3DHashMap.as | 110 -
.../events/ManagementOperationInvokeEvent.as | 99 -
apps/samples-spring/README.txt | 5 -
.../WEB-INF/classes/commons-logging.properties | 19 -
apps/samples-spring/WEB-INF/flex-servlet.xml | 70 -
.../flex-src/chat/.actionScriptProperties | 38 -
.../WEB-INF/flex-src/chat/.flexProperties | 20 -
.../WEB-INF/flex-src/chat/.project | 36 -
.../WEB-INF/flex-src/chat/build.xml | 76 -
.../chat/html-template/history/history.css | 22 -
.../chat/html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../chat/html-template/index.template.html | 121 -
.../flex-src/chat/html-template/swfobject.js | 793 -
.../WEB-INF/flex-src/chat/src/chat.mxml | 86 -
.../collaboration/.actionScriptProperties | 38 -
.../flex-src/collaboration/.flexProperties | 20 -
.../WEB-INF/flex-src/collaboration/.project | 36 -
.../WEB-INF/flex-src/collaboration/build.xml | 76 -
.../html-template/history/history.css | 22 -
.../html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../html-template/index.template.html | 121 -
.../collaboration/html-template/swfobject.js | 793 -
.../flex-src/collaboration/src/Customer.as | 34 -
.../collaboration/src/collaboration.mxml | 147 -
.../flex-src/companymgr/.actionScriptProperties | 38 -
.../WEB-INF/flex-src/companymgr/.flexProperties | 20 -
.../WEB-INF/flex-src/companymgr/.project | 36 -
.../WEB-INF/flex-src/companymgr/build.xml | 76 -
.../html-template/history/history.css | 22 -
.../companymgr/html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../html-template/index.template.html | 121 -
.../companymgr/html-template/swfobject.js | 793 -
.../flex-src/companymgr/src/BindableComboBox.as | 73 -
.../WEB-INF/flex-src/companymgr/src/Company.as | 34 -
.../flex-src/companymgr/src/CompanyEvent.as | 37 -
.../flex-src/companymgr/src/CompanyForm.mxml | 156 -
.../WEB-INF/flex-src/companymgr/src/Industry.as | 28 -
.../flex-src/companymgr/src/companymgr.mxml | 130 -
.../feedstarter/.actionScriptProperties | 38 -
.../flex-src/feedstarter/.flexProperties | 20 -
.../WEB-INF/flex-src/feedstarter/.project | 36 -
.../WEB-INF/flex-src/feedstarter/build.xml | 76 -
.../html-template/history/history.css | 22 -
.../html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../html-template/index.template.html | 121 -
.../feedstarter/html-template/swfobject.js | 793 -
.../flex-src/feedstarter/src/feedstarter.mxml | 53 -
.../flex-src/insync01/.actionScriptProperties | 38 -
.../WEB-INF/flex-src/insync01/.flexProperties | 20 -
.../WEB-INF/flex-src/insync01/.project | 36 -
.../WEB-INF/flex-src/insync01/build.xml | 76 -
.../insync01/html-template/history/history.css | 22 -
.../insync01/html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../insync01/html-template/index.template.html | 121 -
.../insync01/html-template/swfobject.js | 793 -
.../WEB-INF/flex-src/insync01/src/insync01.mxml | 35 -
.../flex-src/insync02/.actionScriptProperties | 38 -
.../WEB-INF/flex-src/insync02/.flexProperties | 20 -
.../WEB-INF/flex-src/insync02/.project | 36 -
.../WEB-INF/flex-src/insync02/build.xml | 76 -
.../insync02/html-template/history/history.css | 22 -
.../insync02/html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../insync02/html-template/index.template.html | 121 -
.../insync02/html-template/swfobject.js | 793 -
.../WEB-INF/flex-src/insync02/src/insync02.mxml | 60 -
.../flex-src/insync03/.actionScriptProperties | 38 -
.../WEB-INF/flex-src/insync03/.flexProperties | 20 -
.../WEB-INF/flex-src/insync03/.project | 36 -
.../WEB-INF/flex-src/insync03/build.xml | 76 -
.../insync03/html-template/history/history.css | 22 -
.../insync03/html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../insync03/html-template/index.template.html | 121 -
.../insync03/html-template/swfobject.js | 793 -
.../WEB-INF/flex-src/insync03/src/Contact.as | 35 -
.../flex-src/insync03/src/ContactForm.mxml | 112 -
.../WEB-INF/flex-src/insync03/src/insync03.mxml | 71 -
.../flex-src/insync04/.actionScriptProperties | 38 -
.../WEB-INF/flex-src/insync04/.flexProperties | 20 -
.../WEB-INF/flex-src/insync04/.project | 36 -
.../WEB-INF/flex-src/insync04/build.xml | 76 -
.../insync04/html-template/history/history.css | 22 -
.../insync04/html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../insync04/html-template/index.template.html | 121 -
.../insync04/html-template/swfobject.js | 793 -
.../WEB-INF/flex-src/insync04/src/Contact.as | 35 -
.../flex-src/insync04/src/ContactForm.mxml | 120 -
.../WEB-INF/flex-src/insync04/src/insync04.mxml | 88 -
.../flex-src/insync05/.actionScriptProperties | 38 -
.../WEB-INF/flex-src/insync05/.flexProperties | 20 -
.../WEB-INF/flex-src/insync05/.project | 36 -
.../WEB-INF/flex-src/insync05/build.xml | 76 -
.../insync05/html-template/history/history.css | 22 -
.../insync05/html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../insync05/html-template/index.template.html | 121 -
.../insync05/html-template/swfobject.js | 793 -
.../WEB-INF/flex-src/insync05/src/Contact.as | 35 -
.../flex-src/insync05/src/ContactForm.mxml | 133 -
.../WEB-INF/flex-src/insync05/src/insync05.mxml | 89 -
.../flex-src/insync06/.actionScriptProperties | 38 -
.../WEB-INF/flex-src/insync06/.flexProperties | 20 -
.../WEB-INF/flex-src/insync06/.project | 36 -
.../WEB-INF/flex-src/insync06/build.xml | 76 -
.../insync06/html-template/history/history.css | 22 -
.../insync06/html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../insync06/html-template/index.template.html | 121 -
.../insync06/html-template/swfobject.js | 793 -
.../WEB-INF/flex-src/insync06/src/Contact.as | 35 -
.../flex-src/insync06/src/ContactEvent.as | 37 -
.../flex-src/insync06/src/ContactForm.mxml | 138 -
.../WEB-INF/flex-src/insync06/src/insync06.mxml | 114 -
.../flex-src/simplepush/.actionScriptProperties | 38 -
.../WEB-INF/flex-src/simplepush/.flexProperties | 20 -
.../WEB-INF/flex-src/simplepush/.project | 36 -
.../WEB-INF/flex-src/simplepush/build.xml | 76 -
.../html-template/history/history.css | 22 -
.../simplepush/html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../html-template/index.template.html | 121 -
.../simplepush/html-template/swfobject.js | 793 -
.../flex-src/simplepush/src/simplepush.mxml | 53 -
.../spring-blazeds-101/.actionScriptProperties | 38 -
.../flex-src/spring-blazeds-101/.flexProperties | 20 -
.../flex-src/spring-blazeds-101/.project | 36 -
.../flex-src/spring-blazeds-101/build.xml | 76 -
.../html-template/history/history.css | 22 -
.../html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../html-template/index.template.html | 121 -
.../html-template/swfobject.js | 793 -
.../flex-src/spring-blazeds-101/src/Main.mxml | 39 -
.../.actionScriptProperties | 38 -
.../spring-blazeds-security-101/.flexProperties | 20 -
.../spring-blazeds-security-101/.project | 36 -
.../spring-blazeds-security-101/build.xml | 76 -
.../html-template/history/history.css | 22 -
.../html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../html-template/index.template.html | 121 -
.../html-template/swfobject.js | 793 -
.../spring-blazeds-security-101/src/Main.mxml | 87 -
.../traderdesktop/.actionScriptProperties | 38 -
.../flex-src/traderdesktop/.flexProperties | 20 -
.../WEB-INF/flex-src/traderdesktop/.project | 36 -
.../WEB-INF/flex-src/traderdesktop/build.xml | 76 -
.../html-template/history/history.css | 22 -
.../html-template/history/history.js | 722 -
.../html-template/history/historyFrame.html | 45 -
.../html-template/index.template.html | 121 -
.../traderdesktop/html-template/swfobject.js | 793 -
.../src/BackgroundColorRenderer.as | 55 -
.../flex-src/traderdesktop/src/ColorRenderer.as | 40 -
.../flex/samples/marketfeed/Stock.as | 35 -
.../traderdesktop/src/traderdesktop.mxml | 147 -
.../WEB-INF/flex/messaging-config.xml | 32 -
.../WEB-INF/flex/proxy-config.xml | 43 -
.../WEB-INF/flex/remoting-config.xml | 31 -
.../WEB-INF/flex/services-config.xml | 122 -
.../WEB-INF/spring/app-config.xml | 58 -
.../WEB-INF/spring/infrastructure-config.xml | 41 -
.../WEB-INF/spring/security-config.xml | 43 -
.../WEB-INF/src/spring-samples/.classpath | 68 -
.../WEB-INF/src/spring-samples/.project | 35 -
.../flex/samples/company/Company.java | 111 -
.../flex/samples/company/CompanyDAO.java | 115 -
.../flex/samples/company/ICompanyDAO.java | 23 -
.../flex/samples/contact/Contact.java | 119 -
.../flex/samples/contact/ContactDAO.java | 107 -
.../flex/samples/contact/IContactDAO.java | 23 -
.../flex/samples/dao/IGenericDAO.java | 35 -
.../flex/samples/industry/IIndustryDAO.java | 23 -
.../flex/samples/industry/Industry.java | 49 -
.../flex/samples/industry/IndustryDAO.java | 89 -
.../flex/samples/integration/Counter.java | 50 -
.../flex/samples/marketfeed/MarketFeed.java | 196 -
.../flex/samples/marketfeed/Stock.java | 106 -
.../flex/samples/product/IProductDAO.java | 23 -
.../flex/samples/product/Product.java | 109 -
.../flex/samples/product/ProductDAO.java | 160 -
.../flex/samples/secured/Security3Helper.java | 29 -
.../flex/samples/simplefeed/SimpleFeed.java | 94 -
.../flex/samples/util/DatabaseInitializer.java | 300 -
apps/samples-spring/WEB-INF/web.xml | 87 -
apps/samples-spring/build.xml | 168 -
apps/samples-spring/index.html | 330 -
apps/samples-spring/login.jsp | 64 -
apps/samples-spring/main.css | 138 -
apps/samples-spring/stocklist.xml | 141 -
apps/samples/README.txt | 5 -
.../WEB-INF/flex-src/dashboard/build.xml | 85 -
.../flex-src/dashboard/src/RegionBreakdown.mxml | 176 -
.../flex-src/dashboard/src/RegionDetail.mxml | 175 -
.../flex-src/dashboard/src/RevenueTimeline.mxml | 134 -
.../WEB-INF/flex-src/dashboard/src/SortUtils.as | 62 -
.../flex-src/dashboard/src/dashboard.mxml | 209 -
.../flex-src/dashboard/src/icon_chart.png | Bin 28044 -> 0 bytes
.../flex-src/dashboard/src/icon_grid.png | Bin 28182 -> 0 bytes
.../WEB-INF/flex-src/dashboard/src/main.css | 35 -
.../WEB-INF/flex-src/dashboard/src/results.xml | 213 -
.../WEB-INF/flex-src/inventory/build.xml | 82 -
.../WEB-INF/flex-src/inventory/src/Product.as | 44 -
.../flex-src/inventory/src/ProductForm.mxml | 106 -
.../flex-src/inventory/src/SearchPopup.mxml | 96 -
.../flex-src/inventory/src/assets/Thumbs.db | Bin 11264 -> 0 bytes
.../flex-src/inventory/src/assets/app_skin.png | Bin 63724 -> 0 bytes
.../flex-src/inventory/src/assets/blank.png | Bin 46171 -> 0 bytes
.../inventory/src/assets/button_over_skin.png | Bin 57493 -> 0 bytes
.../inventory/src/assets/button_skin.png | Bin 52718 -> 0 bytes
.../inventory/src/assets/icon_close.png | Bin 59628 -> 0 bytes
.../flex-src/inventory/src/assets/icon_plus.png | Bin 58539 -> 0 bytes
.../inventory/src/assets/icon_search.png | Bin 49838 -> 0 bytes
.../flex-src/inventory/src/assets/search.png | Bin 53407 -> 0 bytes
.../inventory/src/assets/top_separator.png | Bin 47474 -> 0 bytes
.../flex-src/inventory/src/inventory.mxml | 116 -
.../WEB-INF/flex-src/inventory/src/styles.css | 74 -
.../flex-src/runtimeconfig-messaging/build.xml | 77 -
.../runtimeconfig-messaging/src/ChatPanel.mxml | 87 -
.../runtimeconfig-messaging/src/main.mxml | 54 -
.../flex-src/runtimeconfig-remoting/build.xml | 77 -
.../runtimeconfig-remoting/src/main.mxml | 64 -
.../WEB-INF/flex-src/testdrive-101/build.xml | 77 -
.../flex-src/testdrive-101/src/ProductView.mxml | 35 -
.../flex-src/testdrive-101/src/Thumb.mxml | 29 -
.../flex-src/testdrive-101/src/main.mxml | 52 -
.../flex-src/testdrive-101/src/testdrive.css | 35 -
.../WEB-INF/flex-src/testdrive-chat/build.xml | 77 -
.../flex-src/testdrive-chat/src/main.mxml | 56 -
.../flex-src/testdrive-datapush/build.xml | 81 -
.../flex-src/testdrive-datapush/src/main.mxml | 42 -
.../testdrive-datapush/src/startfeed.jsp | 26 -
.../testdrive-datapush/src/stopfeed.jsp | 26 -
.../flex-src/testdrive-httpservice/build.xml | 81 -
.../testdrive-httpservice/src/catalog.jsp | 42 -
.../testdrive-httpservice/src/main.mxml | 28 -
.../flex-src/testdrive-remoteobject/build.xml | 77 -
.../testdrive-remoteobject/src/main.mxml | 28 -
.../WEB-INF/flex-src/testdrive-update/build.xml | 77 -
.../flex-src/testdrive-update/src/Product.as | 44 -
.../testdrive-update/src/ProductForm.mxml | 60 -
.../flex-src/testdrive-update/src/main.mxml | 31 -
.../flex-src/testdrive-webservice/build.xml | 81 -
.../flex-src/testdrive-webservice/src/main.mxml | 33 -
.../WEB-INF/flex-src/traderdesktop/build.xml | 81 -
.../src/BackgroundColorRenderer.as | 55 -
.../flex-src/traderdesktop/src/ColorRenderer.as | 40 -
.../WEB-INF/flex-src/traderdesktop/src/main.css | 30 -
.../src/samples/portfolio/Stock.as | 35 -
.../flex-src/traderdesktop/src/startfeed.jsp | 26 -
.../flex-src/traderdesktop/src/stopfeed.jsp | 26 -
.../traderdesktop/src/traderdesktop.mxml | 241 -
apps/samples/WEB-INF/flex/messaging-config.xml | 58 -
apps/samples/WEB-INF/flex/proxy-config.xml | 60 -
apps/samples/WEB-INF/flex/remoting-config.xml | 56 -
apps/samples/WEB-INF/flex/services-config.xml | 146 -
.../src/flex/samples/ConnectionHelper.java | 59 -
.../WEB-INF/src/flex/samples/DAOException.java | 38 -
.../src/flex/samples/DatabaseCheckService.java | 65 -
.../flex/samples/crm/ConcurrencyException.java | 37 -
.../src/flex/samples/crm/DAOException.java | 38 -
.../src/flex/samples/crm/company/Company.java | 105 -
.../flex/samples/crm/company/CompanyDAO.java | 228 -
.../src/flex/samples/crm/employee/Employee.java | 106 -
.../flex/samples/crm/employee/EmployeeDAO.java | 300 -
.../src/flex/samples/dcd/product/Product.java | 89 -
.../samples/dcd/product/ProductService.java | 197 -
.../WEB-INF/src/flex/samples/feed/Feed.java | 85 -
.../src/flex/samples/marketdata/Feed.java | 121 -
.../src/flex/samples/marketdata/Portfolio.java | 75 -
.../src/flex/samples/marketdata/Stock.java | 84 -
.../src/flex/samples/marketdata/portfolio.xml | 141 -
.../src/flex/samples/product/Product.java | 89 -
.../flex/samples/product/ProductService.java | 191 -
.../samples/qos/CustomDelayQueueProcessor.java | 121 -
.../samples/qos/FlexClientConfigService.java | 74 -
.../samples/runtimeconfig/ChatRoomService.java | 81 -
.../EmployeeRuntimeRemotingDestination.java | 54 -
apps/samples/WEB-INF/web.xml | 63 -
apps/samples/build.xml | 168 -
apps/samples/fb-project-setup.htm | 67 -
apps/samples/images/blazeds.png | Bin 8104 -> 0 bytes
apps/samples/index.htm | 101 -
apps/samples/main.css | 138 -
apps/samples/testdrive.htm | 254 -
apps/team/WEB-INF/activemq.xml | 36 -
apps/team/WEB-INF/flex/global.css | 17 -
apps/team/WEB-INF/flex/messaging-config.xml | 292 -
apps/team/WEB-INF/flex/proxy-config.xml | 47 -
apps/team/WEB-INF/flex/remoting-config.xml | 96 -
apps/team/WEB-INF/flex/services-config.xml | 414 -
.../add_your_as_and_swc_files_here.txt | 0
.../HTTPProxyBootstrapService.java | 254 -
.../MessagingBootstrapService.java | 330 -
.../RemotingBootstrapService.java | 220 -
.../CustomActionscriptAdapter.java | 96 -
.../messaging/serverpush/ServerPushService.java | 130 -
.../features/remoting/AMFConnectionTest.java | 76 -
.../src/features/remoting/EchoService.java | 130 -
.../externalizable/ExternalizableClass.java | 43 -
.../runtimeconfig/RuntimeConfigurator.java | 110 -
.../ClassLoggingDeserializationValidator.java | 127 -
.../TestDeserializationValidator.java | 58 -
apps/team/build.xml | 194 -
apps/team/features/README.txt | 2 -
apps/team/features/ajax/README.txt | 3 -
.../features/ajax/messaging/TextMessage.html | 88 -
.../features/ajax/messaging/TextMessage.mxml | 95 -
.../cluster/messaging_AMF_Poll_Cluster.mxml | 94 -
.../cluster/messaging_HTTP_Poll_Cluster.mxml | 94 -
.../messaging_SecureAMF_Poll_Cluster.mxml | 95 -
.../messaging_SecureHTTP_Poll_Cluster.mxml | 95 -
.../customadapter/messaging_CustomAdapter.mxml | 101 -
.../features/messaging/discardedMessaging.mxml | 119 -
.../jms/messaging_AMF_LongPoll_JMS_Topic.mxml | 91 -
.../jms/messaging_AMF_Poll_JMS_Queue.mxml | 91 -
.../jms/messaging_AMF_Poll_JMS_Topic.mxml | 91 -
.../jms/messaging_HTTP_Poll_JMS_Queue.mxml | 91 -
.../jms/messaging_HTTP_Poll_JMS_Topic.mxml | 91 -
apps/team/features/messaging/messaging_AMF.mxml | 121 -
.../messaging/messaging_AMF_LongPoll.mxml | 91 -
.../messaging/messaging_AMF_Piggyback.mxml | 104 -
.../features/messaging/messaging_AMF_Poll.mxml | 91 -
.../messaging/messaging_AMF_Stream.mxml | 91 -
.../team/features/messaging/messaging_HTTP.mxml | 117 -
.../messaging/messaging_HTTP_LongPoll.mxml | 91 -
.../messaging/messaging_HTTP_Piggyback.mxml | 104 -
.../features/messaging/messaging_HTTP_Poll.mxml | 91 -
.../messaging/messaging_HTTP_Stream.mxml | 91 -
...aging_AMFLongPoll_and_SecureAMFLongPoll.mxml | 160 -
...ssaging_SecureAMFLongPoll_and_AMFStream.mxml | 160 -
.../messaging_two_AMFLongPoll_Endpoints.mxml | 160 -
.../messaging/secure/messaging_SecureAMF.mxml | 120 -
.../messaging/secure/messaging_SecureHTTP.mxml | 120 -
.../messaging_AMF_Poll_JMS_Queue_Selector.mxml | 100 -
.../selector/messaging_AMF_Poll_Selector.mxml | 100 -
.../selector/messaging_HTTP_Poll_Selector.mxml | 102 -
...ng_AMF_LongPoll_SendSubscribeConstraint.mxml | 104 -
...saging_AMF_Poll_SendSubscribeConstraint.mxml | 104 -
...ging_AMF_Stream_SendSubscribeConstraint.mxml | 104 -
...aging_HTTP_Poll_SendSubscribeConstraint.mxml | 104 -
.../subtopic/messaging_AMF_Poll_Subtopic.mxml | 103 -
.../messaging_AMF_Stream_MultiSubtopic.mxml | 131 -
.../subtopic/messaging_HTTP_Poll_Subtopic.mxml | 103 -
.../throttle/messaging_ThrottleInbound.mxml | 155 -
.../throttle/messaging_ThrottleOutbound.mxml | 228 -
.../externalizable/ExternalizableClass.as | 56 -
.../externalizable/remoting_Externalizable.mxml | 80 -
.../features/remoting/filteredAckRemoting.mxml | 77 -
.../remoting/filteredFaultRemoting.mxml | 77 -
apps/team/features/remoting/remoting_AMF.mxml | 77 -
apps/team/features/remoting/remoting_AMFX.mxml | 77 -
.../remoting/remoting_AMF_Dictionary.mxml | 104 -
.../features/remoting/remoting_AMF_Legacy.mxml | 78 -
.../remoting/remoting_AMF_ReadOnly.mxml | 69 -
.../features/remoting/remoting_AMF_Vector.mxml | 122 -
.../runtimeconfig_MessageDestination.mxml | 150 -
...runtimeconfig_MessageDestinationWithJMS.mxml | 131 -
.../features/security-constraints/README.txt | 6 -
.../securityConstraint_Basic.mxml | 71 -
.../securityConstraint_Custom.mxml | 140 -
.../securityConstraint_Legacy.mxml | 104 -
.../features/withoutui/messaging_withoutUI.as | 145 -
.../features/withoutui/remoting_withoutUI.as | 116 -
assembly/pom.xml | 58 +
assembly/src/assembly/assemble-gz.xml | 40 +
assembly/src/assembly/assemble-zip.xml | 40 +
attic/ApproveBlazeDS.xml | 385 +
attic/LICENSE | 203 +
attic/NOTICE | 9 +
attic/README | 442 +
attic/RELEASE_NOTES | 20 +
.../WEB-INF/classes/commons-logging.properties | 19 +
.../blazeds-spring/WEB-INF/flex-servlet.xml | 34 +
.../WEB-INF/flex/messaging-config.xml | 32 +
.../WEB-INF/flex/proxy-config.xml | 43 +
.../WEB-INF/flex/remoting-config.xml | 31 +
.../WEB-INF/flex/services-config.xml | 117 +
.../WEB-INF/spring/app-config.xml | 29 +
.../WEB-INF/spring/infrastructure-config.xml | 25 +
.../WEB-INF/spring/security-config.xml | 41 +
attic/apps/blazeds-spring/WEB-INF/web.xml | 102 +
attic/apps/blazeds-spring/build.xml | 97 +
attic/apps/blazeds-spring/index.htm | 50 +
.../WEB-INF/classes/commons-logging.properties | 19 +
.../blazeds/WEB-INF/flex/messaging-config.xml | 32 +
.../apps/blazeds/WEB-INF/flex/proxy-config.xml | 43 +
.../blazeds/WEB-INF/flex/remoting-config.xml | 31 +
.../blazeds/WEB-INF/flex/services-config.xml | 117 +
attic/apps/blazeds/WEB-INF/web.xml | 82 +
attic/apps/blazeds/build.xml | 99 +
attic/apps/blazeds/index.htm | 50 +
attic/apps/ds-console/ConsoleResultWindow.mxml | 48 +
.../ds-console/WEB-INF/flex/services-config.xml | 116 +
attic/apps/ds-console/WEB-INF/install-web.xml | 48 +
attic/apps/ds-console/WEB-INF/web.xml | 57 +
attic/apps/ds-console/build.xml | 174 +
attic/apps/ds-console/console.mxml | 105 +
.../apps/ds-console/console/ConsoleListener.as | 43 +
attic/apps/ds-console/console/ConsoleManager.as | 1004 +
.../console/ConsoleTreeDataDescriptor.as | 70 +
.../console/containers/AdvancedPanel.as | 169 +
.../containers/AdvancedPanelDisplay.mxml | 69 +
.../console/containers/DefaultPanel.as | 41 +
.../console/containers/DefaultPanelDisplay.mxml | 29 +
.../console/containers/DestinationManager.as | 238 +
.../containers/DestinationManagerDisplay.mxml | 61 +
.../console/containers/EndpointManager.as | 149 +
.../containers/EndpointManagerDisplay.mxml | 56 +
.../ds-console/console/containers/LogManager.as | 189 +
.../console/containers/LogManagerDisplay.mxml | 54 +
.../ds-console/console/containers/Operation.as | 169 +
.../console/containers/OperationSet.as | 149 +
.../containers/PollableAttributeChart.as | 42 +
.../console/containers/ServerManager.as | 138 +
.../containers/ServerManagerDisplay.mxml | 54 +
.../console/containers/UpdateListener.as | 109 +
.../console/containers/UpdateManager.as | 28 +
.../console/data/Bindable3DHashMap.as | 110 +
.../events/ManagementOperationInvokeEvent.as | 99 +
attic/apps/samples-spring/README.txt | 5 +
.../WEB-INF/classes/commons-logging.properties | 19 +
.../samples-spring/WEB-INF/flex-servlet.xml | 70 +
.../flex-src/chat/.actionScriptProperties | 38 +
.../WEB-INF/flex-src/chat/.flexProperties | 20 +
.../WEB-INF/flex-src/chat/.project | 36 +
.../WEB-INF/flex-src/chat/build.xml | 76 +
.../chat/html-template/history/history.css | 22 +
.../chat/html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../chat/html-template/index.template.html | 121 +
.../flex-src/chat/html-template/swfobject.js | 793 +
.../WEB-INF/flex-src/chat/src/chat.mxml | 86 +
.../collaboration/.actionScriptProperties | 38 +
.../flex-src/collaboration/.flexProperties | 20 +
.../WEB-INF/flex-src/collaboration/.project | 36 +
.../WEB-INF/flex-src/collaboration/build.xml | 76 +
.../html-template/history/history.css | 22 +
.../html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../html-template/index.template.html | 121 +
.../collaboration/html-template/swfobject.js | 793 +
.../flex-src/collaboration/src/Customer.as | 34 +
.../collaboration/src/collaboration.mxml | 147 +
.../flex-src/companymgr/.actionScriptProperties | 38 +
.../WEB-INF/flex-src/companymgr/.flexProperties | 20 +
.../WEB-INF/flex-src/companymgr/.project | 36 +
.../WEB-INF/flex-src/companymgr/build.xml | 76 +
.../html-template/history/history.css | 22 +
.../companymgr/html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../html-template/index.template.html | 121 +
.../companymgr/html-template/swfobject.js | 793 +
.../flex-src/companymgr/src/BindableComboBox.as | 73 +
.../WEB-INF/flex-src/companymgr/src/Company.as | 34 +
.../flex-src/companymgr/src/CompanyEvent.as | 37 +
.../flex-src/companymgr/src/CompanyForm.mxml | 156 +
.../WEB-INF/flex-src/companymgr/src/Industry.as | 28 +
.../flex-src/companymgr/src/companymgr.mxml | 130 +
.../feedstarter/.actionScriptProperties | 38 +
.../flex-src/feedstarter/.flexProperties | 20 +
.../WEB-INF/flex-src/feedstarter/.project | 36 +
.../WEB-INF/flex-src/feedstarter/build.xml | 76 +
.../html-template/history/history.css | 22 +
.../html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../html-template/index.template.html | 121 +
.../feedstarter/html-template/swfobject.js | 793 +
.../flex-src/feedstarter/src/feedstarter.mxml | 53 +
.../flex-src/insync01/.actionScriptProperties | 38 +
.../WEB-INF/flex-src/insync01/.flexProperties | 20 +
.../WEB-INF/flex-src/insync01/.project | 36 +
.../WEB-INF/flex-src/insync01/build.xml | 76 +
.../insync01/html-template/history/history.css | 22 +
.../insync01/html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../insync01/html-template/index.template.html | 121 +
.../insync01/html-template/swfobject.js | 793 +
.../WEB-INF/flex-src/insync01/src/insync01.mxml | 35 +
.../flex-src/insync02/.actionScriptProperties | 38 +
.../WEB-INF/flex-src/insync02/.flexProperties | 20 +
.../WEB-INF/flex-src/insync02/.project | 36 +
.../WEB-INF/flex-src/insync02/build.xml | 76 +
.../insync02/html-template/history/history.css | 22 +
.../insync02/html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../insync02/html-template/index.template.html | 121 +
.../insync02/html-template/swfobject.js | 793 +
.../WEB-INF/flex-src/insync02/src/insync02.mxml | 60 +
.../flex-src/insync03/.actionScriptProperties | 38 +
.../WEB-INF/flex-src/insync03/.flexProperties | 20 +
.../WEB-INF/flex-src/insync03/.project | 36 +
.../WEB-INF/flex-src/insync03/build.xml | 76 +
.../insync03/html-template/history/history.css | 22 +
.../insync03/html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../insync03/html-template/index.template.html | 121 +
.../insync03/html-template/swfobject.js | 793 +
.../WEB-INF/flex-src/insync03/src/Contact.as | 35 +
.../flex-src/insync03/src/ContactForm.mxml | 112 +
.../WEB-INF/flex-src/insync03/src/insync03.mxml | 71 +
.../flex-src/insync04/.actionScriptProperties | 38 +
.../WEB-INF/flex-src/insync04/.flexProperties | 20 +
.../WEB-INF/flex-src/insync04/.project | 36 +
.../WEB-INF/flex-src/insync04/build.xml | 76 +
.../insync04/html-template/history/history.css | 22 +
.../insync04/html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../insync04/html-template/index.template.html | 121 +
.../insync04/html-template/swfobject.js | 793 +
.../WEB-INF/flex-src/insync04/src/Contact.as | 35 +
.../flex-src/insync04/src/ContactForm.mxml | 120 +
.../WEB-INF/flex-src/insync04/src/insync04.mxml | 88 +
.../flex-src/insync05/.actionScriptProperties | 38 +
.../WEB-INF/flex-src/insync05/.flexProperties | 20 +
.../WEB-INF/flex-src/insync05/.project | 36 +
.../WEB-INF/flex-src/insync05/build.xml | 76 +
.../insync05/html-template/history/history.css | 22 +
.../insync05/html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../insync05/html-template/index.template.html | 121 +
.../insync05/html-template/swfobject.js | 793 +
.../WEB-INF/flex-src/insync05/src/Contact.as | 35 +
.../flex-src/insync05/src/ContactForm.mxml | 133 +
.../WEB-INF/flex-src/insync05/src/insync05.mxml | 89 +
.../flex-src/insync06/.actionScriptProperties | 38 +
.../WEB-INF/flex-src/insync06/.flexProperties | 20 +
.../WEB-INF/flex-src/insync06/.project | 36 +
.../WEB-INF/flex-src/insync06/build.xml | 76 +
.../insync06/html-template/history/history.css | 22 +
.../insync06/html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../insync06/html-template/index.template.html | 121 +
.../insync06/html-template/swfobject.js | 793 +
.../WEB-INF/flex-src/insync06/src/Contact.as | 35 +
.../flex-src/insync06/src/ContactEvent.as | 37 +
.../flex-src/insync06/src/ContactForm.mxml | 138 +
.../WEB-INF/flex-src/insync06/src/insync06.mxml | 114 +
.../flex-src/simplepush/.actionScriptProperties | 38 +
.../WEB-INF/flex-src/simplepush/.flexProperties | 20 +
.../WEB-INF/flex-src/simplepush/.project | 36 +
.../WEB-INF/flex-src/simplepush/build.xml | 76 +
.../html-template/history/history.css | 22 +
.../simplepush/html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../html-template/index.template.html | 121 +
.../simplepush/html-template/swfobject.js | 793 +
.../flex-src/simplepush/src/simplepush.mxml | 53 +
.../spring-blazeds-101/.actionScriptProperties | 38 +
.../flex-src/spring-blazeds-101/.flexProperties | 20 +
.../flex-src/spring-blazeds-101/.project | 36 +
.../flex-src/spring-blazeds-101/build.xml | 76 +
.../html-template/history/history.css | 22 +
.../html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../html-template/index.template.html | 121 +
.../html-template/swfobject.js | 793 +
.../flex-src/spring-blazeds-101/src/Main.mxml | 39 +
.../.actionScriptProperties | 38 +
.../spring-blazeds-security-101/.flexProperties | 20 +
.../spring-blazeds-security-101/.project | 36 +
.../spring-blazeds-security-101/build.xml | 76 +
.../html-template/history/history.css | 22 +
.../html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../html-template/index.template.html | 121 +
.../html-template/swfobject.js | 793 +
.../spring-blazeds-security-101/src/Main.mxml | 87 +
.../traderdesktop/.actionScriptProperties | 38 +
.../flex-src/traderdesktop/.flexProperties | 20 +
.../WEB-INF/flex-src/traderdesktop/.project | 36 +
.../WEB-INF/flex-src/traderdesktop/build.xml | 76 +
.../html-template/history/history.css | 22 +
.../html-template/history/history.js | 722 +
.../html-template/history/historyFrame.html | 45 +
.../html-template/index.template.html | 121 +
.../traderdesktop/html-template/swfobject.js | 793 +
.../src/BackgroundColorRenderer.as | 55 +
.../flex-src/traderdesktop/src/ColorRenderer.as | 40 +
.../flex/samples/marketfeed/Stock.as | 35 +
.../traderdesktop/src/traderdesktop.mxml | 147 +
.../WEB-INF/flex/messaging-config.xml | 32 +
.../WEB-INF/flex/proxy-config.xml | 43 +
.../WEB-INF/flex/remoting-config.xml | 31 +
.../WEB-INF/flex/services-config.xml | 122 +
.../WEB-INF/spring/app-config.xml | 58 +
.../WEB-INF/spring/infrastructure-config.xml | 41 +
.../WEB-INF/spring/security-config.xml | 43 +
.../WEB-INF/src/spring-samples/.classpath | 68 +
.../WEB-INF/src/spring-samples/.project | 35 +
.../flex/samples/company/Company.java | 111 +
.../flex/samples/company/CompanyDAO.java | 115 +
.../flex/samples/company/ICompanyDAO.java | 23 +
.../flex/samples/contact/Contact.java | 119 +
.../flex/samples/contact/ContactDAO.java | 107 +
.../flex/samples/contact/IContactDAO.java | 23 +
.../flex/samples/dao/IGenericDAO.java | 35 +
.../flex/samples/industry/IIndustryDAO.java | 23 +
.../flex/samples/industry/Industry.java | 49 +
.../flex/samples/industry/IndustryDAO.java | 89 +
.../flex/samples/integration/Counter.java | 50 +
.../flex/samples/marketfeed/MarketFeed.java | 196 +
.../flex/samples/marketfeed/Stock.java | 106 +
.../flex/samples/product/IProductDAO.java | 23 +
.../flex/samples/product/Product.java | 109 +
.../flex/samples/product/ProductDAO.java | 160 +
.../flex/samples/secured/Security3Helper.java | 29 +
.../flex/samples/simplefeed/SimpleFeed.java | 94 +
.../flex/samples/util/DatabaseInitializer.java | 300 +
attic/apps/samples-spring/WEB-INF/web.xml | 87 +
attic/apps/samples-spring/build.xml | 168 +
attic/apps/samples-spring/index.html | 330 +
attic/apps/samples-spring/login.jsp | 64 +
attic/apps/samples-spring/main.css | 138 +
attic/apps/samples-spring/stocklist.xml | 141 +
attic/apps/samples/README.txt | 5 +
.../WEB-INF/flex-src/dashboard/build.xml | 85 +
.../flex-src/dashboard/src/RegionBreakdown.mxml | 176 +
.../flex-src/dashboard/src/RegionDetail.mxml | 175 +
.../flex-src/dashboard/src/RevenueTimeline.mxml | 134 +
.../WEB-INF/flex-src/dashboard/src/SortUtils.as | 62 +
.../flex-src/dashboard/src/dashboard.mxml | 209 +
.../flex-src/dashboard/src/icon_chart.png | Bin 0 -> 28044 bytes
.../flex-src/dashboard/src/icon_grid.png | Bin 0 -> 28182 bytes
.../WEB-INF/flex-src/dashboard/src/main.css | 35 +
.../WEB-INF/flex-src/dashboard/src/results.xml | 213 +
.../WEB-INF/flex-src/inventory/build.xml | 82 +
.../WEB-INF/flex-src/inventory/src/Product.as | 44 +
.../flex-src/inventory/src/ProductForm.mxml | 106 +
.../flex-src/inventory/src/SearchPopup.mxml | 96 +
.../flex-src/inventory/src/assets/Thumbs.db | Bin 0 -> 11264 bytes
.../flex-src/inventory/src/assets/app_skin.png | Bin 0 -> 63724 bytes
.../flex-src/inventory/src/assets/blank.png | Bin 0 -> 46171 bytes
.../inventory/src/assets/button_over_skin.png | Bin 0 -> 57493 bytes
.../inventory/src/assets/button_skin.png | Bin 0 -> 52718 bytes
.../inventory/src/assets/icon_close.png | Bin 0 -> 59628 bytes
.../flex-src/inventory/src/assets/icon_plus.png | Bin 0 -> 58539 bytes
.../inventory/src/assets/icon_search.png | Bin 0 -> 49838 bytes
.../flex-src/inventory/src/assets/search.png | Bin 0 -> 53407 bytes
.../inventory/src/assets/top_separator.png | Bin 0 -> 47474 bytes
.../flex-src/inventory/src/inventory.mxml | 116 +
.../WEB-INF/flex-src/inventory/src/styles.css | 74 +
.../flex-src/runtimeconfig-messaging/build.xml | 77 +
.../runtimeconfig-messaging/src/ChatPanel.mxml | 87 +
.../runtimeconfig-messaging/src/main.mxml | 54 +
.../flex-src/runtimeconfig-remoting/build.xml | 77 +
.../runtimeconfig-remoting/src/main.mxml | 64 +
.../WEB-INF/flex-src/testdrive-101/build.xml | 77 +
.../flex-src/testdrive-101/src/ProductView.mxml | 35 +
.../flex-src/testdrive-101/src/Thumb.mxml | 29 +
.../flex-src/testdrive-101/src/main.mxml | 52 +
.../flex-src/testdrive-101/src/testdrive.css | 35 +
.../WEB-INF/flex-src/testdrive-chat/build.xml | 77 +
.../flex-src/testdrive-chat/src/main.mxml | 56 +
.../flex-src/testdrive-datapush/build.xml | 81 +
.../flex-src/testdrive-datapush/src/main.mxml | 42 +
.../testdrive-datapush/src/startfeed.jsp | 26 +
.../testdrive-datapush/src/stopfeed.jsp | 26 +
.../flex-src/testdrive-httpservice/build.xml | 81 +
.../testdrive-httpservice/src/catalog.jsp | 42 +
.../testdrive-httpservice/src/main.mxml | 28 +
.../flex-src/testdrive-remoteobject/build.xml | 77 +
.../testdrive-remoteobject/src/main.mxml | 28 +
.../WEB-INF/flex-src/testdrive-update/build.xml | 77 +
.../flex-src/testdrive-update/src/Product.as | 44 +
.../testdrive-update/src/ProductForm.mxml | 60 +
.../flex-src/testdrive-update/src/main.mxml | 31 +
.../flex-src/testdrive-webservice/build.xml | 81 +
.../flex-src/testdrive-webservice/src/main.mxml | 33 +
.../WEB-INF/flex-src/traderdesktop/build.xml | 81 +
.../src/BackgroundColorRenderer.as | 55 +
.../flex-src/traderdesktop/src/ColorRenderer.as | 40 +
.../WEB-INF/flex-src/traderdesktop/src/main.css | 30 +
.../src/samples/portfolio/Stock.as | 35 +
.../flex-src/traderdesktop/src/startfeed.jsp | 26 +
.../flex-src/traderdesktop/src/stopfeed.jsp | 26 +
.../traderdesktop/src/traderdesktop.mxml | 241 +
.../samples/WEB-INF/flex/messaging-config.xml | 58 +
.../apps/samples/WEB-INF/flex/proxy-config.xml | 60 +
.../samples/WEB-INF/flex/remoting-config.xml | 56 +
.../samples/WEB-INF/flex/services-config.xml | 146 +
.../src/flex/samples/ConnectionHelper.java | 59 +
.../WEB-INF/src/flex/samples/DAOException.java | 38 +
.../src/flex/samples/DatabaseCheckService.java | 65 +
.../flex/samples/crm/ConcurrencyException.java | 37 +
.../src/flex/samples/crm/DAOException.java | 38 +
.../src/flex/samples/crm/company/Company.java | 105 +
.../flex/samples/crm/company/CompanyDAO.java | 228 +
.../src/flex/samples/crm/employee/Employee.java | 106 +
.../flex/samples/crm/employee/EmployeeDAO.java | 300 +
.../src/flex/samples/dcd/product/Product.java | 89 +
.../samples/dcd/product/ProductService.java | 197 +
.../WEB-INF/src/flex/samples/feed/Feed.java | 85 +
.../src/flex/samples/marketdata/Feed.java | 121 +
.../src/flex/samples/marketdata/Portfolio.java | 75 +
.../src/flex/samples/marketdata/Stock.java | 84 +
.../src/flex/samples/marketdata/portfolio.xml | 141 +
.../src/flex/samples/product/Product.java | 89 +
.../flex/samples/product/ProductService.java | 191 +
.../samples/qos/CustomDelayQueueProcessor.java | 121 +
.../samples/qos/FlexClientConfigService.java | 74 +
.../samples/runtimeconfig/ChatRoomService.java | 81 +
.../EmployeeRuntimeRemotingDestination.java | 54 +
attic/apps/samples/WEB-INF/web.xml | 63 +
attic/apps/samples/build.xml | 168 +
attic/apps/samples/fb-project-setup.htm | 67 +
attic/apps/samples/images/blazeds.png | Bin 0 -> 8104 bytes
attic/apps/samples/index.htm | 101 +
attic/apps/samples/main.css | 138 +
attic/apps/samples/testdrive.htm | 254 +
attic/apps/team/WEB-INF/activemq.xml | 36 +
attic/apps/team/WEB-INF/flex/global.css | 17 +
.../apps/team/WEB-INF/flex/messaging-config.xml | 292 +
attic/apps/team/WEB-INF/flex/proxy-config.xml | 47 +
.../apps/team/WEB-INF/flex/remoting-config.xml | 96 +
.../apps/team/WEB-INF/flex/services-config.xml | 414 +
.../add_your_as_and_swc_files_here.txt | 0
.../HTTPProxyBootstrapService.java | 254 +
.../MessagingBootstrapService.java | 330 +
.../RemotingBootstrapService.java | 220 +
.../CustomActionscriptAdapter.java | 96 +
.../messaging/serverpush/ServerPushService.java | 130 +
.../features/remoting/AMFConnectionTest.java | 76 +
.../src/features/remoting/EchoService.java | 130 +
.../externalizable/ExternalizableClass.java | 43 +
.../runtimeconfig/RuntimeConfigurator.java | 110 +
.../ClassLoggingDeserializationValidator.java | 127 +
.../TestDeserializationValidator.java | 58 +
attic/apps/team/build.xml | 194 +
attic/apps/team/features/README.txt | 2 +
attic/apps/team/features/ajax/README.txt | 3 +
.../features/ajax/messaging/TextMessage.html | 88 +
.../features/ajax/messaging/TextMessage.mxml | 95 +
.../cluster/messaging_AMF_Poll_Cluster.mxml | 94 +
.../cluster/messaging_HTTP_Poll_Cluster.mxml | 94 +
.../messaging_SecureAMF_Poll_Cluster.mxml | 95 +
.../messaging_SecureHTTP_Poll_Cluster.mxml | 95 +
.../customadapter/messaging_CustomAdapter.mxml | 101 +
.../features/messaging/discardedMessaging.mxml | 119 +
.../jms/messaging_AMF_LongPoll_JMS_Topic.mxml | 91 +
.../jms/messaging_AMF_Poll_JMS_Queue.mxml | 91 +
.../jms/messaging_AMF_Poll_JMS_Topic.mxml | 91 +
.../jms/messaging_HTTP_Poll_JMS_Queue.mxml | 91 +
.../jms/messaging_HTTP_Poll_JMS_Topic.mxml | 91 +
.../team/features/messaging/messaging_AMF.mxml | 121 +
.../messaging/messaging_AMF_LongPoll.mxml | 91 +
.../messaging/messaging_AMF_Piggyback.mxml | 104 +
.../features/messaging/messaging_AMF_Poll.mxml | 91 +
.../messaging/messaging_AMF_Stream.mxml | 91 +
.../team/features/messaging/messaging_HTTP.mxml | 117 +
.../messaging/messaging_HTTP_LongPoll.mxml | 91 +
.../messaging/messaging_HTTP_Piggyback.mxml | 104 +
.../features/messaging/messaging_HTTP_Poll.mxml | 91 +
.../messaging/messaging_HTTP_Stream.mxml | 91 +
...aging_AMFLongPoll_and_SecureAMFLongPoll.mxml | 160 +
...ssaging_SecureAMFLongPoll_and_AMFStream.mxml | 160 +
.../messaging_two_AMFLongPoll_Endpoints.mxml | 160 +
.../messaging/secure/messaging_SecureAMF.mxml | 120 +
.../messaging/secure/messaging_SecureHTTP.mxml | 120 +
.../messaging_AMF_Poll_JMS_Queue_Selector.mxml | 100 +
.../selector/messaging_AMF_Poll_Selector.mxml | 100 +
.../selector/messaging_HTTP_Poll_Selector.mxml | 102 +
...ng_AMF_LongPoll_SendSubscribeConstraint.mxml | 104 +
...saging_AMF_Poll_SendSubscribeConstraint.mxml | 104 +
...ging_AMF_Stream_SendSubscribeConstraint.mxml | 104 +
...aging_HTTP_Poll_SendSubscribeConstraint.mxml | 104 +
.../subtopic/messaging_AMF_Poll_Subtopic.mxml | 103 +
.../messaging_AMF_Stream_MultiSubtopic.mxml | 131 +
.../subtopic/messaging_HTTP_Poll_Subtopic.mxml | 103 +
.../throttle/messaging_ThrottleInbound.mxml | 155 +
.../throttle/messaging_ThrottleOutbound.mxml | 228 +
.../externalizable/ExternalizableClass.as | 56 +
.../externalizable/remoting_Externalizable.mxml | 80 +
.../features/remoting/filteredAckRemoting.mxml | 77 +
.../remoting/filteredFaultRemoting.mxml | 77 +
.../team/features/remoting/remoting_AMF.mxml | 77 +
.../team/features/remoting/remoting_AMFX.mxml | 77 +
.../remoting/remoting_AMF_Dictionary.mxml | 104 +
.../features/remoting/remoting_AMF_Legacy.mxml | 78 +
.../remoting/remoting_AMF_ReadOnly.mxml | 69 +
.../features/remoting/remoting_AMF_Vector.mxml | 122 +
.../runtimeconfig_MessageDestination.mxml | 150 +
...runtimeconfig_MessageDestinationWithJMS.mxml | 131 +
.../features/security-constraints/README.txt | 6 +
.../securityConstraint_Basic.mxml | 71 +
.../securityConstraint_Custom.mxml | 140 +
.../securityConstraint_Legacy.mxml | 104 +
.../features/withoutui/messaging_withoutUI.as | 145 +
.../features/withoutui/remoting_withoutUI.as | 116 +
attic/build.properties | 97 +
attic/build.xml | 804 +
attic/collateral/blazeds-bin-readme.htm | 270 +
attic/collateral/blazeds-src-readme.htm | 558 +
attic/collateral/blazeds-turnkey-readme.htm | 557 +
.../development/IDEA/projects/java/BlazeDS.ipr | 404 +
.../development/IDEA/projects/java/blazeds.xml | 88 +
attic/development/IDEA/projects/java/common.iml | 224 +
attic/development/IDEA/projects/java/core.iml | 263 +
attic/development/IDEA/projects/java/opt.iml | 329 +
attic/development/IDEA/projects/java/proxy.iml | 235 +
.../development/IDEA/projects/java/remoting.iml | 216 +
.../flex/3.0/framework/.actionScriptProperties | 35 +
.../flex/3.0/framework/.flexLibProperties | 30 +
.../projects/flex/3.0/framework/.project | 73 +
.../flex/3.0/rpc/.actionScriptProperties | 38 +
.../projects/flex/3.0/rpc/.flexLibProperties | 28 +
.../eclipse/projects/flex/3.0/rpc/.project | 69 +
.../projects/java/blazeds-common/.classpath | 25 +
.../projects/java/blazeds-common/.project | 52 +
.../projects/java/blazeds-core/.classpath | 31 +
.../eclipse/projects/java/blazeds-core/.project | 52 +
.../projects/java/blazeds-opt/.classpath | 41 +
.../eclipse/projects/java/blazeds-opt/.project | 129 +
.../projects/java/blazeds-proxy/.classpath | 28 +
.../projects/java/blazeds-proxy/.project | 47 +
.../projects/java/blazeds-remoting/.classpath | 26 +
.../projects/java/blazeds-remoting/.project | 47 +
.../blazeds-team.war/.actionScriptProperties | 32 +
.../projects/java/blazeds-team.war/.classpath | 30 +
.../java/blazeds-team.war/.flexProperties | 20 +
.../projects/java/blazeds-team.war/.project | 49 +
.../eclipse/projects/java/formatter.xml | 269 +
attic/development/eclipse/projects/readme.txt | 116 +
attic/downloads.xml | 645 +
attic/frameworks/local-swcs/FlexSDK3/empty.txt | 0
attic/frameworks/local-swcs/FlexSDK4/empty.txt | 0
attic/frameworks/local-swcs/readme.txt | 36 +
attic/kick-build.txt | 2 +
attic/modules/common/build.xml | 101 +
attic/modules/core/AdobeInfo.xml | 24 +
attic/modules/core/build.xml | 158 +
attic/modules/opt/build.xml | 344 +
attic/modules/proxy/build.xml | 92 +
attic/modules/remoting/build.xml | 84 +
attic/modules/sdk/build.xml | 230 +
attic/qa/apps/qa-manual/FlashvarsTest.mxml | 37 +
attic/qa/apps/qa-manual/WEB-INF/activemq.xml | 36 +
.../flex/flex-config.mods.deployable.xml | 22 +
.../WEB-INF/flex/flex-config.mods.local.xml | 32 +
.../qa-manual/WEB-INF/flex/flex-config.mods.xml | 36 +
attic/qa/apps/qa-manual/WEB-INF/flex/global.css | 17 +
.../flex/messaging-config.mods.local.xml | 34 +
.../WEB-INF/flex/messaging-config.mods.xml | 459 +
.../flex/messaging-throttle-config.mods.xml | 298 +
.../WEB-INF/flex/proxy-config.mods.local.xml | 36 +
.../WEB-INF/flex/proxy-config.mods.xml | 268 +
.../WEB-INF/flex/remoting-config.mods.local.xml | 34 +
.../WEB-INF/flex/remoting-config.mods.xml | 182 +
.../WEB-INF/flex/services-config.mods.local.xml | 53 +
.../WEB-INF/flex/services-config.mods.xml | 361 +
.../WEB-INF/flex/user_classes/_LoginWindow.mxml | 57 +
.../WEB-INF/flex/user_classes/placeholder | 1 +
.../flex/user_classes/qa/data/Address.as | 90 +
.../flex/user_classes/qa/data/Company.as | 97 +
.../apps/qa-manual/WEB-INF/server-config.wsdd | 409 +
.../WEB-INF/src/bugs/b205439/SampleServlet.java | 125 +
.../com/adobe/samples/hsbc/MessageSender.java | 48 +
.../WEB-INF/src/dev/echoservice/Book.java | 94 +
.../src/dev/echoservice/CustomException.java | 40 +
.../WEB-INF/src/dev/echoservice/Echo.java | 458 +
.../WEB-INF/src/dev/remoting/BindObject.java | 37 +
.../WEB-INF/src/dev/remoting/TestServices.java | 177 +
.../WEB-INF/src/messaging/ClientManagerRO.java | 127 +
.../src/qa/messaging/flook/FLookEmail.java | 69 +
.../messaging/throttle/ROPushServerMessage.java | 190 +
.../WEB-INF/src/qa/utils/MessageGenerator.java | 205 +
.../components/RuntimeEndpointsAndFactory.java | 158 +
.../components/RuntimeHttpProxyAll.java | 171 +
.../components/RuntimeHttpProxyService.java | 91 +
.../RuntimeJMSDestinationNoConnFact.java | 165 +
.../RuntimeJMSDestinationNoJNDIDestName.java | 173 +
.../RuntimeMessageDestinationClustered.java | 134 +
.../RuntimeRTPushOverHttpDestinations.java | 108 +
.../remoteobjects/RuntimeLogTargets.java | 132 +
.../WEB-INF/src/security/PerClientCommand.java | 50 +
.../src/security/PerClientPrincipal.java | 40 +
.../qa-manual/WEB-INF/src/test/RpcTest.java | 28 +
.../ajax/messaging/JMSObjectMessageTest.html | 94 +
.../messaging/TextMessageASAdapterTest.html | 92 +
.../messaging/TextMessageOverStreamingTest.html | 97 +
.../ajax/messaging/TextMessageRuntimeDest.html | 98 +
attic/qa/apps/qa-manual/ajax/readme.txt | 1 +
.../182101/PerClientAuthenticationTest.mxml | 105 +
.../qa-manual/bugs/182101/readme_bug182101.txt | 45 +
.../qa/apps/qa-manual/bugs/BLZ-594/BLZ-594.mxml | 37 +
attic/qa/apps/qa-manual/bugs/BLZ-594/readme.txt | 13 +
attic/qa/apps/qa-manual/build.xml | 384 +
.../ClusteredChannelSetLoginTest.mxml | 151 +
.../qa-manual/ipv6/general/URLUtilIPv6Test.mxml | 302 +
.../messaging/ipv6_messaging_streaming.mxml | 166 +
.../ipv6/proxyservice/httpService/basic.xml | 30 +
.../proxyservice/httpService/ipv6_hs_dest.mxml | 106 +
.../httpService/ipv6_hs_dynamicurl.mxml | 114 +
.../httpService/ipv6_hs_externalproxy.mxml | 96 +
.../webService/ipv6_ws_dynamicurl.mxml | 106 +
attic/qa/apps/qa-manual/ipv6/readme.txt | 7 +
.../qa-manual/ipv6/remoteservice/ipv6_ro.mxml | 85 +
.../mbean/jmx/MBeanServerGateway_create.mxml | 157 +
attic/qa/apps/qa-manual/mbean/jmx/Simple.java | 29 +
.../apps/qa-manual/mbean/jmx/SimpleMBean.java | 23 +
.../apps/qa-manual/messaging/ClientManager.mxml | 81 +
.../apps/qa-manual/messaging/MessagingApp.mxml | 416 +
.../apps/qa-manual/messaging/RPC2MsgLite.mxml | 138 +
.../qa-manual/messaging/duplicateSession.mxml | 91 +
.../messaging/messaging_Two_Destinations.mxml | 162 +
.../throttling/simpleMessagingConsumerTest.mxml | 552 +
.../simpleMessagingProducerServerPush.mxml | 377 +
.../httpservice/ProxyTopLevelConstrainTest.mxml | 122 +
.../bugs/sdk-11244/leaktest/LeakTest2.html | 41 +
.../bugs/sdk-11244/leaktest/LeakTest2.mxml | 191 +
.../bugs/sdk-11244/leaktest/leaktest.xml | 11023 +++++++++
.../bugs/sdk-11244/leaktest/pbentries.xml | 20 +
.../bugs/sdk-11244/pbentries/pbentries.xml | 20 +
attic/qa/apps/qa-manual/qa/main.mxml | 22 +
.../qa/apps/qa-manual/remoting/RemotingApp.mxml | 368 +
.../rtPushOverHTTP/secureDestinationTest.mxml | 159 +
.../qa-manual/rtPushOverHTTP/test_autosend.mxml | 167 +
.../runtimeConfiguration/changeLogLevel.mxml | 66 +
.../clusteredDynamicMessageDestTest.mxml | 119 +
.../clusteredStaticMessageDestTest.mxml | 104 +
.../security/login_logout_disconnect.mxml | 208 +
attic/qa/apps/qa-regress/META-INF/MANIFEST.MF | 5 +
attic/qa/apps/qa-regress/WEB-INF/activemq.xml | 36 +
.../qa/apps/qa-regress/WEB-INF/flex-servlet.xml | 95 +
.../WEB-INF/flex/active-mq-messaging-config.xml | 1296 ++
.../flex/flex-config.mods.deployable.xml | 36 +
.../WEB-INF/flex/flex-config.mods.local.xml | 34 +
.../WEB-INF/flex/flex-config.mods.xml | 36 +
.../qa/apps/qa-regress/WEB-INF/flex/global.css | 17 +
.../flex/messaging-config.mods.local.xml | 34 +
.../WEB-INF/flex/messaging-config.mods.xml | 1832 ++
.../WEB-INF/flex/proxy-config.mods.local.xml | 43 +
.../WEB-INF/flex/proxy-config.mods.xml | 485 +
.../WEB-INF/flex/remoting-config.mods.local.xml | 34 +
.../WEB-INF/flex/remoting-config.mods.xml | 486 +
.../WEB-INF/flex/services-config.mods.local.xml | 33 +
.../flex/services-config.mods.validators.xml | 74 +
.../WEB-INF/flex/services-config.mods.xml | 539 +
.../user_classes/add_your_as_and_swc_files_here | 0
.../user_classes/proxy/ApplicationSwfProxy.as | 137 +
.../user_classes/proxy/RequestDeserializer.as | 30 +
.../user_classes/proxy/ResponseSerializer.as | 59 +
.../user_classes/qa/CommunicationManager.as | 40 +
.../flex/user_classes/qa/CustomNetConnection.as | 30 +
.../apps/qa-regress/WEB-INF/server-config.wsdd | 2736 +++
.../qa-regress/WEB-INF/spring/app-config.xml | 29 +
.../WEB-INF/spring/infrastructure-config.xml | 25 +
.../WEB-INF/spring/security-config.xml | 48 +
.../DeserializationValidatorBrokerConfig.java | 158 +
.../TestDeserializationValidator.java | 59 +
.../src/blazeds/qa/remotingService/Bean.java | 199 +
.../blazeds/qa/remotingService/BindObject.java | 29 +
.../src/blazeds/qa/remotingService/Book.java | 100 +
.../qa/remotingService/CustomException.java | 40 +
.../src/blazeds/qa/remotingService/Echo.java | 573 +
.../qa/remotingService/ExternalizableDate.java | 66 +
.../blazeds/qa/remotingService/FileProxy.java | 37 +
.../qa/remotingService/FileReference.java | 36 +
.../qa/remotingService/FileReferenceProxy.java | 38 +
.../qa/remotingService/ImageSnapshotType.java | 42 +
.../qa/remotingService/InstantiationTest.java | 55 +
.../qa/remotingService/ObjectMessageClient.java | 161 +
.../qa/remotingService/TestServices.java | 242 +
.../qa/remotingService/TestTypedObject.java | 50 +
.../TestTypedObjectWithInheritance.java | 27 +
.../qa/remotingService/inherit/ChildClass.java | 67 +
.../qa/remotingService/inherit/ParentClass.java | 64 +
.../WEB-INF/src/commons-logging.properties | 19 +
.../src/dev/calendar/CalendarService.java | 88 +
.../WEB-INF/src/dev/echoservice/Bean.java | 199 +
.../WEB-INF/src/dev/echoservice/Book.java | 95 +
.../src/dev/echoservice/CustomException.java | 41 +
.../WEB-INF/src/dev/echoservice/Echo.java | 459 +
.../dev/echoservice/ObjectMessageClient.java | 168 +
.../src/dev/echoservice/TestTypedObject.java | 55 +
.../TestTypedObjectWithInheritance.java | 29 +
.../src/dev/endpoints/HangingAMFEndpoint.java | 72 +
.../src/dev/endpoints/HangingHTTPEndpoint.java | 53 +
.../src/dev/httpservice/HttpServiceTest.java | 140 +
.../src/dev/httpservice/HttpXmlEchoService.java | 50 +
.../WEB-INF/src/dev/logging/serverlog.java | 51 +
.../WEB-INF/src/dev/remoting/BindObject.java | 31 +
.../WEB-INF/src/dev/remoting/TestServices.java | 171 +
.../src/dev/remoting/inherit/ChildClass.java | 67 +
.../src/dev/remoting/inherit/ParentClass.java | 64 +
.../WEB-INF/src/dev/weather/WeatherInfo.java | 67 +
.../WEB-INF/src/dev/weather/WeatherService.java | 115 +
.../src/errorhandling/testException.java | 37 +
.../qa-regress/WEB-INF/src/photo/person0.jpg | Bin 0 -> 10638 bytes
.../qa/management/MBeanObjectNameResolver.java | 241 +
.../WEB-INF/src/qa/management/Simple.java | 31 +
.../WEB-INF/src/qa/management/SimpleMBean.java | 25 +
.../qa/messaging/CustomMessagingAdapter.java | 67 +
.../src/qa/messaging/CustomTypeMarshaller.java | 47 +
.../src/qa/messaging/CustomUUIDGenerator.java | 29 +
.../src/qa/messaging/DupeUUIDGenerator.java | 29 +
.../qa/messaging/DynamicDestinationAdapter.java | 110 +
.../qa/messaging/MessageRoutedListenerTest.java | 60 +
.../src/qa/messaging/ROPushServerMessage.java | 169 +
.../src/qa/messaging/SessionManager.java | 26 +
.../src/remoting/ConstructorNegativeTest.java | 34 +
.../amfclient/AMFConnectionTestService.java | 121 +
.../remoting/amfclient/ServerCustomType.java | 45 +
.../src/remoting/datatype/EnumApple.java | 33 +
.../src/remoting/datatype/EnumProxy.java | 85 +
.../WEB-INF/src/remoting/datatype/EnumType.java | 30 +
.../src/remoting/datatype/EnumTypeTest.java | 98 +
.../src/remoting/datatype/MapTypeTest.java | 44 +
.../FlexSessionAttributeListenerTest.java | 100 +
.../components/RuntimeHttpProxyDestination.java | 158 +
.../components/RuntimeJMSDestination.java | 314 +
.../components/RuntimeMessageDestination.java | 139 +
.../RuntimeMessageDestinationClustered.java | 133 +
.../components/RuntimeRemotingDestination.java | 76 +
.../components/RuntimeSOAPProxyAdapter.java | 146 +
.../RuntimeUnmanagedMessageDestination.java | 137 +
.../remoteobjects/ROMessageDestination.java | 82 +
.../remoteobjects/RuntimeConfigurator.java | 231 +
.../remoteobjects/RuntimeLogTargets.java | 131 +
.../TestDeserializationValidator.java | 59 +
.../WEB-INF/src/security/PerClientCommand.java | 51 +
.../src/security/PerClientPrincipal.java | 41 +
attic/qa/apps/qa-regress/axis/EchoHeaders.jws | 136 +
.../apps/qa-regress/axis/StockQuoteService.jws | 99 +
attic/qa/apps/qa-regress/axis/fingerprint.jsp | 285 +
attic/qa/apps/qa-regress/axis/happyaxis.jsp | 521 +
attic/qa/apps/qa-regress/axis/index.html | 59 +
.../qa-regress/axis/servicesAndPorts/0s0p.wsdl | 182 +
.../BadDotNetWebServiceRequest.wsdl | 866 +
.../axis/servicesAndPorts/ServicesAndPorts1.jws | 30 +
.../axis/servicesAndPorts/ServicesAndPorts2.jws | 29 +
.../axis/servicesAndPorts/ServicesAndPorts3.jws | 30 +
.../axis/servicesAndPorts/ServicesAndPorts4.jws | 29 +
.../qa-regress/axis/servicesAndPorts/echo.wsdl | 622 +
.../axis/servicesAndPorts/noPound.wsdl | 68 +
.../qa-regress/axis/servicesAndPorts/pound.wsdl | 68 +
.../axis/servicesAndPorts/response.xml | 85 +
.../qa-regress/axis/servicesAndPorts/sp.wsdl | 93 +
.../qa-regress/axis/servicesAndPorts/spp.wsdl | 95 +
.../qa-regress/axis/servicesAndPorts/sppsp.wsdl | 100 +
.../axis/servicesAndPorts/sppspp.wsdl | 103 +
.../qa-regress/axis/servicesAndPorts/spsp.wsdl | 752 +
attic/qa/apps/qa-regress/axis/staticEcho.wsdl | 622 +
attic/qa/apps/qa-regress/build.xml | 476 +
.../qa/apps/qa-regress/deserializationData.xml | 33 +
.../qa/apps/qa-regress/metadata/application.xml | 30 +
.../qa/RemoteObjectDataTypeMatrix.mxml | 957 +
.../qa/apps/qa-regress/qa/flexContextTest.mxml | 240 +
.../qa/flexbuilder_default_application.mxml | 22 +
.../qa-regress/qa/resources/languages_pair.txt | 1 +
.../qa-regress/qa/resources/languages_utf8.xml | 33 +
.../qa/resources/languages_utf8woBOM.xml | 33 +
.../qa-regress/qa/resources/macbethShort.xml | 174 +
attic/qa/apps/qa-regress/qa/serverlog.jsp | 40 +
.../qa-regress/remote/HttpXmlEchoService.jsp | 28 +
.../qa-regress/remote/MultipleHeadersTest.jsp | 31 +
attic/qa/apps/qa-regress/remote/basic.xml | 30 +
attic/qa/apps/qa-regress/remote/echoParams.jsp | 35 +
.../qa-regress/remote/echoParamsAsFlashvars.jsp | 39 +
.../apps/qa-regress/remote/languages_utf8.xml | 33 +
attic/qa/apps/qa-regress/remote/serverlog.jsp | 40 +
attic/qa/apps/qa-regress/remote/testMethods.jsp | 19 +
.../apps/qa-regress/testsuites/config/build.xml | 401 +
.../qa-regress/testsuites/config/testng.xml | 26 +
.../Remoting_NetConnectionTest.mxml | 91 +
.../services-config.xml | 64 +
.../Remoting_NetConnectionTest.mxml | 96 +
.../services-config.xml | 73 +
.../tests/IncorrectRootElementTest/error.txt | 1 +
.../services-config.xml | 36 +
.../tests/NoServicesConfigFileTest/error.txt | 1 +
.../tests/channels/DuplicateIdTest/error.txt | 1 +
.../DuplicateIdTest/services-config.xml | 34 +
.../tests/channels/InvalidIdTest/error.txt | 1 +
.../channels/InvalidIdTest/services-config.xml | 31 +
.../clientLoadBalancing/NoURLsTest/error.txt | 1 +
.../NoURLsTest/services-config.xml | 59 +
.../cluster/IncorrectDefaultValueTest/error.txt | 1 +
.../services-config.xml | 39 +
.../error.txt | 1 +
.../services-config.xml | 39 +
.../tests/destination/DuplicateIdTest/error.txt | 1 +
.../DuplicateIdTest/services-config.xml | 78 +
.../IncorrectRootElementTest/dest-config.xml | 22 +
.../dest-config.xml.sb-6f3bc324-2w7qvX | 4 +
.../IncorrectRootElementTest/error.txt | 1 +
.../services-config.xml | 43 +
.../destination/InvalidAdapterRefTest/error.txt | 1 +
.../InvalidAdapterRefTest/services-config.xml | 48 +
.../destination/InvalidChannelTest/error.txt | 1 +
.../InvalidChannelTest/services-config.xml | 48 +
.../tests/destination/InvalidIdTest/error.txt | 1 +
.../InvalidIdTest/services-config.xml | 59 +
.../tests/destination/NoAdapterTest/error.txt | 1 +
.../NoAdapterTest/services-config.xml | 47 +
.../NonExistentAdapterTest/error.txt | 1 +
.../NonExistentAdapterTest/services-config.xml | 48 +
.../NonExistentChannelAttrTest/error.txt | 1 +
.../services-config.xml | 46 +
.../NonExistentChannelTest/error.txt | 1 +
.../NonExistentChannelTest/services-config.xml | 48 +
.../tests/factories/InvalidIdTest/error.txt | 1 +
.../factories/InvalidIdTest/services-config.xml | 40 +
.../factories/NonExistentClassTest/error.txt | 1 +
.../NonExistentClassTest/services-config.xml | 45 +
.../flexclient/InvalidTimeOutTest/error.txt | 1 +
.../InvalidTimeOutTest/services-config.xml | 25 +
.../flexclient/NegativeTimeOutTest/error.txt | 1 +
.../NegativeTimeOutTest/services-config.xml | 25 +
.../AdaptiveFrequencyTest/error.txt | 1 +
.../AdaptiveFrequencyTest/messaging-config.xml | 48 +
.../AdaptiveFrequencyTest/services-config.xml | 52 +
.../FrequencyStepSizeTest/error.txt | 1 +
.../FrequencyStepSizeTest/messaging-config.xml | 48 +
.../FrequencyStepSizeTest/services-config.xml | 52 +
.../MaxQueueSizeTest/error.txt | 1 +
.../MaxQueueSizeTest/messaging-config.xml | 48 +
.../MaxQueueSizeTest/services-config.xml | 81 +
.../AdaptiveServerToClient/readme.txt | 1 +
.../DestinationWithNoChannelTest/error.txt | 1 +
.../services-config.xml | 56 +
.../DestinationWithNoIDTest/error.txt | 1 +
.../DestinationWithNoIDTest/services-config.xml | 59 +
.../error.txt | 1 +
.../services-config.xml | 60 +
.../messagingService/dataTypesTest/Bean.as | 207 +
.../dataTypesTest/BigDecimalTypesTest.mxml | 179 +
.../dataTypesTest/BigIntegerTypesTest.mxml | 162 +
.../messagingService/dataTypesTest/Book.as | 52 +
.../dataTypesTest/BooleanTypesTest.mxml | 731 +
.../dataTypesTest/ByteTypesTest.mxml | 536 +
.../dataTypesTest/CharTypesTest.mxml | 514 +
.../dataTypesTest/ComplexCustomTypeTest.mxml | 141 +
.../dataTypesTest/CustomTypeTest.mxml | 380 +
.../dataTypesTest/DateTypesTest.mxml | 321 +
.../dataTypesTest/DoubleTypesTest.mxml | 675 +
.../messagingService/dataTypesTest/EnumType.as | 51 +
.../dataTypesTest/EnumTypeTest.mxml | 111 +
.../dataTypesTest/ExternalizableDate.as | 69 +
.../dataTypesTest/ExternalizableTest.mxml | 58 +
.../dataTypesTest/FloatTypesTest.mxml | 359 +
.../dataTypesTest/IntTypesTest.mxml | 468 +
.../dataTypesTest/LongTypesTest.mxml | 468 +
.../messagingService/dataTypesTest/MyFileRef.as | 26 +
.../dataTypesTest/SQLDateTypesTest.mxml | 256 +
.../dataTypesTest/ShortTypesTest.mxml | 423 +
.../dataTypesTest/StringTypesTest.mxml | 315 +
.../messagingService/dataTypesTest/SuperBook.as | 26 +
.../dataTypesTest/TestTypedObject.as | 54 +
.../dataTypesTest/bean_namespace.as | 22 +
.../dataTypesTest/messaging-config.xml | 1656 ++
.../dataTypesTest/proxy-config.xml | 433 +
.../dataTypesTest/remoting-config.xml | 396 +
.../dataTypesTest/services-config.xml | 473 +
.../jms/InvalidAcknowledgeModeTest/error.txt | 1 +
.../services-config.xml | 84 +
.../jms/InvalidDeliveryModeTest/error.txt | 1 +
.../InvalidDeliveryModeTest/services-config.xml | 84 +
.../jms/InvalidDestinationTypeTest/error.txt | 1 +
.../services-config.xml | 85 +
.../jms/InvalidMessageTypeTest/error.txt | 1 +
.../InvalidMessageTypeTest/services-config.xml | 85 +
.../jms/NoConnectionFactoryTest/error.txt | 1 +
.../NoConnectionFactoryTest/services-config.xml | 82 +
.../jms/NoJNDINameTest/error.txt | 1 +
.../jms/NoJNDINameTest/services-config.xml | 82 +
.../InvalidBufferPolicyTest/error.txt | 1 +
.../messaging-config.xml | 48 +
.../InvalidBufferPolicyTest/services-config.xml | 52 +
.../InvalidConflatePolicyTest/error.txt | 1 +
.../messaging-config.xml | 48 +
.../services-config.xml | 52 +
.../UnknownInboundPolicyTest/error.txt | 1 +
.../messaging-config.xml | 48 +
.../services-config.xml | 52 +
.../frequencies/McfGreaterthanMfTest/error.txt | 1 +
.../McfGreaterthanMfTest/messaging-config.xml | 48 +
.../McfGreaterthanMfTest/services-config.xml | 52 +
.../InvalidBufferPolicyTest/error.txt | 1 +
.../messaging-config.xml | 48 +
.../InvalidBufferPolicyTest/services-config.xml | 52 +
.../InvalidConflatePolicyTest/error.txt | 1 +
.../messaging-config.xml | 48 +
.../services-config.xml | 52 +
.../InvalidErrorPolicyTest/error.txt | 1 +
.../InvalidErrorPolicyTest/messaging-config.xml | 48 +
.../InvalidErrorPolicyTest/services-config.xml | 52 +
.../UnknownOutboundPolicyTest/error.txt | 1 +
.../messaging-config.xml | 48 +
.../services-config.xml | 52 +
.../frequencies/McfGreaterthanMfTest/error.txt | 1 +
.../McfGreaterthanMfTest/messaging-config.xml | 48 +
.../McfGreaterthanMfTest/services-config.xml | 52 +
.../validation/goodValidatorTest/error.txt | 1 +
.../goodValidatorTest/services-config.xml | 365 +
.../nonExistingValidatorTest/error.txt | 1 +
.../services-config.xml | 368 +
.../patternFilterLoggingValidatorTest/error.txt | 1 +
.../services-config.xml | 350 +
.../sameExplicitTypeValidatorTest/error.txt | 1 +
.../services-config.xml | 364 +
.../validation/sameTypeValidatorTest/error.txt | 1 +
.../sameTypeValidatorTest/services-config.xml | 367 +
.../validation/wrongTypeValidatorTest/error.txt | 1 +
.../wrongTypeValidatorTest/services-config.xml | 382 +
.../InvalidClusterMessageRoutingTest/error.txt | 1 +
.../services-config.xml | 61 +
.../InvocationExceptionTest.mxml | 108 +
.../ArgumentsInServerLogTest/error.txt | 4 +
.../remoting-config.xml | 32 +
.../services-config.xml | 49 +
.../logincommand/NoClassAttrTest/error.txt | 1 +
.../NoClassAttrTest/services-config.xml | 40 +
.../logincommand/NoServerAttrTest/error.txt | 1 +
.../NoServerAttrTest/services-config.xml | 40 +
.../securityconstraint/InvalidIdTest/error.txt | 1 +
.../InvalidIdTest/services-config.xml | 46 +
.../UndefinedConstraintTest/error.txt | 1 +
.../UndefinedConstraintTest/services-config.xml | 59 +
.../services/BadDefaultChannelTest/error.txt | 1 +
.../BadDefaultChannelTest/services-config.xml | 42 +
.../tests/services/DuplicateDefTest/error.txt | 1 +
.../DuplicateDefTest/services-config.xml | 35 +
.../DuplicateDefaultAdapterTest/error.txt | 1 +
.../services-config.xml | 41 +
.../ExternalEntityInConfigTest/error.txt | 1 +
.../services-config.xml | 43 +
.../services/IncorrectRootElementTest/error.txt | 1 +
.../messaging-config.xml | 27 +
.../services-config.xml | 34 +
.../services/InvalidAdapterIdTest/error.txt | 1 +
.../InvalidAdapterIdTest/services-config.xml | 40 +
.../InvalidDefSecConstraintTest/error.txt | 1 +
.../services-config.xml | 43 +
.../tests/services/InvalidIdTest/error.txt | 1 +
.../services/InvalidIdTest/services-config.xml | 35 +
.../tests/services/InvalidIncludeTest/error.txt | 1 +
.../InvalidIncludeTest/services-config.xml | 34 +
.../tests/services/NoClassAttrTest/error.txt | 1 +
.../NoClassAttrTest/services-config.xml | 35 +
.../StringTypesTest.mxml | 316 +
.../messaging-config.xml | 35 +
.../remoting-config.xml | 37 +
.../services-config.xml | 154 +
.../simpleMessagingTest.mxml | 264 +
.../StringTypesTest.mxml | 316 +
.../messaging-config.xml | 35 +
.../remoting-config.xml | 37 +
.../services-config.xml | 154 +
.../simpleMessagingTest.mxml | 264 +
.../tests/tokens/InvalidTokenTest/error.txt | 1 +
.../tokens/InvalidTokenTest/services-config.xml | 36 +
.../messaging-config.xml | 68 +
.../CustomUUIDGeneratorTest/services-config.xml | 72 +
.../simpleJMSMessagingTest.mxml | 266 +
.../simpleMessagingTest.mxml | 264 +
.../DuplicateUUIDTest/DuplicateUUIDTest1.mxml | 266 +
.../DuplicateUUIDTest/DuplicateUUIDTest2.mxml | 177 +
.../DuplicateUUIDTest/messaging-config.xml | 66 +
.../DuplicateUUIDTest/services-config.xml | 72 +
.../testsuites/flexunit/_seedFileEnd.txt | 5 +
.../testsuites/flexunit/_seedFileStart.txt | 42 +
.../qa-regress/testsuites/flexunit/basic.xml | 30 +
.../qa-regress/testsuites/flexunit/build.xml | 376 +
.../flexunit/src/mx/messaging/tests/AMF0Test.as | 116 +
.../flexunit/src/mx/messaging/tests/AMF3Test.as | 342 +
.../src/mx/messaging/tests/AMFChannelTest.as | 235 +
.../src/mx/messaging/tests/AllMessagingTests.as | 64 +
.../messaging/tests/Base64EncoderDecoderTest.as | 123 +
.../src/mx/messaging/tests/ChannelSetTest.as | 593 +
.../tests/ConfigurationBasedTestCase.as | 224 +
.../src/mx/messaging/tests/ConsumerTest.as | 172 +
.../messaging/tests/ConsumerWithServerTest.as | 265 +
.../mx/messaging/tests/HexEncoderDecoderTest.as | 122 +
.../src/mx/messaging/tests/MessageAgentTest.as | 255 +
.../src/mx/messaging/tests/ServerConfigTest.as | 138 +
.../messaging/tests/helpers/AMFTestResponder.as | 74 +
.../messaging/tests/helpers/CheckUnsubHelper.as | 56 +
.../tests/helpers/ConsumerPollingHelper.as | 68 +
.../messaging/tests/helpers/EqualityHelper.as | 494 +
.../messaging/tests/helpers/MockMessageAgent.as | 58 +
.../mx/messaging/tests/helpers/PollingTester.as | 87 +
.../src/mx/messaging/tests/helpers/TestEvent.as | 38 +
.../messaging/tests/helpers/TestResultEvent.as | 49 +
.../messaging/tests/helpers/TestStatusEvent.as | 49 +
.../flexunit/src/mx/rpc/tests/AllRemoteTests.as | 77 +
.../src/mx/rpc/tests/MXMLRemoteObjectTest.as | 202 +
.../src/mx/rpc/tests/RemoteObjectAsMXMLTest.as | 64 +
.../src/mx/rpc/tests/RemoteObjectTest.as | 401 +
.../src/mx/utils/tests/ObjectUtilTest.as | 249 +
.../flexunit/src/mx/utils/tests/UIDUtilTest.as | 181 +
.../messaging/Base64EncodeLargeByteArrayTest.as | 78 +
.../mx/messaging/HexEncodeLargeByteArrayTest.as | 78 +
.../flexunit/stylesheets/junit-frames.xsl | 769 +
.../flexunit/stylesheets/junit-noframes.xsl | 537 +
.../apps/qa-regress/testsuites/mxunit/build.xml | 478 +
.../mxunit/stylesheets/junit-frames.xsl | 767 +
.../mxunit/stylesheets/junit-noframes.xsl | 537 +
.../mxunit/tests/MBean/Log/LogMBeans.mxml | 232 +
.../mxunit/tests/MBean/Log/MBeanFunctions.as | 147 +
.../mxunit/tests/MBean/jmx/MBeanFunctions.as | 152 +
.../tests/MBean/jmx/MBeanServerGateway.mxml | 628 +
.../MBean/jmx/MBeanServerGateway_register.mxml | 270 +
.../testsuites/mxunit/tests/MBean/jmx/Simple.as | 28 +
.../mxunit/tests/MBean/jmx/appServer.jsp | 17 +
.../ServiceAdapterControlMBeanTest.mxml | 194 +
.../StreamingAMFEndpointMBean.mxml | 189 +
.../StreamingHTTPEndpointMBean.mxml | 190 +
.../MBean/proxyservice/HTTPDestinationTest.mxml | 268 +
.../proxyservice/ProxyServiceMBeanTest.mxml | 192 +
.../MBean/proxyservice/SOAPDestinationTest.mxml | 218 +
.../runtime/AdminConsoleDisplayRegistrar.mxml | 132 +
.../runtime/messaging/MessageBrokerControl.mxml | 244 +
.../client/FlexClientManagerControl.mxml | 166 +
.../endpoints/AMF/AMFEndpointControl.mxml | 226 +
.../endpoints/AMF/simpleMessagingTest.as | 156 +
.../endpoints/HTTP/HTTPEndpointControl.mxml | 241 +
.../endpoints/HTTP/simpleMessagingTest.as | 152 +
.../StreamingAMFEndpointControl.mxml | 191 +
.../StreamingAMF/simpleMessagingTest.as | 154 +
.../StreamingHTTPEndpointControl.mxml | 191 +
.../StreamingHTTP/simpleMessagingTest.as | 154 +
.../tests/errorhandling/roExceptionTest.mxml | 68 +
.../serviceAndDestinationMismatchTest.mxml | 131 +
.../MPI/MPIJMSMessagingTest.mxml | 310 +
.../messagingService/MPI/MPIMessagingTest.mxml | 303 +
.../amfChannelWithStreamingEndpoint.mxml | 93 +
.../tests/messagingService/TestTypedObject.as | 29 +
.../blz-300/subscribeConsumerFromClass.mxml | 70 +
.../messagingService/customAdapterTest.mxml | 285 +
.../customTypeMarhsaller/TestTypedObject.as | 28 +
.../typeMarshallerTestAMFStream.mxml | 227 +
.../typeMarshallerTestHTTPStream.mxml | 228 +
.../dynamicDestinations/basicsAMF.mxml | 289 +
.../dynamicDestinations/headersAMF.mxml | 222 +
.../invalidSubtopicsAMF.mxml | 252 +
.../dynamicDestinations/mixedSeparatorsAMF.mxml | 235 +
.../mixedSeparatorsColonSeparatorAMF.mxml | 234 +
.../securityEmployeeUserAMF.mxml | 354 +
.../securityGuestUserAMF.mxml | 353 +
.../securityManagerUserAMF.mxml | 363 +
.../securitySupervisorUserAMF.mxml | 360 +
.../subtopicsEnabledWildcardsNotAllowed.mxml | 147 +
.../subtopicsNotAllowedAMF.mxml | 153 +
...btopicsNotAllowedAllowSubtopicsFalseAMF.mxml | 152 +
.../dynamicDestinations/wildcardsAMF.mxml | 477 +
.../wildcardsColonSeparatorAMF.mxml | 478 +
.../JMSSelectorBooleanTestNegative.mxml | 177 +
.../JMSSelectorBooleanTestPositive.mxml | 156 +
.../jmsselectors/JMSSelectorInTestNegative.mxml | 178 +
.../jmsselectors/JMSSelectorInTestPositive.mxml | 157 +
.../JMSSelectorLikeTestPositive.mxml | 158 +
.../JMSSelectorMixedTestNegative.mxml | 179 +
.../JMSSelectorMixedTestPositive.mxml | 158 +
.../JMSSelectorNullNotNullTestPositive.mxml | 157 +
.../JMSSelectorNumberTestBetween.mxml | 155 +
.../JMSSelectorNumberTestNegative.mxml | 177 +
.../JMSSelectorNumberTestPositive.mxml | 157 +
.../JMSSelectorStringTestNegative.mxml | 177 +
.../JMSSelectorStringTestPositive.mxml | 157 +
.../messagingService/messagingJMSMapTest.mxml | 273 +
.../messagingJMSObjectTest.mxml | 279 +
.../messagingJMSQueueMapTest.mxml | 274 +
.../messagingJMSQueueObjectTest.mxml | 279 +
.../messagingService/messagingObjectTest.mxml | 279 +
.../messagingService/messagingTestNoProps.mxml | 264 +
...ltiTopicConsumerRemoveSubscriptionsTest.mxml | 89 +
.../multiTopicMXMLTagMessagingTest.mxml | 262 +
.../multiTopic/multiTopicMessagingTest.mxml | 267 +
.../messagingService/multipleMessagesTest.mxml | 293 +
.../priority/destinationPriorityTenTest.mxml | 283 +
.../priority/destinationPriorityZeroTest.mxml | 283 +
.../messagePriorityGrtrThanNineTest.mxml | 283 +
.../messagePriorityLessThanZeroTest.mxml | 283 +
.../priority/messagePriorityNineTest.mxml | 283 +
.../priority/messagePriorityZeroTest.mxml | 283 +
.../priority/messagingTest.mxml | 312 +
...pleMessagesDescendingDegreePriorityTest.mxml | 349 +
...agesMessageHeaderDescendingPriorityTest.mxml | 375 +
...gesProducerHeaderDescendingPriorityTest.mxml | 374 +
.../priority/priority01MessagingTest.mxml | 284 +
.../priority/priority02MessagingTest.mxml | 285 +
.../priority/priority03MessagingTest.mxml | 284 +
.../priority/priority04MessagingTest.mxml | 284 +
.../priority/priority05MessagingTest.mxml | 283 +
.../priority/priority06MessagingTest.mxml | 283 +
.../priority/priority07MessagingTest.mxml | 283 +
.../priority/priority08MessagingTest.mxml | 283 +
.../priority/priority09MessagingTest.mxml | 283 +
.../priority/priority10MessagingTest.mxml | 283 +
.../priority/priority11MessagingTest.mxml | 283 +
.../producerPriorityGrtrThanNineTest.mxml | 283 +
...essThanZeroAndHasDefaultDestSettingTest.mxml | 283 +
.../producerPriorityLessThanZeroTest.mxml | 283 +
.../priority/producerPriorityNineTest.mxml | 283 +
.../priority/producerPriorityNullTest.mxml | 283 +
.../priority/producerPriorityZeroTest.mxml | 283 +
.../messagingService/proBadDestination.mxml | 77 +
.../routedMessageListenerTest.mxml | 106 +
...hannelSetAuthenticationJMSMessagingTest.mxml | 262 +
.../ChannelSetAuthenticationMessagingTest.mxml | 241 +
...etAuthenticationMultipleLoginLogoutTest.mxml | 196 +
.../security/ChannelSetAuthenticationTest.mxml | 176 +
.../polling-amf/JMSAuthConSubscribeTest.mxml | 213 +
.../polling-amf/JMSAuthProSendTest.mxml | 214 +
.../JMSAuthSendSubscribeConstraintTest.mxml | 240 +
.../MessagingAuthConSubscribeTest.mxml | 213 +
.../polling-amf/MessagingAuthProSendTest.mxml | 199 +
...essagingAuthSendSubscribeConstraintTest.mxml | 220 +
.../MessagingAuthenticationTest.mxml | 266 +
.../MessagingAuthenticationTest2.mxml | 81 +
...MultiTopicMessagingAuthConSubscribeTest.mxml | 219 +
.../polling-http/JMSAuthConSubscribeTest.mxml | 213 +
.../polling-http/JMSAuthProSendTest.mxml | 214 +
.../JMSAuthSendSubscribeConstraintTest.mxml | 240 +
.../MessagingAuthConSubscribeTest.mxml | 213 +
.../polling-http/MessagingAuthProSendTest.mxml | 199 +
...essagingAuthSendSubscribeConstraintTest.mxml | 220 +
.../MessagingAuthenticationTest.mxml | 266 +
.../MessagingAuthenticationTest2.mxml | 81 +
...MultiTopicMessagingAuthConSubscribeTest.mxml | 219 +
.../streaming-amf/JMSAuthConSubscribeTest.mxml | 213 +
.../streaming-amf/JMSAuthProSendTest.mxml | 214 +
.../JMSAuthSendSubscribeConstraintTest.mxml | 243 +
.../MessagingAuthConSubscribeTest.mxml | 213 +
.../streaming-amf/MessagingAuthProSendTest.mxml | 214 +
...essagingAuthSendSubscribeConstraintTest.mxml | 220 +
.../MessagingAuthenticationTest.mxml | 266 +
.../MessagingAuthenticationTest2.mxml | 81 +
...MultiTopicMessagingAuthConSubscribeTest.mxml | 219 +
.../streaming-http/JMSAuthConSubscribeTest.mxml | 213 +
.../streaming-http/JMSAuthProSendTest.mxml | 214 +
.../JMSAuthSendSubscribeConstraintTest.mxml | 243 +
.../MessagingAuthConSubscribeTest.mxml | 213 +
.../MessagingAuthProSendTest.mxml | 213 +
...essagingAuthSendSubscribeConstraintTest.mxml | 220 +
.../MessagingAuthenticationTest.mxml | 266 +
.../MessagingAuthenticationTest2.mxml | 81 +
...MultiTopicMessagingAuthConSubscribeTest.mxml | 219 +
.../selectors/SelectorBooleanTestNegative.mxml | 177 +
.../selectors/SelectorBooleanTestPositive.mxml | 156 +
.../selectors/SelectorInTestNegative.mxml | 178 +
.../selectors/SelectorInTestPositive.mxml | 157 +
.../selectors/SelectorLikeTestPositive.mxml | 158 +
.../selectors/SelectorMixedTestNegative.mxml | 179 +
.../selectors/SelectorMixedTestPositive.mxml | 158 +
.../SelectorNullNotNullTestPositive.mxml | 157 +
.../selectors/SelectorNumberTestBetween.mxml | 155 +
.../selectors/SelectorNumberTestNegative.mxml | 177 +
.../selectors/SelectorNumberTestPositive.mxml | 157 +
.../selectors/SelectorStringTestNegative.mxml | 177 +
.../selectors/SelectorStringTestPositive.mxml | 157 +
.../serverPushEnumStreamingAMFTest.mxml | 236 +
.../serverPushEnumStreamingHTTPTest.mxml | 236 +
.../messagingService/serverPushEnumTest.mxml | 236 +
.../serverPushOverlappingChannelSetsTest.mxml | 198 +
.../tests/messagingService/serverPushTest.mxml | 237 +
.../serverPushWithSubtopicTest.mxml | 262 +
.../simpleJMSMessagingAsyncTest.mxml | 265 +
...leJMSMessagingConnectionCredentialsTest.mxml | 265 +
...simpleJMSMessagingDeprecatedAttribsTest.mxml | 264 +
.../simpleJMSMessagingDurableQueueTest.mxml | 264 +
.../simpleJMSMessagingDurableTest.mxml | 304 +
.../simpleJMSMessagingPreserveHeadersTest.mxml | 266 +
.../simpleJMSMessagingSyncTest.mxml | 264 +
.../simpleJMSMessagingTest.mxml | 266 +
.../simpleJMSQueueMessagingTest.mxml | 264 +
.../messagingService/simpleMessagingTest.mxml | 264 +
.../simpleMessagingTest_StreamingHTTP.mxml | 264 +
.../disconnectResubscribeJMSTest.mxml | 233 +
.../longpolling/disconnectResubscribeTest.mxml | 233 +
.../multipleDisconnectsResubscribesTest.mxml | 228 +
.../polling/disconnectResubscribeJMSTest.mxml | 233 +
.../polling/disconnectResubscribeTest.mxml | 233 +
.../multipleDisconnectsResubscribesTest.mxml | 228 +
.../streaming/disconnectResubscribeJMSTest.mxml | 233 +
.../streaming/disconnectResubscribeTest.mxml | 233 +
.../multipleDisconnectsResubscribesTest.mxml | 228 +
.../DeserializationValidatorConfigTest.mxml | 141 +
.../tests/proxyService/184631/WSTest.mxml | 116 +
.../184631/bug184631useProxyTrue.mxml | 116 +
.../tests/proxyService/184950/bug184950.mxml | 130 +
.../proxyService/202863/bug202863DocLit.mxml | 126 +
.../proxyService/202863/bug202863RpcEnc.mxml | 126 +
.../proxyService/92441/bug92441SoapFault.mxml | 120 +
.../mxunit/tests/proxyService/92441/echo.wsdl | 622 +
.../tests/proxyService/92441/echoFault.xml | 31 +
.../httpservice/MultiHeaderTest.mxml | 156 +
.../amfchannel/hsMulti_contenttype_xml.mxml | 140 +
.../httpservice/amfchannel/hs_attributes.mxml | 77 +
.../httpservice/amfchannel/hs_cancel.mxml | 61 +
.../httpservice/amfchannel/hs_channelset.mxml | 73 +
.../amfchannel/hs_contenttype_xml.mxml | 114 +
.../httpservice/amfchannel/hs_extraparams.mxml | 84 +
.../httpservice/amfchannel/hs_resultformat.mxml | 217 +
.../amfchannel/hs_send_no_request.mxml | 136 +
.../amfchannel/hs_send_with_request.mxml | 153 +
.../amfchannel/hs_xmldecode_xmlencode.mxml | 98 +
.../httpservice/bugs/171569/bug171569.mxml | 78 +
.../bugs/171569/bug171569_alternate.mxml | 91 +
.../httpservice/bugs/203212/TestCase203212.as | 55 +
.../httpservice/bugs/203212/bug203212.mxml | 96 +
.../httpservice/bugs/203359/bug203359.mxml | 82 +
.../bugs/PutAndDeleteMethodTests.mxml | 85 +
.../httpservice/bugs/sdk-11229/sdk11229.mxml | 126 +
.../httpservice/httpchannel/hs_attributes.mxml | 89 +
.../httpservice/httpchannel/hs_cancel.mxml | 96 +
.../httpservice/httpchannel/hs_channelset.mxml | 97 +
.../httpchannel/hs_contenttype_xml.mxml | 171 +
.../httpservice/httpchannel/hs_extraparams.mxml | 114 +
.../httpchannel/hs_resultformat.mxml | 265 +
.../httpchannel/hs_send_no_request.mxml | 167 +
.../httpchannel/hs_send_with_request.mxml | 188 +
.../httpchannel/hs_xmldecode_xmlencode.mxml | 118 +
.../ConstructorNegativeTest.mxml | 137 +
.../tests/remotingService/badEndpointTest.mxml | 78 +
.../tests/remotingService/dataTypes/Bean.as | 207 +
.../dataTypes/BeanRulesTest.mxml | 190 +
.../dataTypes/BigDecimalTypesTest.mxml | 258 +
.../dataTypes/BigIntegerTypesTest.mxml | 213 +
.../tests/remotingService/dataTypes/Book.as | 52 +
.../dataTypes/BooleanTypesTest.mxml | 865 +
.../dataTypes/ByteTypesTest.mxml | 571 +
.../dataTypes/CharTypesTest.mxml | 514 +
.../dataTypes/CircularReferencingTest.mxml | 143 +
.../dataTypes/ComplexCustomTypeTest.mxml | 141 +
.../dataTypes/CreateASObjectForMissingTest.mxml | 114 +
.../dataTypes/CustomTypeTest.mxml | 380 +
.../dataTypes/DateTypesTest.mxml | 352 +
.../dataTypes/DeferInstantiationTest.mxml | 114 +
.../remotingService/dataTypes/DocumentTest.mxml | 127 +
.../dataTypes/DoubleTypesTest.mxml | 747 +
.../tests/remotingService/dataTypes/EnumType.as | 51 +
.../remotingService/dataTypes/EnumTypeTest.mxml | 109 +
.../dataTypes/ExternalizableDate.as | 69 +
.../dataTypes/ExternalizableTest.mxml | 58 +
.../dataTypes/FloatTypesTest.mxml | 426 +
.../ImageSnapshot/testCaptureBitmapData.mxml | 87 +
.../ImageSnapshot/testCaptureImage.mxml | 112 +
.../ImageSnapshot/testCaptureImageJPEG.mxml | 83 +
.../testCaptureImageScaleLimitedFalse.mxml | 83 +
.../testCaptureImageScaleLimitedFalseJPEG.mxml | 85 +
.../testCaptureImageScaleLimitedTrue.mxml | 84 +
.../testCaptureImageScaleLimitedTrueJPEG.mxml | 83 +
.../ImageSnapshot/testEncodeImageAsBase64.mxml | 81 +
.../remotingService/dataTypes/IntTypesTest.mxml | 535 +
.../dataTypes/LongTypesTest.mxml | 565 +
.../remotingService/dataTypes/MapTypeTest.mxml | 67 +
.../dataTypes/MethodOverLoadingTests.mxml | 89 +
.../remotingService/dataTypes/MissingBook.as | 52 +
.../dataTypes/MissingTestTypedObject.as | 54 +
.../remotingService/dataTypes/MyFileRef.as | 26 +
.../dataTypes/NoRemoteAliasBook.as | 51 +
.../dataTypes/PropertyProxyTest.mxml | 84 +
.../remotingService/dataTypes/ReadOnlyTest.mxml | 85 +
.../dataTypes/SQLDateTypesTest.mxml | 256 +
.../dataTypes/ShortTypesTest.mxml | 475 +
.../dataTypes/StringTypesTest.mxml | 316 +
.../remotingService/dataTypes/SuperBook.as | 26 +
.../dataTypes/TestTypedObject.as | 54 +
.../dataTypes/VectorTypesTest.mxml | 219 +
.../dataTypes/amf/inheritPropsTest.mxml | 68 +
.../remotingService/dataTypes/bean_namespace.as | 22 +
.../dataTypes/http/inheritPropsTest.mxml | 68 +
.../remotingService/domainbaseEndpointTest.mxml | 79 +
.../remotingService/fault/CustomException.as | 29 +
.../fault/CustomExceptionTest.mxml | 69 +
.../fault/DestinatedClassNotFoundTest.mxml | 69 +
.../fault/InvalidMethodTest.mxml | 66 +
.../remotingService/fault/NumberOfArgsTest.mxml | 66 +
.../remotingService/fault/WrongArgTypeTest.mxml | 66 +
.../tests/remotingService/forwardToAMF.jsp | 19 +
.../mxml/ArgumentsOrderTest.mxml | 97 +
.../remotingService/mxml/BasicSyntaxTest.mxml | 76 +
.../mxml/ConcurrencyLastTest.mxml | 74 +
.../mxml/ConcurrencyMultipleTest.mxml | 59 +
.../mxml/ConcurrencyServiceLevelLastTest.mxml | 76 +
.../ConcurrencyServiceLevelMultipleTest.mxml | 59 +
.../mxml/ConcurrencyServiceLevelSingleTest.mxml | 58 +
.../mxml/ConcurrencySingleTest.mxml | 58 +
.../mxml/HttpChannelInValidateTest.mxml | 66 +
.../mxml/MakeObjectBindableTest.mxml | 145 +
.../mxml/RequestTimeoutTest.mxml | 127 +
.../mxml/ShowBusyCursorTest.mxml | 111 +
.../remotingService/relativeEndpointTest.mxml | 79 +
.../result/ResultBindableTest.mxml | 73 +
.../security/CustomAuthHttpChannelTest.mxml | 135 +
.../security/CustomAuthTest.mxml | 106 +
.../security/ExcludeMethodsTest.mxml | 113 +
.../security/IncludeMethodsTest.mxml | 259 +
.../security/IncludeMethodsWinTest.mxml | 258 +
.../security/nestedConstrainsTest.mxml | 246 +
.../FlexSessionAttributeListenerTest.mxml | 112 +
.../stateful/DifferentInstanceTest.mxml | 64 +
.../stateful/IsSameInstanceTest.mxml | 69 +
.../runtimeConfiguration/roMessageDestTest.mxml | 118 +
.../runtimeAddRemoveDestTest.mxml | 124 +
.../runtimeHTTPProxyDestTest.mxml | 92 +
.../runtimeJMSDestTest.mxml | 119 +
.../runtimeMessageDestTest.mxml | 107 +
.../runtimeRemotingDestTest.mxml | 76 +
.../runtimeSOAPProxyAdapterTest.mxml | 117 +
.../runtimeUnmanagedDestTest.mxml | 148 +
.../startupHTTPProxyDestTest.mxml | 79 +
.../startupJMSDestTest.mxml | 114 +
.../startupMessageDestTest.mxml | 114 +
.../startupRemotingDestTest.mxml | 76 +
.../startupSOAPProxyAdapterTest.mxml | 125 +
.../mixedSeparatorsColonSeparatorAMF.mxml | 248 +
.../multiTopic/multiTopicMessagingTest.mxml | 321 +
.../polling-amf/MessagingAuthProSendTest.mxml | 201 +
.../MessagingAuthConSubscribeTest.mxml | 215 +
...essagingAuthSendSubscribeConstraintTest.mxml | 220 +
.../messagingService/simpleMessagingTest.mxml | 318 +
.../remotingService/mxml/BasicSyntaxTest.mxml | 87 +
.../simpleMessagingTest_SecureAMF.mxml | 264 +
.../simpleMessagingTest_SecureHTTP.mxml | 264 +
.../amfchannel/hs_send_no_request.mxml | 163 +
.../amfchannel/hs_send_with_request.mxml | 183 +
.../httpchannel/hs_send_no_request.mxml | 167 +
.../httpchannel/hs_send_with_request.mxml | 185 +
attic/qa/build.properties | 28 +
attic/qa/build.xml | 114 +
attic/qa/features/checkintests-all.properties | 25 +
.../features/checkintests-messaging.properties | 19 +
attic/qa/features/checkintests-rpc.properties | 19 +
attic/qa/features/checkintests.properties | 19 +
attic/qa/features/common.properties | 17 +
attic/qa/features/excludes.properties | 52 +
attic/qa/features/excludes.soft.properties | 27 +
attic/qa/features/fds_approval.properties | 33 +
attic/qa/features/full.properties | 38 +
attic/qa/features/httpService.properties | 19 +
attic/qa/features/messaging.properties | 23 +
attic/qa/features/remoteObject.properties | 18 +
.../qa/features/runtimeConfiguration.properties | 17 +
attic/qa/features/spring.properties | 17 +
attic/qa/features/ssl.properties | 17 +
attic/qa/features/test.properties | 32 +
attic/qa/kick-build.txt | 1 +
attic/qa/resources/config/messaging-config.xml | 28 +
attic/qa/resources/config/proxy-config.xml | 47 +
attic/qa/resources/config/remoting-config.xml | 31 +
attic/qa/resources/config/services-config.xml | 113 +
attic/qa/resources/webtier/build.xml | 92 +
.../resources/webtier/flex_sdk_3/air-config.xml | 281 +
.../webtier/flex_sdk_3/flex-config.xml | 357 +
.../webtier/flex_sdk_3/flex-webtier-config.xml | 147 +
attic/qa/resources/webtier/flex_sdk_3/web.xml | 217 +
.../resources/webtier/flex_sdk_3/web.xml.spring | 233 +
.../resources/webtier/flex_sdk_4/air-config.xml | 403 +
.../webtier/flex_sdk_4/flex-config.xml | 440 +
.../webtier/flex_sdk_4/flex-webtier-config.xml | 147 +
attic/qa/resources/webtier/flex_sdk_4/web.xml | 204 +
.../resources/webtier/flex_sdk_4/web.xml.spring | 217 +
.../qa/src/qa/utils/mxml/MXMLCServlet.java | 299 +
attic/qa/resources/webtier/qa/web.xml | 181 +
attic/qa/resources/webtier/qa/web.xml.spring | 194 +
attic/qa/src/build.xml | 87 +
attic/qa/src/tools/ant/MergeXML.java | 63 +
attic/qa/src/utils/XMLMerge.java | 312 +
attic/readme.txt | 41 +
attic/resources/clustering/readme.txt | 36 +
.../HTTPProxyBootstrapService.java | 254 +
.../MessagingBootstrapService.java | 330 +
.../config/bootstrapservices/README.txt | 22 +
.../RemotingBootstrapService.java | 220 +
attic/resources/config/messaging-config.xml | 368 +
attic/resources/config/proxy-config.xml | 141 +
attic/resources/config/readme.txt | 25 +
attic/resources/config/remoting-config.xml | 220 +
attic/resources/config/services-config.xml | 902 +
.../fds-ajax-bridge/actionscript/FDMSBase.as | 30 +
.../fds-ajax-bridge/actionscript/FDMSBridge.as | 216 +
.../actionscript/bridge/FABridge.as | 942 +
attic/resources/fds-ajax-bridge/build.xml | 90 +
.../fds-ajax-bridge/javascript/FABridge.js | 655 +
.../fds-ajax-bridge/javascript/FDMSLib.js | 263 +
attic/resources/fds-ajax-bridge/readme.txt | 25 +
.../ClassLoggingDeserializationValidator.java | 127 +
attic/resources/security/jboss/readme.txt | 23 +
attic/resources/security/tomcat/context.xml | 24 +
attic/resources/security/tomcat/readme.txt | 9 +
attic/resources/security/websphere/readme.txt | 11 +
attic/sampledb/flexdemodb/flexdemodb.properties | 32 +
attic/sampledb/flexdemodb/flexdemodb.script | 20074 +++++++++++++++++
attic/sampledb/server.properties | 20 +
attic/sampledb/startdb.bat | 17 +
attic/sampledb/startdb.sh | 16 +
attic/sampledb/stopdb.bat | 17 +
attic/sampledb/stopdb.sh | 16 +
.../bin/catalina.bat | 287 +
.../bin/catalina.sh | 456 +
.../apache-tomcat-6.0.29-overlay/build.xml | 55 +
.../conf/Catalina/localhost/blazeds-spring.xml | 47 +
.../localhost/blazeds-spring.xml.install | 21 +
.../conf/Catalina/localhost/blazeds.xml | 47 +
.../conf/Catalina/localhost/blazeds.xml.install | 21 +
.../conf/Catalina/localhost/ds-console.xml | 22 +
.../Catalina/localhost/ds-console.xml.install | 21 +
.../conf/Catalina/localhost/qa-manual.xml | 54 +
.../conf/Catalina/localhost/qa-regress.xml | 50 +
.../conf/Catalina/localhost/samples-spring.xml | 47 +
.../localhost/samples-spring.xml.install | 21 +
.../conf/Catalina/localhost/samples.xml | 22 +
.../conf/Catalina/localhost/samples.xml.install | 21 +
.../conf/catalina.properties | 81 +
.../conf/context.xml | 33 +
.../conf/server.xml | 145 +
.../conf/tomcat-users.xml | 41 +
.../apache-tomcat-6.0.29-overlay/conf/web.xml | 1204 +
.../webapps/ROOT/WEB_INF/web.xml | 29 +
.../webapps/ROOT/index.html | 50 +
build.properties | 97 -
build.xml | 804 -
collateral/blazeds-bin-readme.htm | 270 -
collateral/blazeds-src-readme.htm | 558 -
collateral/blazeds-turnkey-readme.htm | 557 -
common/pom.xml | 45 +
.../main/java/flex/graphics/ImageSnapshot.java | 147 +
.../java/flex/messaging/LocalizedException.java | 378 +
.../config/AbstractConfigurationParser.java | 556 +
.../flex/messaging/config/AdapterSettings.java | 125 +
.../ApacheXPathClientConfigurationParser.java | 86 +
.../flex/messaging/config/ChannelSettings.java | 334 +
.../messaging/config/ClientConfiguration.java | 192 +
.../config/ClientConfigurationParser.java | 951 +
.../flex/messaging/config/ClusterSettings.java | 152 +
.../java/flex/messaging/config/ConfigMap.java | 469 +
.../config/ConfigurationConstants.java | 467 +
.../config/ConfigurationException.java | 36 +
.../config/ConfigurationFileResolver.java | 32 +
.../messaging/config/ConfigurationParser.java | 30 +
.../messaging/config/DestinationSettings.java | 188 +
.../messaging/config/FlexClientSettings.java | 134 +
.../messaging/config/LocalFileResolver.java | 203 +
.../flex/messaging/config/LoggingSettings.java | 46 +
.../messaging/config/LoginCommandSettings.java | 101 +
.../messaging/config/PropertiesSettings.java | 99 +
.../messaging/config/SecurityConstraint.java | 123 +
.../flex/messaging/config/ServiceSettings.java | 165 +
.../messaging/config/ServicesConfiguration.java | 70 +
.../messaging/config/ServicesDependencies.java | 747 +
.../flex/messaging/config/TargetSettings.java | 78 +
.../flex/messaging/config/TokenReplacer.java | 202 +
.../config/XPathClientConfigurationParser.java | 89 +
.../java/flex/messaging/log/AbstractTarget.java | 272 +
.../java/flex/messaging/log/ConsoleTarget.java | 42 +
.../flex/messaging/log/LineFormattedTarget.java | 286 +
.../src/main/java/flex/messaging/log/Log.java | 707 +
.../java/flex/messaging/log/LogCategories.java | 112 +
.../main/java/flex/messaging/log/LogEvent.java | 116 +
.../main/java/flex/messaging/log/Logger.java | 402 +
.../main/java/flex/messaging/log/Target.java | 112 +
.../flex/messaging/util/BasicPrettyPrinter.java | 164 +
.../java/flex/messaging/util/ExceptionUtil.java | 250 +
.../java/flex/messaging/util/FileUtils.java | 96 +
.../java/flex/messaging/util/LocaleUtils.java | 58 +
.../java/flex/messaging/util/ObjectTrace.java | 175 +
.../flex/messaging/util/PrettyPrintable.java | 30 +
.../java/flex/messaging/util/PrettyPrinter.java | 30 +
.../util/PropertyStringResourceLoader.java | 378 +
.../flex/messaging/util/ResourceLoader.java | 104 +
.../java/flex/messaging/util/StringUtils.java | 214 +
.../java/flex/messaging/util/UUIDUtils.java | 330 +
.../resources/flex/messaging/errors.properties | 432 +
core/pom.xml | 92 +
.../main/java/flex/management/BaseControl.java | 514 +
.../java/flex/management/BaseControlMBean.java | 55 +
.../flex/management/MBeanLifecycleManager.java | 63 +
.../flex/management/MBeanServerLocator.java | 33 +
.../management/MBeanServerLocatorFactory.java | 123 +
.../main/java/flex/management/Manageable.java | 53 +
.../flex/management/ManageableComponent.java | 421 +
.../flex/management/ManagementException.java | 30 +
.../management/PlatformMBeanServerLocator.java | 37 +
.../java/flex/management/jmx/Attribute.java | 61 +
.../flex/management/jmx/MBeanAttributeInfo.java | 94 +
.../management/jmx/MBeanConstructorInfo.java | 104 +
.../java/flex/management/jmx/MBeanInfo.java | 184 +
.../flex/management/jmx/MBeanOperationInfo.java | 117 +
.../flex/management/jmx/MBeanParameterInfo.java | 72 +
.../flex/management/jmx/MBeanServerGateway.java | 906 +
.../flex/management/jmx/ObjectInstance.java | 66 +
.../java/flex/management/jmx/ObjectName.java | 98 +
.../runtime/AdminConsoleDisplayRegistrar.java | 104 +
.../AdminConsoleDisplayRegistrarMBean.java | 33 +
.../management/runtime/AdminConsoleTypes.java | 35 +
.../runtime/messaging/DestinationControl.java | 117 +
.../messaging/DestinationControlMBean.java | 55 +
.../runtime/messaging/MessageBrokerControl.java | 294 +
.../messaging/MessageBrokerControlMBean.java | 130 +
.../messaging/MessageDestinationControl.java | 310 +
.../MessageDestinationControlMBean.java | 153 +
.../client/FlexClientManagerControl.java | 97 +
.../client/FlexClientManagerControlMBean.java | 70 +
.../messaging/endpoints/AMFEndpointControl.java | 48 +
.../endpoints/AMFEndpointControlMBean.java | 26 +
.../messaging/endpoints/EndpointControl.java | 239 +
.../endpoints/EndpointControlMBean.java | 111 +
.../endpoints/HTTPEndpointControl.java | 48 +
.../endpoints/HTTPEndpointControlMBean.java | 25 +
.../endpoints/PollingEndpointControl.java | 72 +
.../endpoints/PollingEndpointControlMBean.java | 45 +
.../endpoints/StreamingAMFEndpointControl.java | 48 +
.../StreamingAMFEndpointControlMBean.java | 26 +
.../endpoints/StreamingEndpointControl.java | 133 +
.../StreamingEndpointControlMBean.java | 76 +
.../endpoints/StreamingHTTPEndpointControl.java | 48 +
.../StreamingHTTPEndpointControlMBean.java | 26 +
.../runtime/messaging/log/LogControl.java | 147 +
.../runtime/messaging/log/LogControlMBean.java | 80 +
.../runtime/messaging/log/LogManager.java | 260 +
.../services/MessageServiceControl.java | 49 +
.../services/MessageServiceControlMBean.java | 26 +
.../services/ServiceAdapterControl.java | 85 +
.../services/ServiceAdapterControlMBean.java | 45 +
.../messaging/services/ServiceControl.java | 143 +
.../messaging/services/ServiceControlMBean.java | 57 +
.../messaging/SubscriptionManagerControl.java | 127 +
.../SubscriptionManagerControlMBean.java | 59 +
.../messaging/ThrottleManagerControl.java | 302 +
.../messaging/ThrottleManagerControlMBean.java | 177 +
.../adapters/ActionScriptAdapterControl.java | 50 +
.../ActionScriptAdapterControlMBean.java | 28 +
.../messaging/adapters/JMSAdapterControl.java | 117 +
.../adapters/JMSAdapterControlMBean.java | 83 +
.../AbstractConnectionAwareSession.java | 171 +
.../messaging/AbstractFlexSessionProvider.java | 146 +
.../flex/messaging/ConnectionAwareSession.java | 63 +
.../main/java/flex/messaging/Destination.java | 802 +
.../flex/messaging/DestructibleFlexFactory.java | 34 +
.../java/flex/messaging/FactoryDestination.java | 361 +
.../java/flex/messaging/FactoryInstance.java | 181 +
.../main/java/flex/messaging/FlexComponent.java | 48 +
.../java/flex/messaging/FlexConfigurable.java | 35 +
.../main/java/flex/messaging/FlexContext.java | 497 +
.../main/java/flex/messaging/FlexFactory.java | 89 +
.../flex/messaging/FlexRemoteCredentials.java | 93 +
.../main/java/flex/messaging/FlexSession.java | 1064 +
.../messaging/FlexSessionAttributeListener.java | 47 +
.../flex/messaging/FlexSessionBindingEvent.java | 114 +
.../messaging/FlexSessionBindingListener.java | 40 +
.../messaging/FlexSessionConnectivityEvent.java | 50 +
.../FlexSessionConnectivityListener.java | 38 +
.../flex/messaging/FlexSessionListener.java | 40 +
.../java/flex/messaging/FlexSessionManager.java | 299 +
.../java/flex/messaging/HttpFlexSession.java | 668 +
.../flex/messaging/HttpFlexSessionProvider.java | 94 +
.../main/java/flex/messaging/MessageBroker.java | 2252 ++
.../flex/messaging/MessageBrokerServlet.java | 460 +
.../main/java/flex/messaging/MessageClient.java | 1148 +
.../flex/messaging/MessageClientListener.java | 40 +
.../java/flex/messaging/MessageDestination.java | 491 +
.../java/flex/messaging/MessageException.java | 447 +
.../java/flex/messaging/MessageRoutedEvent.java | 54 +
.../flex/messaging/MessageRoutedListener.java | 35 +
.../flex/messaging/MessageRoutedNotifier.java | 120 +
core/src/main/java/flex/messaging/Server.java | 35 +
.../messaging/ServiceValidationListener.java | 30 +
.../main/java/flex/messaging/VersionInfo.java | 114 +
.../flex/messaging/client/AsyncPollHandler.java | 31 +
.../messaging/client/EndpointPushHandler.java | 79 +
.../messaging/client/EndpointPushNotifier.java | 461 +
.../java/flex/messaging/client/FlexClient.java | 2240 ++
.../client/FlexClientAttributeListener.java | 47 +
.../client/FlexClientBindingEvent.java | 115 +
.../client/FlexClientBindingListener.java | 39 +
.../messaging/client/FlexClientListener.java | 40 +
.../messaging/client/FlexClientManager.java | 519 +
.../FlexClientNotSubscribedException.java | 73 +
.../FlexClientOutboundQueueProcessor.java | 345 +
.../java/flex/messaging/client/FlushResult.java | 117 +
.../client/OutboundQueueThrottleManager.java | 269 +
.../flex/messaging/client/PollFlushResult.java | 97 +
.../flex/messaging/client/PollWaitListener.java | 40 +
.../messaging/client/UserAgentSettings.java | 258 +
.../messaging/cluster/BroadcastHandler.java | 45 +
.../java/flex/messaging/cluster/Cluster.java | 239 +
.../messaging/cluster/ClusterException.java | 31 +
.../flex/messaging/cluster/ClusterManager.java | 673 +
.../cluster/ClusterMembershipListener.java | 138 +
.../flex/messaging/cluster/ClusterNode.java | 172 +
.../messaging/cluster/RemoveNodeListener.java | 35 +
.../ApacheXPathServerConfigurationParser.java | 88 +
.../config/ClasspathResourceResolver.java | 49 +
.../messaging/config/ConfigurationManager.java | 40 +
.../flex/messaging/config/FactorySettings.java | 81 +
.../config/FlexConfigurationManager.java | 317 +
.../messaging/config/MessageFilterSettings.java | 99 +
.../config/MessagingConfiguration.java | 1001 +
.../flex/messaging/config/NetworkSettings.java | 163 +
.../flex/messaging/config/SecuritySettings.java | 103 +
.../config/ServerConfigurationParser.java | 1920 ++
.../flex/messaging/config/ServerSettings.java | 231 +
.../config/ServletResourceResolver.java | 156 +
.../messaging/config/SharedServerSettings.java | 65 +
.../flex/messaging/config/SystemSettings.java | 300 +
.../flex/messaging/config/ThrottleSettings.java | 373 +
.../messaging/config/ValidatorSettings.java | 68 +
.../config/XPathServerConfigurationParser.java | 93 +
.../flex/messaging/endpoints/AMFEndpoint.java | 152 +
.../messaging/endpoints/AbstractEndpoint.java | 1511 ++
.../messaging/endpoints/BaseHTTPEndpoint.java | 636 +
.../endpoints/BasePollingHTTPEndpoint.java | 603 +
.../endpoints/BaseStreamingHTTPEndpoint.java | 1225 +
.../endpoints/DuplicateSessionException.java | 81 +
.../java/flex/messaging/endpoints/Endpoint.java | 188 +
.../flex/messaging/endpoints/Endpoint2.java | 37 +
.../flex/messaging/endpoints/HTTPEndpoint.java | 185 +
.../messaging/endpoints/SecureAMFEndpoint.java | 64 +
.../messaging/endpoints/SecureHTTPEndpoint.java | 64 +
.../endpoints/SecureStreamingAMFEndpoint.java | 64 +
.../endpoints/SecureStreamingHTTPEndpoint.java | 64 +
.../endpoints/StreamingAMFEndpoint.java | 247 +
.../endpoints/StreamingHTTPEndpoint.java | 239 +
.../flex/messaging/endpoints/amf/AMFFilter.java | 51 +
.../endpoints/amf/BatchProcessFilter.java | 71 +
.../messaging/endpoints/amf/LegacyFilter.java | 337 +
.../endpoints/amf/MessageBrokerFilter.java | 180 +
.../endpoints/amf/SerializationFilter.java | 480 +
.../messaging/endpoints/amf/SessionFilter.java | 81 +
.../flex/messaging/factories/JavaFactory.java | 296 +
.../factories/JavaFactoryInstance.java | 146 +
.../java/flex/messaging/io/AbstractProxy.java | 294 +
.../java/flex/messaging/io/ArrayCollection.java | 165 +
.../main/java/flex/messaging/io/ArrayList.java | 44 +
.../main/java/flex/messaging/io/BeanProxy.java | 936 +
.../main/java/flex/messaging/io/ClassAlias.java | 29 +
.../flex/messaging/io/ClassAliasRegistry.java | 98 +
.../java/flex/messaging/io/DictionaryProxy.java | 110 +
.../flex/messaging/io/ManagedObjectProxy.java | 74 +
.../main/java/flex/messaging/io/MapProxy.java | 219 +
.../flex/messaging/io/MessageDeserializer.java | 37 +
.../flex/messaging/io/MessageIOConstants.java | 54 +
.../flex/messaging/io/MessageSerializer.java | 37 +
.../java/flex/messaging/io/ObjectProxy.java | 71 +
.../java/flex/messaging/io/PageableRowSet.java | 91 +
.../flex/messaging/io/PageableRowSetProxy.java | 155 +
.../java/flex/messaging/io/PagedRowSet.java | 361 +
.../java/flex/messaging/io/PropertyProxy.java | 282 +
.../messaging/io/PropertyProxyRegistry.java | 336 +
.../io/RecoverableSerializationException.java | 35 +
.../flex/messaging/io/SerializationContext.java | 297 +
.../messaging/io/SerializationDescriptor.java | 70 +
.../messaging/io/SerializationException.java | 43 +
.../flex/messaging/io/SerializationProxy.java | 115 +
.../java/flex/messaging/io/StatusInfoProxy.java | 295 +
.../java/flex/messaging/io/ThrowableProxy.java | 38 +
.../java/flex/messaging/io/TypeMarshaller.java | 43 +
.../messaging/io/TypeMarshallingContext.java | 241 +
.../flex/messaging/io/UnknownTypeException.java | 30 +
.../java/flex/messaging/io/amf/ASObject.java | 114 +
.../flex/messaging/io/amf/AbstractAmfInput.java | 366 +
.../messaging/io/amf/AbstractAmfOutput.java | 177 +
.../flex/messaging/io/amf/ActionContext.java | 237 +
.../flex/messaging/io/amf/ActionMessage.java | 107 +
.../messaging/io/amf/ActionMessageInput.java | 103 +
.../messaging/io/amf/ActionMessageOutput.java | 116 +
.../java/flex/messaging/io/amf/Amf0Input.java | 541 +
.../java/flex/messaging/io/amf/Amf0Output.java | 874 +
.../java/flex/messaging/io/amf/Amf3Input.java | 1045 +
.../java/flex/messaging/io/amf/Amf3Output.java | 1376 ++
.../java/flex/messaging/io/amf/Amf3Types.java | 65 +
.../main/java/flex/messaging/io/amf/AmfIO.java | 168 +
.../io/amf/AmfMessageDeserializer.java | 202 +
.../messaging/io/amf/AmfMessageSerializer.java | 159 +
.../java/flex/messaging/io/amf/AmfTrace.java | 577 +
.../java/flex/messaging/io/amf/AmfTypes.java | 45 +
.../java/flex/messaging/io/amf/MessageBody.java | 116 +
.../flex/messaging/io/amf/MessageHeader.java | 76 +
.../flex/messaging/io/amf/SerializedObject.java | 98 +
.../java/flex/messaging/io/amf/TraitsInfo.java | 170 +
.../messaging/io/amf/client/AMFConnection.java | 926 +
.../io/amf/client/AMFHeaderProcessor.java | 35 +
.../exceptions/ClientStatusException.java | 127 +
.../exceptions/ServerStatusException.java | 94 +
.../io/amf/translator/ASTranslator.java | 78 +
.../io/amf/translator/TranslationException.java | 44 +
.../translator/decoder/ActionScriptDecoder.java | 128 +
.../io/amf/translator/decoder/ArrayDecoder.java | 167 +
.../amf/translator/decoder/BooleanDecoder.java | 56 +
.../amf/translator/decoder/CalendarDecoder.java | 67 +
.../translator/decoder/CharacterDecoder.java | 63 +
.../translator/decoder/CollectionDecoder.java | 163 +
.../io/amf/translator/decoder/DateDecoder.java | 120 +
.../amf/translator/decoder/DecoderFactory.java | 378 +
.../io/amf/translator/decoder/EnumDecoder.java | 71 +
.../io/amf/translator/decoder/MapDecoder.java | 101 +
.../amf/translator/decoder/NativeDecoder.java | 30 +
.../io/amf/translator/decoder/NullDecoder.java | 28 +
.../amf/translator/decoder/NumberDecoder.java | 150 +
.../decoder/ReferenceAwareArrayDecoder.java | 116 +
.../decoder/ReferenceAwareCalendarDecoder.java | 44 +
.../ReferenceAwareCollectionDecoder.java | 113 +
.../decoder/ReferenceAwareDateDecoder.java | 44 +
.../decoder/ReferenceAwareMapDecoder.java | 81 +
.../ReferenceAwareTypedObjectDecoder.java | 105 +
.../amf/translator/decoder/StringDecoder.java | 55 +
.../translator/decoder/TypedObjectDecoder.java | 126 +
.../java/flex/messaging/io/amfx/AmfxInput.java | 1389 ++
.../io/amfx/AmfxMessageDeserializer.java | 339 +
.../io/amfx/AmfxMessageSerializer.java | 198 +
.../java/flex/messaging/io/amfx/AmfxOutput.java | 1086 +
.../java/flex/messaging/io/amfx/AmfxTypes.java | 99 +
.../java/flex/messaging/log/HTTPRequestLog.java | 281 +
.../log/LoggingHttpServletRequestWrapper.java | 187 +
.../flex/messaging/log/ServletLogTarget.java | 76 +
.../messaging/messages/AbstractMessage.java | 718 +
.../messaging/messages/AcknowledgeMessage.java | 97 +
.../messages/AcknowledgeMessageExt.java | 60 +
.../flex/messaging/messages/AsyncMessage.java | 169 +
.../messaging/messages/AsyncMessageExt.java | 58 +
.../messaging/messages/BatchableMessage.java | 32 +
.../flex/messaging/messages/CommandMessage.java | 399 +
.../messaging/messages/CommandMessageExt.java | 58 +
.../flex/messaging/messages/ErrorMessage.java | 89 +
.../flex/messaging/messages/HTTPMessage.java | 137 +
.../java/flex/messaging/messages/Message.java | 235 +
.../messages/MessagePerformanceInfo.java | 193 +
.../messages/MessagePerformanceUtils.java | 415 +
.../flex/messaging/messages/RPCMessage.java | 82 +
.../messaging/messages/RemotingMessage.java | 132 +
.../flex/messaging/messages/SOAPMessage.java | 53 +
.../flex/messaging/messages/SmallMessage.java | 37 +
.../security/AppServerLoginCommand.java | 98 +
.../flex/messaging/security/LoginCommand.java | 78 +
.../messaging/security/LoginCommandExt.java | 44 +
.../flex/messaging/security/LoginManager.java | 403 +
.../messaging/security/MessagingSecurity.java | 51 +
.../messaging/security/PrincipalConverter.java | 34 +
.../messaging/security/SecurityException.java | 163 +
.../services/AbstractBootstrapService.java | 333 +
.../messaging/services/AbstractService.java | 753 +
.../messaging/services/AuthenticationEvent.java | 155 +
.../services/AuthenticationListener.java | 37 +
.../services/AuthenticationService.java | 268 +
.../flex/messaging/services/MessageService.java | 1246 +
.../java/flex/messaging/services/Service.java | 216 +
.../flex/messaging/services/ServiceAdapter.java | 312 +
.../messaging/services/ServiceException.java | 82 +
.../services/messaging/MessageFrequency.java | 109 +
.../services/messaging/MessagingConstants.java | 59 +
.../services/messaging/RemoteMessageClient.java | 68 +
.../messaging/RemoteSubscriptionManager.java | 200 +
.../services/messaging/SubscriptionManager.java | 915 +
.../messaging/services/messaging/Subtopic.java | 297 +
.../services/messaging/ThrottleManager.java | 556 +
.../messaging/adapters/ActionScriptAdapter.java | 107 +
.../adapters/AsyncMessageReceiver.java | 78 +
.../services/messaging/adapters/JMSAdapter.java | 1114 +
.../messaging/adapters/JMSConfigConstants.java | 116 +
.../messaging/adapters/JMSConsumer.java | 464 +
.../messaging/adapters/JMSExceptionEvent.java | 53 +
.../adapters/JMSExceptionListener.java | 34 +
.../messaging/adapters/JMSMessageEvent.java | 54 +
.../messaging/adapters/JMSMessageListener.java | 34 +
.../messaging/adapters/JMSProducer.java | 336 +
.../services/messaging/adapters/JMSProxy.java | 394 +
.../messaging/adapters/JMSQueueConsumer.java | 96 +
.../messaging/adapters/JMSQueueProducer.java | 132 +
.../messaging/adapters/JMSSettings.java | 602 +
.../messaging/adapters/JMSTopicConsumer.java | 313 +
.../messaging/adapters/JMSTopicProducer.java | 129 +
.../messaging/adapters/MessageReceiver.java | 39 +
.../messaging/adapters/MessagingAdapter.java | 229 +
.../MessagingSecurityConstraintManager.java | 162 +
.../messaging/adapters/SyncMessageReceiver.java | 201 +
.../messaging/selector/JMSSelector.java | 120 +
.../selector/JMSSelectorException.java | 35 +
.../main/java/flex/messaging/util/Assert.java | 64 +
.../messaging/util/AssertionFailedError.java | 35 +
.../main/java/flex/messaging/util/Base64.java | 233 +
.../java/flex/messaging/util/ClassUtil.java | 359 +
core/src/main/java/flex/messaging/util/Diag.jsl | 34 +
.../java/flex/messaging/util/DoubleUtil.java | 31 +
.../java/flex/messaging/util/DoubleUtil.jsl | 27 +
core/src/main/java/flex/messaging/util/Hex.java | 143 +
.../java/flex/messaging/util/MethodKey.java | 80 +
.../java/flex/messaging/util/MethodMatcher.java | 515 +
.../flex/messaging/util/RedeployManager.java | 296 +
.../messaging/util/SettingsReplaceUtil.java | 369 +
.../messaging/util/TimeoutAbstractObject.java | 177 +
.../flex/messaging/util/TimeoutCapable.java | 64 +
.../flex/messaging/util/TimeoutManager.java | 231 +
.../messaging/util/ToStringPrettyPrinter.java | 232 +
.../main/java/flex/messaging/util/Trace.java | 105 +
.../java/flex/messaging/util/URLDecoder.java | 125 +
.../java/flex/messaging/util/URLEncoder.java | 155 +
.../flex/messaging/util/URLEncoderUtil.java | 42 +
.../java/flex/messaging/util/URLEncoderUtil.jsl | 40 +
.../java/flex/messaging/util/UUIDGenerator.java | 31 +
.../flex/messaging/util/UserAgentManager.java | 207 +
.../java/flex/messaging/util/WatchedObject.java | 72 +
.../main/java/flex/messaging/util/XMLUtil.java | 149 +
.../concurrent/DefaultThreadPoolExecutor.java | 160 +
.../messaging/util/concurrent/Executor.java | 59 +
.../util/concurrent/FailedExecutionHandler.java | 37 +
.../ClassDeserializationValidator.java | 337 +
.../validators/DeserializationValidator.java | 56 +
development/IDEA/projects/java/BlazeDS.ipr | 404 -
development/IDEA/projects/java/blazeds.xml | 88 -
development/IDEA/projects/java/common.iml | 224 -
development/IDEA/projects/java/core.iml | 263 -
development/IDEA/projects/java/opt.iml | 329 -
development/IDEA/projects/java/proxy.iml | 235 -
development/IDEA/projects/java/remoting.iml | 216 -
.../flex/3.0/framework/.actionScriptProperties | 35 -
.../flex/3.0/framework/.flexLibProperties | 30 -
.../projects/flex/3.0/framework/.project | 73 -
.../flex/3.0/rpc/.actionScriptProperties | 38 -
.../projects/flex/3.0/rpc/.flexLibProperties | 28 -
.../eclipse/projects/flex/3.0/rpc/.project | 69 -
.../projects/java/blazeds-common/.classpath | 25 -
.../projects/java/blazeds-common/.project | 52 -
.../projects/java/blazeds-core/.classpath | 31 -
.../eclipse/projects/java/blazeds-core/.project | 52 -
.../projects/java/blazeds-opt/.classpath | 41 -
.../eclipse/projects/java/blazeds-opt/.project | 129 -
.../projects/java/blazeds-proxy/.classpath | 28 -
.../projects/java/blazeds-proxy/.project | 47 -
.../projects/java/blazeds-remoting/.classpath | 26 -
.../projects/java/blazeds-remoting/.project | 47 -
.../blazeds-team.war/.actionScriptProperties | 32 -
.../projects/java/blazeds-team.war/.classpath | 30 -
.../java/blazeds-team.war/.flexProperties | 20 -
.../projects/java/blazeds-team.war/.project | 49 -
development/eclipse/projects/java/formatter.xml | 269 -
development/eclipse/projects/readme.txt | 116 -
downloads.xml | 645 -
frameworks/local-swcs/FlexSDK3/empty.txt | 0
frameworks/local-swcs/FlexSDK4/empty.txt | 0
frameworks/local-swcs/readme.txt | 36 -
kick-build.txt | 2 -
modules/LICENSE | 203 -
modules/NOTICE | 9 -
modules/README | 151 -
modules/RELEASE_NOTES | 33 -
modules/common/build.xml | 101 -
modules/common/pom.xml | 59 -
.../common/src/flex/graphics/ImageSnapshot.java | 147 -
.../common/src/flex/graphics/package-info.java | 18 -
.../src/flex/messaging/LocalizedException.java | 378 -
.../config/AbstractConfigurationParser.java | 556 -
.../flex/messaging/config/AdapterSettings.java | 125 -
.../ApacheXPathClientConfigurationParser.java | 86 -
.../flex/messaging/config/ChannelSettings.java | 334 -
.../messaging/config/ClientConfiguration.java | 192 -
.../config/ClientConfigurationParser.java | 951 -
.../flex/messaging/config/ClusterSettings.java | 152 -
.../src/flex/messaging/config/ConfigMap.java | 469 -
.../config/ConfigurationConstants.java | 467 -
.../config/ConfigurationException.java | 36 -
.../config/ConfigurationFileResolver.java | 32 -
.../messaging/config/ConfigurationParser.java | 30 -
.../messaging/config/DestinationSettings.java | 188 -
.../messaging/config/FlexClientSettings.java | 134 -
.../messaging/config/LocalFileResolver.java | 203 -
.../flex/messaging/config/LoggingSettings.java | 46 -
.../messaging/config/LoginCommandSettings.java | 101 -
.../messaging/config/PropertiesSettings.java | 99 -
.../messaging/config/SecurityConstraint.java | 123 -
.../flex/messaging/config/ServiceSettings.java | 165 -
.../messaging/config/ServicesConfiguration.java | 70 -
.../messaging/config/ServicesDependencies.java | 747 -
.../flex/messaging/config/TargetSettings.java | 78 -
.../flex/messaging/config/TokenReplacer.java | 202 -
.../config/XPathClientConfigurationParser.java | 89 -
.../common/src/flex/messaging/errors.properties | 432 -
.../src/flex/messaging/log/AbstractTarget.java | 272 -
.../src/flex/messaging/log/ConsoleTarget.java | 42 -
.../flex/messaging/log/LineFormattedTarget.java | 286 -
modules/common/src/flex/messaging/log/Log.java | 707 -
.../src/flex/messaging/log/LogCategories.java | 112 -
.../common/src/flex/messaging/log/LogEvent.java | 116 -
.../common/src/flex/messaging/log/Logger.java | 402 -
.../common/src/flex/messaging/log/Target.java | 112 -
.../flex/messaging/util/BasicPrettyPrinter.java | 164 -
.../src/flex/messaging/util/ExceptionUtil.java | 250 -
.../src/flex/messaging/util/FileUtils.java | 96 -
.../src/flex/messaging/util/LocaleUtils.java | 58 -
.../src/flex/messaging/util/ObjectTrace.java | 175 -
.../flex/messaging/util/PrettyPrintable.java | 30 -
.../src/flex/messaging/util/PrettyPrinter.java | 30 -
.../util/PropertyStringResourceLoader.java | 378 -
.../src/flex/messaging/util/ResourceLoader.java | 104 -
.../src/flex/messaging/util/StringUtils.java | 214 -
.../src/flex/messaging/util/UUIDUtils.java | 330 -
modules/core/AdobeInfo.xml | 24 -
modules/core/build.xml | 158 -
modules/core/pom.xml | 94 -
.../core/src/flex/management/BaseControl.java | 514 -
.../src/flex/management/BaseControlMBean.java | 55 -
.../flex/management/MBeanLifecycleManager.java | 63 -
.../src/flex/management/MBeanServerLocator.java | 33 -
.../management/MBeanServerLocatorFactory.java | 123 -
.../core/src/flex/management/Manageable.java | 53 -
.../flex/management/ManageableComponent.java | 421 -
.../flex/management/ManagementException.java | 30 -
.../management/PlatformMBeanServerLocator.java | 37 -
.../core/src/flex/management/jmx/Attribute.java | 61 -
.../flex/management/jmx/MBeanAttributeInfo.java | 94 -
.../management/jmx/MBeanConstructorInfo.java | 104 -
.../core/src/flex/management/jmx/MBeanInfo.java | 184 -
.../flex/management/jmx/MBeanOperationInfo.java | 117 -
.../flex/management/jmx/MBeanParameterInfo.java | 72 -
.../flex/management/jmx/MBeanServerGateway.java | 906 -
.../src/flex/management/jmx/ObjectInstance.java | 66 -
.../src/flex/management/jmx/ObjectName.java | 98 -
.../src/flex/management/jmx/package-info.java | 17 -
.../core/src/flex/management/package-info.java | 17 -
.../runtime/AdminConsoleDisplayRegistrar.java | 104 -
.../AdminConsoleDisplayRegistrarMBean.java | 33 -
.../management/runtime/AdminConsoleTypes.java | 35 -
.../runtime/messaging/DestinationControl.java | 117 -
.../messaging/DestinationControlMBean.java | 55 -
.../runtime/messaging/MessageBrokerControl.java | 294 -
.../messaging/MessageBrokerControlMBean.java | 130 -
.../messaging/MessageDestinationControl.java | 310 -
.../MessageDestinationControlMBean.java | 153 -
.../client/FlexClientManagerControl.java | 97 -
.../client/FlexClientManagerControlMBean.java | 70 -
.../runtime/messaging/client/package-info.java | 17 -
.../messaging/endpoints/AMFEndpointControl.java | 48 -
.../endpoints/AMFEndpointControlMBean.java | 26 -
.../messaging/endpoints/EndpointControl.java | 239 -
.../endpoints/EndpointControlMBean.java | 111 -
.../endpoints/HTTPEndpointControl.java | 48 -
.../endpoints/HTTPEndpointControlMBean.java | 25 -
.../endpoints/PollingEndpointControl.java | 72 -
.../endpoints/PollingEndpointControlMBean.java | 45 -
.../endpoints/StreamingAMFEndpointControl.java | 48 -
.../StreamingAMFEndpointControlMBean.java | 26 -
.../endpoints/StreamingEndpointControl.java | 133 -
.../StreamingEndpointControlMBean.java | 76 -
.../endpoints/StreamingHTTPEndpointControl.java | 48 -
.../StreamingHTTPEndpointControlMBean.java | 26 -
.../messaging/endpoints/package-info.java | 17 -
.../runtime/messaging/log/LogControl.java | 147 -
.../runtime/messaging/log/LogControlMBean.java | 80 -
.../runtime/messaging/log/LogManager.java | 260 -
.../runtime/messaging/log/package-info.java | 18 -
.../runtime/messaging/package-info.java | 17 -
.../services/MessageServiceControl.java | 49 -
.../services/MessageServiceControlMBean.java | 26 -
.../services/ServiceAdapterControl.java | 85 -
.../services/ServiceAdapterControlMBean.java | 45 -
.../messaging/services/ServiceControl.java | 143 -
.../messaging/services/ServiceControlMBean.java | 57 -
.../messaging/SubscriptionManagerControl.java | 127 -
.../SubscriptionManagerControlMBean.java | 59 -
.../messaging/ThrottleManagerControl.java | 302 -
.../messaging/ThrottleManagerControlMBean.java | 177 -
.../adapters/ActionScriptAdapterControl.java | 50 -
.../ActionScriptAdapterControlMBean.java | 28 -
.../messaging/adapters/JMSAdapterControl.java | 117 -
.../adapters/JMSAdapterControlMBean.java | 83 -
.../messaging/adapters/package-info.java | 17 -
.../services/messaging/package-info.java | 18 -
.../messaging/services/package-info.java | 18 -
.../flex/management/runtime/package-info.java | 17 -
.../AbstractConnectionAwareSession.java | 171 -
.../messaging/AbstractFlexSessionProvider.java | 146 -
.../flex/messaging/ConnectionAwareSession.java | 63 -
.../core/src/flex/messaging/Destination.java | 802 -
.../flex/messaging/DestructibleFlexFactory.java | 34 -
.../src/flex/messaging/FactoryDestination.java | 361 -
.../src/flex/messaging/FactoryInstance.java | 181 -
.../core/src/flex/messaging/FlexComponent.java | 48 -
.../src/flex/messaging/FlexConfigurable.java | 35 -
.../core/src/flex/messaging/FlexContext.java | 497 -
.../core/src/flex/messaging/FlexFactory.java | 89 -
.../flex/messaging/FlexRemoteCredentials.java | 93 -
.../core/src/flex/messaging/FlexSession.java | 1064 -
.../messaging/FlexSessionAttributeListener.java | 47 -
.../flex/messaging/FlexSessionBindingEvent.java | 114 -
.../messaging/FlexSessionBindingListener.java | 40 -
.../messaging/FlexSessionConnectivityEvent.java | 50 -
.../FlexSessionConnectivityListener.java | 38 -
.../src/flex/messaging/FlexSessionListener.java | 40 -
.../src/flex/messaging/FlexSessionManager.java | 299 -
.../src/flex/messaging/HttpFlexSession.java | 668 -
.../flex/messaging/HttpFlexSessionProvider.java | 94 -
.../core/src/flex/messaging/MessageBroker.java | 2252 --
.../flex/messaging/MessageBrokerServlet.java | 460 -
.../core/src/flex/messaging/MessageClient.java | 1148 -
.../flex/messaging/MessageClientListener.java | 40 -
.../src/flex/messaging/MessageDestination.java | 491 -
.../src/flex/messaging/MessageException.java | 447 -
.../src/flex/messaging/MessageRoutedEvent.java | 54 -
.../flex/messaging/MessageRoutedListener.java | 35 -
.../flex/messaging/MessageRoutedNotifier.java | 120 -
modules/core/src/flex/messaging/Server.java | 35 -
.../messaging/ServiceValidationListener.java | 30 -
.../core/src/flex/messaging/VersionInfo.java | 114 -
.../flex/messaging/client/AsyncPollHandler.java | 31 -
.../messaging/client/EndpointPushHandler.java | 79 -
.../messaging/client/EndpointPushNotifier.java | 461 -
.../src/flex/messaging/client/FlexClient.java | 2240 --
.../client/FlexClientAttributeListener.java | 47 -
.../client/FlexClientBindingEvent.java | 115 -
.../client/FlexClientBindingListener.java | 39 -
.../messaging/client/FlexClientListener.java | 40 -
.../messaging/client/FlexClientManager.java | 519 -
.../FlexClientNotSubscribedException.java | 73 -
.../FlexClientOutboundQueueProcessor.java | 345 -
.../src/flex/messaging/client/FlushResult.java | 117 -
.../client/OutboundQueueThrottleManager.java | 269 -
.../flex/messaging/client/PollFlushResult.java | 97 -
.../flex/messaging/client/PollWaitListener.java | 40 -
.../messaging/client/UserAgentSettings.java | 258 -
.../src/flex/messaging/client/package-info.java | 18 -
.../messaging/cluster/BroadcastHandler.java | 45 -
.../src/flex/messaging/cluster/Cluster.java | 239 -
.../messaging/cluster/ClusterException.java | 31 -
.../flex/messaging/cluster/ClusterManager.java | 673 -
.../cluster/ClusterMembershipListener.java | 138 -
.../src/flex/messaging/cluster/ClusterNode.java | 172 -
.../messaging/cluster/RemoveNodeListener.java | 35 -
.../flex/messaging/cluster/package-info.java | 19 -
.../ApacheXPathServerConfigurationParser.java | 88 -
.../config/ClasspathResourceResolver.java | 49 -
.../messaging/config/ConfigurationManager.java | 40 -
.../flex/messaging/config/FactorySettings.java | 81 -
.../config/FlexConfigurationManager.java | 317 -
.../messaging/config/MessageFilterSettings.java | 99 -
.../config/MessagingConfiguration.java | 1001 -
.../flex/messaging/config/NetworkSettings.java | 163 -
.../flex/messaging/config/SecuritySettings.java | 103 -
.../config/ServerConfigurationParser.java | 1920 --
.../flex/messaging/config/ServerSettings.java | 231 -
.../config/ServletResourceResolver.java | 156 -
.../messaging/config/SharedServerSettings.java | 65 -
.../flex/messaging/config/SystemSettings.java | 300 -
.../flex/messaging/config/ThrottleSettings.java | 373 -
.../messaging/config/ValidatorSettings.java | 68 -
.../config/XPathServerConfigurationParser.java | 93 -
.../src/flex/messaging/config/package-info.java | 18 -
.../flex/messaging/endpoints/AMFEndpoint.java | 152 -
.../messaging/endpoints/AbstractEndpoint.java | 1511 --
.../messaging/endpoints/BaseHTTPEndpoint.java | 636 -
.../endpoints/BasePollingHTTPEndpoint.java | 603 -
.../endpoints/BaseStreamingHTTPEndpoint.java | 1225 -
.../endpoints/DuplicateSessionException.java | 81 -
.../src/flex/messaging/endpoints/Endpoint.java | 188 -
.../src/flex/messaging/endpoints/Endpoint2.java | 37 -
.../flex/messaging/endpoints/HTTPEndpoint.java | 185 -
.../messaging/endpoints/SecureAMFEndpoint.java | 64 -
.../messaging/endpoints/SecureHTTPEndpoint.java | 64 -
.../endpoints/SecureStreamingAMFEndpoint.java | 64 -
.../endpoints/SecureStreamingHTTPEndpoint.java | 64 -
.../endpoints/StreamingAMFEndpoint.java | 247 -
.../endpoints/StreamingHTTPEndpoint.java | 239 -
.../flex/messaging/endpoints/amf/AMFFilter.java | 51 -
.../endpoints/amf/BatchProcessFilter.java | 71 -
.../messaging/endpoints/amf/LegacyFilter.java | 337 -
.../endpoints/amf/MessageBrokerFilter.java | 180 -
.../endpoints/amf/SerializationFilter.java | 480 -
.../messaging/endpoints/amf/SessionFilter.java | 81 -
.../messaging/endpoints/amf/package-info.java | 18 -
.../flex/messaging/endpoints/package-info.java | 17 -
.../flex/messaging/factories/JavaFactory.java | 296 -
.../factories/JavaFactoryInstance.java | 146 -
.../flex/messaging/factories/package-info.java | 18 -
.../src/flex/messaging/io/AbstractProxy.java | 294 -
.../src/flex/messaging/io/ArrayCollection.java | 165 -
.../core/src/flex/messaging/io/ArrayList.java | 44 -
.../core/src/flex/messaging/io/BeanProxy.java | 936 -
.../core/src/flex/messaging/io/ClassAlias.java | 29 -
.../flex/messaging/io/ClassAliasRegistry.java | 98 -
.../src/flex/messaging/io/DictionaryProxy.java | 110 -
.../flex/messaging/io/ManagedObjectProxy.java | 74 -
.../core/src/flex/messaging/io/MapProxy.java | 219 -
.../flex/messaging/io/MessageDeserializer.java | 37 -
.../flex/messaging/io/MessageIOConstants.java | 54 -
.../flex/messaging/io/MessageSerializer.java | 37 -
.../core/src/flex/messaging/io/ObjectProxy.java | 71 -
.../src/flex/messaging/io/PageableRowSet.java | 91 -
.../flex/messaging/io/PageableRowSetProxy.java | 155 -
.../core/src/flex/messaging/io/PagedRowSet.java | 361 -
.../src/flex/messaging/io/PropertyProxy.java | 282 -
.../messaging/io/PropertyProxyRegistry.java | 336 -
.../io/RecoverableSerializationException.java | 35 -
.../flex/messaging/io/SerializationContext.java | 297 -
.../messaging/io/SerializationDescriptor.java | 70 -
.../messaging/io/SerializationException.java | 43 -
.../flex/messaging/io/SerializationProxy.java | 115 -
.../src/flex/messaging/io/StatusInfoProxy.java | 295 -
.../src/flex/messaging/io/ThrowableProxy.java | 38 -
.../src/flex/messaging/io/TypeMarshaller.java | 43 -
.../messaging/io/TypeMarshallingContext.java | 241 -
.../flex/messaging/io/UnknownTypeException.java | 30 -
.../src/flex/messaging/io/amf/ASObject.java | 114 -
.../flex/messaging/io/amf/AbstractAmfInput.java | 366 -
.../messaging/io/amf/AbstractAmfOutput.java | 177 -
.../flex/messaging/io/amf/ActionContext.java | 237 -
.../flex/messaging/io/amf/ActionMessage.java | 107 -
.../messaging/io/amf/ActionMessageInput.java | 103 -
.../messaging/io/amf/ActionMessageOutput.java | 116 -
.../src/flex/messaging/io/amf/Amf0Input.java | 541 -
.../src/flex/messaging/io/amf/Amf0Output.java | 874 -
.../src/flex/messaging/io/amf/Amf3Input.java | 1045 -
.../src/flex/messaging/io/amf/Amf3Output.java | 1376 --
.../src/flex/messaging/io/amf/Amf3Types.java | 65 -
.../core/src/flex/messaging/io/amf/AmfIO.java | 168 -
.../io/amf/AmfMessageDeserializer.java | 202 -
.../messaging/io/amf/AmfMessageSerializer.java | 159 -
.../src/flex/messaging/io/amf/AmfTrace.java | 577 -
.../src/flex/messaging/io/amf/AmfTypes.java | 45 -
.../src/flex/messaging/io/amf/MessageBody.java | 116 -
.../flex/messaging/io/amf/MessageHeader.java | 76 -
.../flex/messaging/io/amf/SerializedObject.java | 98 -
.../src/flex/messaging/io/amf/TraitsInfo.java | 170 -
.../messaging/io/amf/client/AMFConnection.java | 926 -
.../io/amf/client/AMFHeaderProcessor.java | 35 -
.../exceptions/ClientStatusException.java | 127 -
.../exceptions/ServerStatusException.java | 94 -
.../io/amf/client/exceptions/package-info.java | 18 -
.../messaging/io/amf/client/package-info.java | 18 -
.../src/flex/messaging/io/amf/package-info.java | 18 -
.../io/amf/translator/ASTranslator.java | 78 -
.../io/amf/translator/TranslationException.java | 44 -
.../translator/decoder/ActionScriptDecoder.java | 128 -
.../io/amf/translator/decoder/ArrayDecoder.java | 167 -
.../amf/translator/decoder/BooleanDecoder.java | 56 -
.../amf/translator/decoder/CalendarDecoder.java | 67 -
.../translator/decoder/CharacterDecoder.java | 63 -
.../translator/decoder/CollectionDecoder.java | 163 -
.../io/amf/translator/decoder/DateDecoder.java | 120 -
.../amf/translator/decoder/DecoderFactory.java | 378 -
.../io/amf/translator/decoder/EnumDecoder.java | 71 -
.../io/amf/translator/decoder/MapDecoder.java | 101 -
.../amf/translator/decoder/NativeDecoder.java | 30 -
.../io/amf/translator/decoder/NullDecoder.java | 28 -
.../amf/translator/decoder/NumberDecoder.java | 150 -
.../decoder/ReferenceAwareArrayDecoder.java | 116 -
.../decoder/ReferenceAwareCalendarDecoder.java | 44 -
.../ReferenceAwareCollectionDecoder.java | 113 -
.../decoder/ReferenceAwareDateDecoder.java | 44 -
.../decoder/ReferenceAwareMapDecoder.java | 81 -
.../ReferenceAwareTypedObjectDecoder.java | 105 -
.../amf/translator/decoder/StringDecoder.java | 55 -
.../translator/decoder/TypedObjectDecoder.java | 126 -
.../io/amf/translator/decoder/package-info.java | 18 -
.../io/amf/translator/package-info.java | 18 -
.../src/flex/messaging/io/amfx/AmfxInput.java | 1389 --
.../io/amfx/AmfxMessageDeserializer.java | 339 -
.../io/amfx/AmfxMessageSerializer.java | 198 -
.../src/flex/messaging/io/amfx/AmfxOutput.java | 1086 -
.../src/flex/messaging/io/amfx/AmfxTypes.java | 99 -
.../flex/messaging/io/amfx/package-info.java | 18 -
.../src/flex/messaging/io/package-info.java | 18 -
.../src/flex/messaging/log/HTTPRequestLog.java | 281 -
.../log/LoggingHttpServletRequestWrapper.java | 187 -
.../flex/messaging/log/ServletLogTarget.java | 76 -
.../src/flex/messaging/log/package-info.java | 18 -
.../messaging/messages/AbstractMessage.java | 718 -
.../messaging/messages/AcknowledgeMessage.java | 97 -
.../messages/AcknowledgeMessageExt.java | 60 -
.../flex/messaging/messages/AsyncMessage.java | 169 -
.../messaging/messages/AsyncMessageExt.java | 58 -
.../messaging/messages/BatchableMessage.java | 32 -
.../flex/messaging/messages/CommandMessage.java | 399 -
.../messaging/messages/CommandMessageExt.java | 58 -
.../flex/messaging/messages/ErrorMessage.java | 89 -
.../flex/messaging/messages/HTTPMessage.java | 137 -
.../src/flex/messaging/messages/Message.java | 235 -
.../messages/MessagePerformanceInfo.java | 193 -
.../messages/MessagePerformanceUtils.java | 415 -
.../src/flex/messaging/messages/RPCMessage.java | 82 -
.../messaging/messages/RemotingMessage.java | 132 -
.../flex/messaging/messages/SOAPMessage.java | 53 -
.../flex/messaging/messages/SmallMessage.java | 37 -
.../flex/messaging/messages/package-info.java | 18 -
.../core/src/flex/messaging/package-info.java | 18 -
.../security/AppServerLoginCommand.java | 98 -
.../flex/messaging/security/LoginCommand.java | 78 -
.../messaging/security/LoginCommandExt.java | 44 -
.../flex/messaging/security/LoginManager.java | 403 -
.../messaging/security/MessagingSecurity.java | 51 -
.../messaging/security/PrincipalConverter.java | 34 -
.../messaging/security/SecurityException.java | 163 -
.../flex/messaging/security/package-info.java | 17 -
.../services/AbstractBootstrapService.java | 333 -
.../messaging/services/AbstractService.java | 753 -
.../messaging/services/AuthenticationEvent.java | 155 -
.../services/AuthenticationListener.java | 37 -
.../services/AuthenticationService.java | 268 -
.../flex/messaging/services/MessageService.java | 1246 -
.../src/flex/messaging/services/Service.java | 216 -
.../flex/messaging/services/ServiceAdapter.java | 312 -
.../messaging/services/ServiceException.java | 82 -
.../services/messaging/MessageFrequency.java | 109 -
.../services/messaging/MessagingConstants.java | 59 -
.../services/messaging/RemoteMessageClient.java | 68 -
.../messaging/RemoteSubscriptionManager.java | 200 -
.../services/messaging/SubscriptionManager.java | 915 -
.../messaging/services/messaging/Subtopic.java | 297 -
.../services/messaging/ThrottleManager.java | 556 -
.../messaging/adapters/ActionScriptAdapter.java | 107 -
.../adapters/AsyncMessageReceiver.java | 78 -
.../services/messaging/adapters/JMSAdapter.java | 1114 -
.../messaging/adapters/JMSConfigConstants.java | 116 -
.../messaging/adapters/JMSConsumer.java | 464 -
.../messaging/adapters/JMSExceptionEvent.java | 53 -
.../adapters/JMSExceptionListener.java | 34 -
.../messaging/adapters/JMSMessageEvent.java | 54 -
.../messaging/adapters/JMSMessageListener.java | 34 -
.../messaging/adapters/JMSProducer.java | 336 -
.../services/messaging/adapters/JMSProxy.java | 394 -
.../messaging/adapters/JMSQueueConsumer.java | 96 -
.../messaging/adapters/JMSQueueProducer.java | 132 -
.../messaging/adapters/JMSSettings.java | 602 -
.../messaging/adapters/JMSTopicConsumer.java | 313 -
.../messaging/adapters/JMSTopicProducer.java | 129 -
.../messaging/adapters/MessageReceiver.java | 39 -
.../messaging/adapters/MessagingAdapter.java | 229 -
.../MessagingSecurityConstraintManager.java | 162 -
.../messaging/adapters/SyncMessageReceiver.java | 201 -
.../messaging/adapters/package-info.java | 17 -
.../services/messaging/package-info.java | 17 -
.../messaging/selector/JMSSelector.java | 120 -
.../selector/JMSSelectorException.java | 35 -
.../messaging/selector/package-info.java | 17 -
.../flex/messaging/services/package-info.java | 17 -
.../core/src/flex/messaging/util/Assert.java | 64 -
.../messaging/util/AssertionFailedError.java | 35 -
.../core/src/flex/messaging/util/Base64.java | 233 -
.../core/src/flex/messaging/util/ClassUtil.java | 359 -
modules/core/src/flex/messaging/util/Diag.jsl | 34 -
.../src/flex/messaging/util/DoubleUtil.java | 31 -
.../core/src/flex/messaging/util/DoubleUtil.jsl | 27 -
modules/core/src/flex/messaging/util/Hex.java | 143 -
.../core/src/flex/messaging/util/MethodKey.java | 80 -
.../src/flex/messaging/util/MethodMatcher.java | 515 -
.../flex/messaging/util/RedeployManager.java | 296 -
.../messaging/util/SettingsReplaceUtil.java | 369 -
.../messaging/util/TimeoutAbstractObject.java | 177 -
.../src/flex/messaging/util/TimeoutCapable.java | 64 -
.../src/flex/messaging/util/TimeoutManager.java | 231 -
.../messaging/util/ToStringPrettyPrinter.java | 232 -
modules/core/src/flex/messaging/util/Trace.java | 105 -
.../src/flex/messaging/util/URLDecoder.java | 125 -
.../src/flex/messaging/util/URLEncoder.java | 155 -
.../src/flex/messaging/util/URLEncoderUtil.java | 42 -
.../src/flex/messaging/util/URLEncoderUtil.jsl | 40 -
.../src/flex/messaging/util/UUIDGenerator.java | 31 -
.../flex/messaging/util/UserAgentManager.java | 207 -
.../src/flex/messaging/util/WatchedObject.java | 72 -
.../core/src/flex/messaging/util/XMLUtil.java | 149 -
.../concurrent/DefaultThreadPoolExecutor.java | 160 -
.../messaging/util/concurrent/Executor.java | 59 -
.../util/concurrent/FailedExecutionHandler.java | 37 -
.../messaging/util/concurrent/package-info.java | 18 -
.../src/flex/messaging/util/package-info.java | 17 -
.../ClassDeserializationValidator.java | 337 -
.../validators/DeserializationValidator.java | 56 -
.../flex/messaging/validators/package-info.java | 18 -
modules/opt/build.xml | 344 -
modules/opt/pom.xml | 92 -
modules/opt/poms/jrun/pom.xml | 49 -
modules/opt/poms/oracle/pom.xml | 55 -
modules/opt/poms/tomcat4/pom.xml | 49 -
modules/opt/poms/tomcat6/pom.xml | 55 -
modules/opt/poms/tomcat7/pom.xml | 56 -
modules/opt/poms/weblogic/pom.xml | 62 -
modules/opt/poms/websphere/pom.xml | 62 -
.../messaging/security/OracleLoginCommand.java | 93 -
.../flex/messaging/security/OracleUser.java | 118 -
.../flex/messaging/vendors.properties | 53 -
.../flex/messaging/security/Tomcat7Valve.java | 313 -
.../flex/messaging/security/TomcatLogin.java | 71 -
.../messaging/security/TomcatLoginCommand.java | 124 -
.../messaging/security/TomcatLoginHolder.java | 63 -
.../flex/messaging/security/TomcatValve.java | 275 -
.../messaging/security/TomcatValve4150.java | 268 -
.../messaging/security/tomcat-descriptor.xml | 67 -
.../security/WeblogicLoginCommand.java | 239 -
.../management/WebSphereMBeanServerLocator.java | 86 -
.../security/WebSphereLoginCommand.java | 273 -
.../AsynchBeansWorkManagerExecutor.java | 231 -
modules/pom.xml | 155 -
modules/proxy/build.xml | 92 -
modules/proxy/pom.xml | 63 -
.../services/HTTPProxyServiceControl.java | 54 -
.../services/HTTPProxyServiceControlMBean.java | 25 -
.../services/http/HTTPProxyAdapterControl.java | 55 -
.../http/HTTPProxyAdapterControlMBean.java | 29 -
.../http/HTTPProxyDestinationControl.java | 203 -
.../http/HTTPProxyDestinationControlMBean.java | 95 -
.../services/http/SOAPProxyAdapterControl.java | 53 -
.../http/SOAPProxyAdapterControlMBean.java | 28 -
.../messaging/services/http/package-info.java | 18 -
.../messaging/services/HTTPProxyService.java | 362 -
.../services/http/ExternalProxySettings.java | 182 -
.../http/HTTPConnectionManagerSettings.java | 332 -
.../services/http/HTTPProxyAdapter.java | 777 -
.../services/http/HTTPProxyDestination.java | 500 -
.../http/HostConfigurationSettings.java | 251 -
.../services/http/ProtocolFactory.java | 46 -
.../services/http/SOAPProxyAdapter.java | 114 -
.../EasySSLProtocolSocketFactory.java | 226 -
.../http/httpclient/EasyX509TrustManager.java | 180 -
.../services/http/httpclient/FlexGetMethod.java | 61 -
.../http/httpclient/FlexPostMethod.java | 61 -
.../services/http/httpclient/package-info.java | 18 -
.../messaging/services/http/package-info.java | 18 -
.../services/http/proxy/AccessFilter.java | 59 -
.../services/http/proxy/CookieInfo.java | 56 -
.../services/http/proxy/ErrorFilter.java | 86 -
.../services/http/proxy/ProxyConstants.java | 48 -
.../services/http/proxy/ProxyContext.java | 310 -
.../services/http/proxy/ProxyContextFilter.java | 219 -
.../services/http/proxy/ProxyException.java | 56 -
.../services/http/proxy/ProxyFilter.java | 47 -
.../services/http/proxy/ProxyUtil.java | 38 -
.../services/http/proxy/RequestFilter.java | 685 -
.../services/http/proxy/RequestUtil.java | 135 -
.../services/http/proxy/ResponseFilter.java | 426 -
.../services/http/proxy/ResponseUtil.java | 70 -
.../services/http/proxy/SecurityFilter.java | 270 -
.../services/http/proxy/SharedProxyContext.java | 138 -
.../messaging/services/http/proxy/Target.java | 109 -
.../services/http/proxy/package-info.java | 18 -
modules/remoting/build.xml | 84 -
modules/remoting/pom.xml | 50 -
.../services/RemotingServiceControl.java | 49 -
.../services/RemotingServiceControlMBean.java | 26 -
.../remoting/RemotingDestinationControl.java | 143 -
.../RemotingDestinationControlMBean.java | 53 -
.../remoting/adapters/JavaAdapterControl.java | 49 -
.../adapters/JavaAdapterControlMBean.java | 28 -
.../remoting/adapters/package-info.java | 18 -
.../services/remoting/package-info.java | 18 -
.../messaging/services/RemotingService.java | 268 -
.../services/remoting/PageableRowSetCache.java | 135 -
.../services/remoting/RemotingDestination.java | 177 -
.../services/remoting/adapters/JavaAdapter.java | 586 -
.../adapters/NoSuchMethodException.java | 38 -
.../adapters/NoSuchServiceException.java | 38 -
.../remoting/adapters/RemotingMethod.java | 95 -
.../remoting/adapters/package-info.java | 18 -
.../services/remoting/package-info.java | 18 -
modules/sdk/build.xml | 230 -
modules/src/assembly/assemble-gz.xml | 38 -
modules/src/assembly/assemble-zip.xml | 38 -
modules/testsuite/pom.xml | 84 -
.../test/java/amfclient/ClientCustomType.java | 45 -
.../java/flex/messaging/DestinationTest.java | 335 -
.../java/flex/messaging/MessageBrokerTest.java | 351 -
.../messaging/client/FlexClientManagerTest.java | 125 -
.../cluster/SerializationProxyTest.java | 64 -
.../config/ChannelSettingsParseUriTest.java | 197 -
.../config/ConfigurationConfirmation.java | 544 -
.../config/ConfigurationParserTest.java | 200 -
.../messaging/config/ThrottleSettingsTest.java | 182 -
.../java/flex/messaging/config/services/1a.xml | 37 -
.../java/flex/messaging/config/services/1b.xml | 63 -
.../java/flex/messaging/config/services/1c.xml | 61 -
.../java/flex/messaging/config/services/1d.xml | 93 -
.../java/flex/messaging/config/services/1e.xml | 50 -
.../config/services/1e_adapter_include.xml | 27 -
.../config/services/1e_channel_include.xml | 29 -
.../config/services/1e_constraint_include.xml | 32 -
.../config/services/1e_destination_include.xml | 26 -
.../java/flex/messaging/config/services/1f.xml | 34 -
.../config/services/1f_service_include.xml | 40 -
.../java/flex/messaging/config/services/1g.xml | 26 -
.../java/flex/messaging/config/services/1h.xml | 52 -
.../java/flex/messaging/config/services/1i.xml | 55 -
.../java/flex/messaging/config/services/1j.xml | 40 -
.../messaging/config/services/Confirm1a.java | 54 -
.../messaging/config/services/Confirm1b.java | 87 -
.../messaging/config/services/Confirm1c.java | 99 -
.../messaging/config/services/Confirm1d.java | 112 -
.../messaging/config/services/Confirm1e.java | 41 -
.../messaging/config/services/Confirm1f.java | 39 -
.../messaging/config/services/Confirm1g.java | 46 -
.../messaging/config/services/Confirm1h.java | 46 -
.../messaging/config/services/Confirm1i.java | 41 -
.../messaging/config/services/Confirm1j.java | 39 -
.../services/adapters/1i_adapter_include.xml | 25 -
.../services/channels/1i_channel_include.xml | 27 -
.../constraints/1i_constraint_include.xml | 30 -
.../destinations/1i_destination_include.xml | 29 -
.../services/services/1i_service_include.xml | 42 -
.../messaging/io/amf/AmfDeserializerTest.java | 154 -
.../flex/messaging/io/amf/MessageGenerator.java | 392 -
.../io/amf/client/AMFConnectionTest.java | 787 -
.../io/amf/client/AMFDataTypeTest.java | 486 -
.../amf/translator/HashReferenceTableTest.java | 279 -
.../translator/StrictReferenceTableTest.java | 151 -
.../AmfDeserializationValidatorTest.java | 165 -
.../io/amfx/AmfxSerializationTest.java | 302 -
.../io/amfx/DeserializationConfirmation.java | 520 -
.../messaging/io/amfx/amfx_tag/Confirm1a.java | 42 -
.../messaging/io/amfx/amfx_tag/Confirm1b.java | 54 -
.../messaging/io/amfx/amfx_tag/Confirm1c.java | 43 -
.../messaging/io/amfx/array_tag/Confirm2a.java | 59 -
.../messaging/io/amfx/array_tag/Confirm2b.java | 67 -
.../messaging/io/amfx/array_tag/Confirm2c.java | 62 -
.../messaging/io/amfx/array_tag/Confirm2d.java | 65 -
.../messaging/io/amfx/array_tag/Confirm2e.java | 76 -
.../messaging/io/amfx/array_tag/Confirm2f.java | 96 -
.../messaging/io/amfx/array_tag/Confirm2g.java | 53 -
.../messaging/io/amfx/array_tag/Confirm2h.java | 54 -
.../messaging/io/amfx/array_tag/Confirm2i.java | 74 -
.../messaging/io/amfx/array_tag/Confirm2j.java | 43 -
.../messaging/io/amfx/array_tag/Confirm2k.java | 43 -
.../messaging/io/amfx/array_tag/Confirm2l.java | 44 -
.../messaging/io/amfx/body_tag/Confirm3a.java | 45 -
.../messaging/io/amfx/body_tag/Confirm3b.java | 46 -
.../messaging/io/amfx/body_tag/Confirm3c.java | 66 -
.../messaging/io/amfx/body_tag/Confirm3d.java | 43 -
.../messaging/io/amfx/bytes_tag/Confirm16a.java | 53 -
.../messaging/io/amfx/date_tag/Confirm4a.java | 48 -
.../messaging/io/amfx/date_tag/Confirm4b.java | 54 -
.../messaging/io/amfx/date_tag/Confirm4c.java | 57 -
.../messaging/io/amfx/date_tag/Confirm4d.java | 57 -
.../messaging/io/amfx/date_tag/Confirm4e.java | 84 -
.../messaging/io/amfx/date_tag/Confirm4f.java | 48 -
.../messaging/io/amfx/date_tag/Confirm4g.java | 43 -
.../messaging/io/amfx/double_tag/Confirm5a.java | 46 -
.../messaging/io/amfx/double_tag/Confirm5b.java | 61 -
.../messaging/io/amfx/double_tag/Confirm5c.java | 55 -
.../messaging/io/amfx/double_tag/Confirm5d.java | 60 -
.../messaging/io/amfx/double_tag/Confirm5e.java | 43 -
.../messaging/io/amfx/double_tag/Confirm5f.java | 43 -
.../messaging/io/amfx/double_tag/Confirm5g.java | 43 -
.../messaging/io/amfx/double_tag/Confirm5h.java | 43 -
.../messaging/io/amfx/false_tag/Confirm6a.java | 46 -
.../messaging/io/amfx/false_tag/Confirm6b.java | 52 -
.../messaging/io/amfx/false_tag/Confirm6c.java | 55 -
.../messaging/io/amfx/false_tag/Confirm6d.java | 56 -
.../messaging/io/amfx/header_tag/Confirm7a.java | 46 -
.../messaging/io/amfx/header_tag/Confirm7b.java | 48 -
.../messaging/io/amfx/header_tag/Confirm7c.java | 72 -
.../messaging/io/amfx/header_tag/Confirm7d.java | 43 -
.../messaging/io/amfx/int_tag/Confirm8a.java | 46 -
.../messaging/io/amfx/int_tag/Confirm8b.java | 53 -
.../messaging/io/amfx/int_tag/Confirm8c.java | 55 -
.../messaging/io/amfx/int_tag/Confirm8d.java | 60 -
.../messaging/io/amfx/int_tag/Confirm8e.java | 43 -
.../messaging/io/amfx/int_tag/Confirm8f.java | 43 -
.../messaging/io/amfx/int_tag/Confirm8g.java | 43 -
.../messaging/io/amfx/null_tag/Confirm9a.java | 46 -
.../messaging/io/amfx/null_tag/Confirm9b.java | 52 -
.../messaging/io/amfx/null_tag/Confirm9c.java | 55 -
.../messaging/io/amfx/null_tag/Confirm9d.java | 56 -
.../io/amfx/object_tag/Confirm10a.java | 57 -
.../io/amfx/object_tag/Confirm10b.java | 74 -
.../io/amfx/object_tag/Confirm10c.java | 101 -
.../io/amfx/object_tag/Confirm10d.java | 93 -
.../io/amfx/string_tag/Confirm11a.java | 46 -
.../io/amfx/string_tag/Confirm11b.java | 52 -
.../io/amfx/string_tag/Confirm11c.java | 55 -
.../io/amfx/string_tag/Confirm11d.java | 60 -
.../io/amfx/string_tag/Confirm11e.java | 82 -
.../io/amfx/string_tag/Confirm11f.java | 94 -
.../io/amfx/string_tag/Confirm11g.java | 55 -
.../io/amfx/string_tag/Confirm11h.java | 43 -
.../io/amfx/string_tag/Confirm11i.java | 46 -
.../io/amfx/string_tag/Confirm11j.java | 46 -
.../io/amfx/testtypes/Bleu_dAuvergne.java | 51 -
.../messaging/io/amfx/testtypes/Cheese.java | 33 -
.../messaging/io/amfx/testtypes/CowCheese.java | 34 -
.../messaging/io/amfx/testtypes/EweCheese.java | 33 -
.../messaging/io/amfx/testtypes/Roquefort.java | 50 -
.../io/amfx/traits_tag/Confirm12a.java | 55 -
.../io/amfx/traits_tag/Confirm12b.java | 71 -
.../messaging/io/amfx/true_tag/Confirm13a.java | 46 -
.../messaging/io/amfx/true_tag/Confirm13b.java | 52 -
.../messaging/io/amfx/true_tag/Confirm13c.java | 55 -
.../messaging/io/amfx/true_tag/Confirm13d.java | 56 -
.../io/amfx/undefined_tag/Confirm14a.java | 46 -
.../io/amfx/undefined_tag/Confirm14b.java | 52 -
.../io/amfx/undefined_tag/Confirm14c.java | 55 -
.../io/amfx/undefined_tag/Confirm14d.java | 56 -
.../messaging/io/amfx/xml_tag/Confirm15a.java | 65 -
.../messaging/io/amfx/xml_tag/Confirm15b.java | 64 -
.../test/java/flex/messaging/log/LogTest.java | 178 -
.../java/flex/messaging/log/LoggerTest.java | 165 -
.../java/flex/messaging/log/TestingTarget.java | 47 -
.../BlazeDsXmlProcessingXXEVulnerability.java | 66 -
.../messaging/services/AbstractServiceTest.java | 367 -
.../messaging/services/ServiceAdapterTest.java | 120 -
.../services/http/SettingsReplaceUtilTest.java | 229 -
.../services/messaging/SubtopicTest.java | 119 -
.../java/flex/messaging/util/Basae64Test.java | 80 -
.../test/java/flex/messaging/util/HexTest.java | 88 -
.../java/flex/messaging/util/TestServer.java | 132 -
.../java/flex/messaging/util/UUIDUtilTest.java | 162 -
.../DefaultThreadPoolExecutorTest.java | 167 -
.../macromedia/qa/metrics/AbstractDatabase.java | 545 -
.../test/java/macromedia/qa/metrics/Build.java | 120 -
.../test/java/macromedia/qa/metrics/Metric.java | 128 -
.../macromedia/qa/metrics/MetricsDatabase.java | 237 -
.../macromedia/qa/metrics/MetricsManager.java | 166 -
.../java/macromedia/qa/metrics/Persistable.java | 178 -
.../java/macromedia/qa/metrics/Project.java | 119 -
.../test/java/macromedia/qa/metrics/Run.java | 143 -
.../test/java/macromedia/qa/metrics/Value.java | 134 -
.../test/java/macromedia/util/UnitTrace.java | 29 -
.../java/regression/DoNotDeleteUntilFile.txt | 0
.../amfclient/AMFConnectionTestService.java | 122 -
.../remoting/amfclient/ServerCustomType.java | 45 -
.../resources/WEB-INF/flex/remoting-config.xml | 58 -
.../resources/WEB-INF/flex/services-config.xml | 49 -
.../src/test/resources/amf_request.xml | 92 -
.../resources/flex/messaging/io/amfx/amfx.xsd | 139 -
.../flex/messaging/io/amfx/amfx_tag/1a.xml | 20 -
.../flex/messaging/io/amfx/amfx_tag/1b.xml | 27 -
.../flex/messaging/io/amfx/amfx_tag/1c.xml | 24 -
.../flex/messaging/io/amfx/array_tag/2a.xml | 30 -
.../flex/messaging/io/amfx/array_tag/2b.xml | 39 -
.../flex/messaging/io/amfx/array_tag/2c.xml | 33 -
.../flex/messaging/io/amfx/array_tag/2d.xml | 43 -
.../flex/messaging/io/amfx/array_tag/2e.xml | 26 -
.../flex/messaging/io/amfx/array_tag/2f.xml | 40 -
.../flex/messaging/io/amfx/array_tag/2g.xml | 28 -
.../flex/messaging/io/amfx/array_tag/2h.xml | 29 -
.../flex/messaging/io/amfx/array_tag/2i.xml | 42 -
.../flex/messaging/io/amfx/array_tag/2j.xml | 24 -
.../flex/messaging/io/amfx/array_tag/2k.xml | 28 -
.../flex/messaging/io/amfx/array_tag/2l.xml | 28 -
.../flex/messaging/io/amfx/body_tag/3a.xml | 22 -
.../flex/messaging/io/amfx/body_tag/3b.xml | 24 -
.../flex/messaging/io/amfx/body_tag/3c.xml | 44 -
.../flex/messaging/io/amfx/body_tag/3d.xml | 25 -
.../flex/messaging/io/amfx/bytes_tag/16a.xml | 24 -
.../flex/messaging/io/amfx/date_tag/4a.xml | 24 -
.../flex/messaging/io/amfx/date_tag/4b.xml | 31 -
.../flex/messaging/io/amfx/date_tag/4c.xml | 28 -
.../flex/messaging/io/amfx/date_tag/4d.xml | 71 -
.../flex/messaging/io/amfx/date_tag/4e.xml | 28 -
.../flex/messaging/io/amfx/date_tag/4f.xml | 24 -
.../flex/messaging/io/amfx/date_tag/4g.xml | 24 -
.../flex/messaging/io/amfx/double_tag/5a.xml | 24 -
.../flex/messaging/io/amfx/double_tag/5b.xml | 70 -
.../flex/messaging/io/amfx/double_tag/5c.xml | 37 -
.../flex/messaging/io/amfx/double_tag/5d.xml | 71 -
.../flex/messaging/io/amfx/double_tag/5e.xml | 24 -
.../flex/messaging/io/amfx/double_tag/5f.xml | 24 -
.../flex/messaging/io/amfx/double_tag/5g.xml | 24 -
.../flex/messaging/io/amfx/double_tag/5h.xml | 24 -
.../flex/messaging/io/amfx/false_tag/6a.xml | 24 -
.../flex/messaging/io/amfx/false_tag/6b.xml | 31 -
.../flex/messaging/io/amfx/false_tag/6c.xml | 28 -
.../flex/messaging/io/amfx/false_tag/6d.xml | 36 -
.../flex/messaging/io/amfx/header_tag/7a.xml | 22 -
.../flex/messaging/io/amfx/header_tag/7b.xml | 24 -
.../flex/messaging/io/amfx/header_tag/7c.xml | 41 -
.../flex/messaging/io/amfx/header_tag/7d.xml | 25 -
.../flex/messaging/io/amfx/int_tag/8a.xml | 24 -
.../flex/messaging/io/amfx/int_tag/8b.xml | 38 -
.../flex/messaging/io/amfx/int_tag/8c.xml | 37 -
.../flex/messaging/io/amfx/int_tag/8d.xml | 71 -
.../flex/messaging/io/amfx/int_tag/8e.xml | 24 -
.../flex/messaging/io/amfx/int_tag/8f.xml | 24 -
.../flex/messaging/io/amfx/int_tag/8g.xml | 24 -
.../flex/messaging/io/amfx/null_tag/9a.xml | 24 -
.../flex/messaging/io/amfx/null_tag/9b.xml | 31 -
.../flex/messaging/io/amfx/null_tag/9c.xml | 28 -
.../flex/messaging/io/amfx/null_tag/9d.xml | 36 -
.../flex/messaging/io/amfx/object_tag/10a.xml | 41 -
.../flex/messaging/io/amfx/object_tag/10b.xml | 56 -
.../flex/messaging/io/amfx/object_tag/10c.xml | 49 -
.../flex/messaging/io/amfx/object_tag/10d.xml | 38 -
.../flex/messaging/io/amfx/string_tag/11a.xml | 24 -
.../flex/messaging/io/amfx/string_tag/11b.xml | 31 -
.../flex/messaging/io/amfx/string_tag/11c.xml | 28 -
.../flex/messaging/io/amfx/string_tag/11d.xml | 71 -
.../flex/messaging/io/amfx/string_tag/11e.xml | 28 -
.../flex/messaging/io/amfx/string_tag/11f.xml | 30 -
.../flex/messaging/io/amfx/string_tag/11g.xml | 28 -
.../flex/messaging/io/amfx/string_tag/11h.xml | 31 -
.../flex/messaging/io/amfx/string_tag/11i.xml | 24 -
.../flex/messaging/io/amfx/string_tag/11j.xml | 24 -
.../flex/messaging/io/amfx/traits_tag/12a.xml | 35 -
.../flex/messaging/io/amfx/traits_tag/12b.xml | 47 -
.../flex/messaging/io/amfx/true_tag/13a.xml | 24 -
.../flex/messaging/io/amfx/true_tag/13b.xml | 31 -
.../flex/messaging/io/amfx/true_tag/13c.xml | 28 -
.../flex/messaging/io/amfx/true_tag/13d.xml | 36 -
.../messaging/io/amfx/undefined_tag/14a.xml | 24 -
.../messaging/io/amfx/undefined_tag/14b.xml | 31 -
.../messaging/io/amfx/undefined_tag/14c.xml | 28 -
.../messaging/io/amfx/undefined_tag/14d.xml | 36 -
.../flex/messaging/io/amfx/xml_tag/15a.xml | 30 -
.../flex/messaging/io/amfx/xml_tag/15b.xml | 30 -
opt/pom.xml | 91 +
opt/poms/jrun/pom.xml | 49 +
opt/poms/oracle/pom.xml | 55 +
opt/poms/tomcat4/pom.xml | 49 +
opt/poms/tomcat6/pom.xml | 55 +
opt/poms/tomcat7/pom.xml | 56 +
opt/poms/weblogic/pom.xml | 62 +
opt/poms/websphere/pom.xml | 62 +
.../messaging/security/OracleLoginCommand.java | 93 +
.../flex/messaging/security/OracleUser.java | 118 +
.../flex/messaging/vendors.properties | 53 +
.../flex/messaging/security/Tomcat7Valve.java | 313 +
.../flex/messaging/security/TomcatLogin.java | 71 +
.../messaging/security/TomcatLoginCommand.java | 124 +
.../messaging/security/TomcatLoginHolder.java | 63 +
.../flex/messaging/security/TomcatValve.java | 275 +
.../messaging/security/TomcatValve4150.java | 268 +
.../messaging/security/tomcat-descriptor.xml | 67 +
.../security/WeblogicLoginCommand.java | 239 +
.../management/WebSphereMBeanServerLocator.java | 86 +
.../security/WebSphereLoginCommand.java | 273 +
.../AsynchBeansWorkManagerExecutor.java | 231 +
pom.xml | 93 +
proxy/pom.xml | 58 +
.../services/HTTPProxyServiceControl.java | 54 +
.../services/HTTPProxyServiceControlMBean.java | 25 +
.../services/http/HTTPProxyAdapterControl.java | 55 +
.../http/HTTPProxyAdapterControlMBean.java | 29 +
.../http/HTTPProxyDestinationControl.java | 203 +
.../http/HTTPProxyDestinationControlMBean.java | 95 +
.../services/http/SOAPProxyAdapterControl.java | 53 +
.../http/SOAPProxyAdapterControlMBean.java | 28 +
.../messaging/services/HTTPProxyService.java | 362 +
.../services/http/ExternalProxySettings.java | 182 +
.../http/HTTPConnectionManagerSettings.java | 332 +
.../services/http/HTTPProxyAdapter.java | 777 +
.../services/http/HTTPProxyDestination.java | 500 +
.../http/HostConfigurationSettings.java | 251 +
.../services/http/ProtocolFactory.java | 46 +
.../services/http/SOAPProxyAdapter.java | 114 +
.../EasySSLProtocolSocketFactory.java | 226 +
.../http/httpclient/EasyX509TrustManager.java | 180 +
.../services/http/httpclient/FlexGetMethod.java | 61 +
.../http/httpclient/FlexPostMethod.java | 61 +
.../services/http/proxy/AccessFilter.java | 59 +
.../services/http/proxy/CookieInfo.java | 56 +
.../services/http/proxy/ErrorFilter.java | 86 +
.../services/http/proxy/ProxyConstants.java | 48 +
.../services/http/proxy/ProxyContext.java | 310 +
.../services/http/proxy/ProxyContextFilter.java | 219 +
.../services/http/proxy/ProxyException.java | 56 +
.../services/http/proxy/ProxyFilter.java | 47 +
.../services/http/proxy/ProxyUtil.java | 38 +
.../services/http/proxy/RequestFilter.java | 685 +
.../services/http/proxy/RequestUtil.java | 135 +
.../services/http/proxy/ResponseFilter.java | 426 +
.../services/http/proxy/ResponseUtil.java | 70 +
.../services/http/proxy/SecurityFilter.java | 270 +
.../services/http/proxy/SharedProxyContext.java | 138 +
.../messaging/services/http/proxy/Target.java | 109 +
qa/apps/qa-manual/FlashvarsTest.mxml | 37 -
qa/apps/qa-manual/WEB-INF/activemq.xml | 36 -
.../flex/flex-config.mods.deployable.xml | 22 -
.../WEB-INF/flex/flex-config.mods.local.xml | 32 -
.../qa-manual/WEB-INF/flex/flex-config.mods.xml | 36 -
qa/apps/qa-manual/WEB-INF/flex/global.css | 17 -
.../flex/messaging-config.mods.local.xml | 34 -
.../WEB-INF/flex/messaging-config.mods.xml | 459 -
.../flex/messaging-throttle-config.mods.xml | 298 -
.../WEB-INF/flex/proxy-config.mods.local.xml | 36 -
.../WEB-INF/flex/proxy-config.mods.xml | 268 -
.../WEB-INF/flex/remoting-config.mods.local.xml | 34 -
.../WEB-INF/flex/remoting-config.mods.xml | 182 -
.../WEB-INF/flex/services-config.mods.local.xml | 53 -
.../WEB-INF/flex/services-config.mods.xml | 361 -
.../WEB-INF/flex/user_classes/_LoginWindow.mxml | 57 -
.../WEB-INF/flex/user_classes/placeholder | 1 -
.../flex/user_classes/qa/data/Address.as | 90 -
.../flex/user_classes/qa/data/Company.as | 97 -
qa/apps/qa-manual/WEB-INF/server-config.wsdd | 409 -
.../WEB-INF/src/bugs/b205439/SampleServlet.java | 125 -
.../com/adobe/samples/hsbc/MessageSender.java | 48 -
.../WEB-INF/src/dev/echoservice/Book.java | 94 -
.../src/dev/echoservice/CustomException.java | 40 -
.../WEB-INF/src/dev/echoservice/Echo.java | 458 -
.../WEB-INF/src/dev/remoting/BindObject.java | 37 -
.../WEB-INF/src/dev/remoting/TestServices.java | 177 -
.../WEB-INF/src/messaging/ClientManagerRO.java | 127 -
.../src/qa/messaging/flook/FLookEmail.java | 69 -
.../messaging/throttle/ROPushServerMessage.java | 190 -
.../WEB-INF/src/qa/utils/MessageGenerator.java | 205 -
.../components/RuntimeEndpointsAndFactory.java | 158 -
.../components/RuntimeHttpProxyAll.java | 171 -
.../components/RuntimeHttpProxyService.java | 91 -
.../RuntimeJMSDestinationNoConnFact.java | 165 -
.../RuntimeJMSDestinationNoJNDIDestName.java | 173 -
.../RuntimeMessageDestinationClustered.java | 134 -
.../RuntimeRTPushOverHttpDestinations.java | 108 -
.../remoteobjects/RuntimeLogTargets.java | 132 -
.../WEB-INF/src/security/PerClientCommand.java | 50 -
.../src/security/PerClientPrincipal.java | 40 -
qa/apps/qa-manual/WEB-INF/src/test/RpcTest.java | 28 -
.../ajax/messaging/JMSObjectMessageTest.html | 94 -
.../messaging/TextMessageASAdapterTest.html | 92 -
.../messaging/TextMessageOverStreamingTest.html | 97 -
.../ajax/messaging/TextMessageRuntimeDest.html | 98 -
qa/apps/qa-manual/ajax/readme.txt | 1 -
.../182101/PerClientAuthenticationTest.mxml | 105 -
.../qa-manual/bugs/182101/readme_bug182101.txt | 45 -
qa/apps/qa-manual/bugs/BLZ-594/BLZ-594.mxml | 37 -
qa/apps/qa-manual/bugs/BLZ-594/readme.txt | 13 -
qa/apps/qa-manual/build.xml | 384 -
.../ClusteredChannelSetLoginTest.mxml | 151 -
.../qa-manual/ipv6/general/URLUtilIPv6Test.mxml | 302 -
.../messaging/ipv6_messaging_streaming.mxml | 166 -
.../ipv6/proxyservice/httpService/basic.xml | 30 -
.../proxyservice/httpService/ipv6_hs_dest.mxml | 106 -
.../httpService/ipv6_hs_dynamicurl.mxml | 114 -
.../httpService/ipv6_hs_externalproxy.mxml | 96 -
.../webService/ipv6_ws_dynamicurl.mxml | 106 -
qa/apps/qa-manual/ipv6/readme.txt | 7 -
.../qa-manual/ipv6/remoteservice/ipv6_ro.mxml | 85 -
.../mbean/jmx/MBeanServerGateway_create.mxml | 157 -
qa/apps/qa-manual/mbean/jmx/Simple.java | 29 -
qa/apps/qa-manual/mbean/jmx/SimpleMBean.java | 23 -
qa/apps/qa-manual/messaging/ClientManager.mxml | 81 -
qa/apps/qa-manual/messaging/MessagingApp.mxml | 416 -
qa/apps/qa-manual/messaging/RPC2MsgLite.mxml | 138 -
.../qa-manual/messaging/duplicateSession.mxml | 91 -
.../messaging/messaging_Two_Destinations.mxml | 162 -
.../throttling/simpleMessagingConsumerTest.mxml | 552 -
.../simpleMessagingProducerServerPush.mxml | 377 -
.../httpservice/ProxyTopLevelConstrainTest.mxml | 122 -
.../bugs/sdk-11244/leaktest/LeakTest2.html | 41 -
.../bugs/sdk-11244/leaktest/LeakTest2.mxml | 191 -
.../bugs/sdk-11244/leaktest/leaktest.xml | 11023 ---------
.../bugs/sdk-11244/leaktest/pbentries.xml | 20 -
.../bugs/sdk-11244/pbentries/pbentries.xml | 20 -
qa/apps/qa-manual/qa/main.mxml | 22 -
qa/apps/qa-manual/remoting/RemotingApp.mxml | 368 -
.../rtPushOverHTTP/secureDestinationTest.mxml | 159 -
.../qa-manual/rtPushOverHTTP/test_autosend.mxml | 167 -
.../runtimeConfiguration/changeLogLevel.mxml | 66 -
.../clusteredDynamicMessageDestTest.mxml | 119 -
.../clusteredStaticMessageDestTest.mxml | 104 -
.../security/login_logout_disconnect.mxml | 208 -
qa/apps/qa-regress/META-INF/MANIFEST.MF | 5 -
qa/apps/qa-regress/WEB-INF/activemq.xml | 36 -
qa/apps/qa-regress/WEB-INF/flex-servlet.xml | 95 -
.../WEB-INF/flex/active-mq-messaging-config.xml | 1296 --
.../flex/flex-config.mods.deployable.xml | 36 -
.../WEB-INF/flex/flex-config.mods.local.xml | 34 -
.../WEB-INF/flex/flex-config.mods.xml | 36 -
qa/apps/qa-regress/WEB-INF/flex/global.css | 17 -
.../flex/messaging-config.mods.local.xml | 34 -
.../WEB-INF/flex/messaging-config.mods.xml | 1832 --
.../WEB-INF/flex/proxy-config.mods.local.xml | 43 -
.../WEB-INF/flex/proxy-config.mods.xml | 485 -
.../WEB-INF/flex/remoting-config.mods.local.xml | 34 -
.../WEB-INF/flex/remoting-config.mods.xml | 486 -
.../WEB-INF/flex/services-config.mods.local.xml | 33 -
.../flex/services-config.mods.validators.xml | 74 -
.../WEB-INF/flex/services-config.mods.xml | 539 -
.../user_classes/add_your_as_and_swc_files_here | 0
.../user_classes/proxy/ApplicationSwfProxy.as | 137 -
.../user_classes/proxy/RequestDeserializer.as | 30 -
.../user_classes/proxy/ResponseSerializer.as | 59 -
.../user_classes/qa/CommunicationManager.as | 40 -
.../flex/user_classes/qa/CustomNetConnection.as | 30 -
qa/apps/qa-regress/WEB-INF/server-config.wsdd | 2736 ---
.../qa-regress/WEB-INF/spring/app-config.xml | 29 -
.../WEB-INF/spring/infrastructure-config.xml | 25 -
.../WEB-INF/spring/security-config.xml | 48 -
.../DeserializationValidatorBrokerConfig.java | 158 -
.../TestDeserializationValidator.java | 59 -
.../src/blazeds/qa/remotingService/Bean.java | 199 -
.../blazeds/qa/remotingService/BindObject.java | 29 -
.../src/blazeds/qa/remotingService/Book.java | 100 -
.../qa/remotingService/CustomException.java | 40 -
.../src/blazeds/qa/remotingService/Echo.java | 573 -
.../qa/remotingService/ExternalizableDate.java | 66 -
.../blazeds/qa/remotingService/FileProxy.java | 37 -
.../qa/remotingService/FileReference.java | 36 -
.../qa/remotingService/FileReferenceProxy.java | 38 -
.../qa/remotingService/ImageSnapshotType.java | 42 -
.../qa/remotingService/InstantiationTest.java | 55 -
.../qa/remotingService/ObjectMessageClient.java | 161 -
.../qa/remotingService/TestServices.java | 242 -
.../qa/remotingService/TestTypedObject.java | 50 -
.../TestTypedObjectWithInheritance.java | 27 -
.../qa/remotingService/inherit/ChildClass.java | 67 -
.../qa/remotingService/inherit/ParentClass.java | 64 -
.../WEB-INF/src/commons-logging.properties | 19 -
.../src/dev/calendar/CalendarService.java | 88 -
.../WEB-INF/src/dev/echoservice/Bean.java | 199 -
.../WEB-INF/src/dev/echoservice/Book.java | 95 -
.../src/dev/echoservice/CustomException.java | 41 -
.../WEB-INF/src/dev/echoservice/Echo.java | 459 -
.../dev/echoservice/ObjectMessageClient.java | 168 -
.../src/dev/echoservice/TestTypedObject.java | 55 -
.../TestTypedObjectWithInheritance.java | 29 -
.../src/dev/endpoints/HangingAMFEndpoint.java | 72 -
.../src/dev/endpoints/HangingHTTPEndpoint.java | 53 -
.../src/dev/httpservice/HttpServiceTest.java | 140 -
.../src/dev/httpservice/HttpXmlEchoService.java | 50 -
.../WEB-INF/src/dev/logging/serverlog.java | 51 -
.../WEB-INF/src/dev/remoting/BindObject.java | 31 -
.../WEB-INF/src/dev/remoting/TestServices.java | 171 -
.../src/dev/remoting/inherit/ChildClass.java | 67 -
.../src/dev/remoting/inherit/ParentClass.java | 64 -
.../WEB-INF/src/dev/weather/WeatherInfo.java | 67 -
.../WEB-INF/src/dev/weather/WeatherService.java | 115 -
.../src/errorhandling/testException.java | 37 -
.../qa-regress/WEB-INF/src/photo/person0.jpg | Bin 10638 -> 0 bytes
.../qa/management/MBeanObjectNameResolver.java | 241 -
.../WEB-INF/src/qa/management/Simple.java | 31 -
.../WEB-INF/src/qa/management/SimpleMBean.java | 25 -
.../qa/messaging/CustomMessagingAdapter.java | 67 -
.../src/qa/messaging/CustomTypeMarshaller.java | 47 -
.../src/qa/messaging/CustomUUIDGenerator.java | 29 -
.../src/qa/messaging/DupeUUIDGenerator.java | 29 -
.../qa/messaging/DynamicDestinationAdapter.java | 110 -
.../qa/messaging/MessageRoutedListenerTest.java | 60 -
.../src/qa/messaging/ROPushServerMessage.java | 169 -
.../src/qa/messaging/SessionManager.java | 26 -
.../src/remoting/ConstructorNegativeTest.java | 34 -
.../amfclient/AMFConnectionTestService.java | 121 -
.../remoting/amfclient/ServerCustomType.java | 45 -
.../src/remoting/datatype/EnumApple.java | 33 -
.../src/remoting/datatype/EnumProxy.java | 85 -
.../WEB-INF/src/remoting/datatype/EnumType.java | 30 -
.../src/remoting/datatype/EnumTypeTest.java | 98 -
.../src/remoting/datatype/MapTypeTest.java | 44 -
.../FlexSessionAttributeListenerTest.java | 100 -
.../components/RuntimeHttpProxyDestination.java | 158 -
.../components/RuntimeJMSDestination.java | 314 -
.../components/RuntimeMessageDestination.java | 139 -
.../RuntimeMessageDestinationClustered.java | 133 -
.../components/RuntimeRemotingDestination.java | 76 -
.../components/RuntimeSOAPProxyAdapter.java | 146 -
.../RuntimeUnmanagedMessageDestination.java | 137 -
.../remoteobjects/ROMessageDestination.java | 82 -
.../remoteobjects/RuntimeConfigurator.java | 231 -
.../remoteobjects/RuntimeLogTargets.java | 131 -
.../TestDeserializationValidator.java | 59 -
.../WEB-INF/src/security/PerClientCommand.java | 51 -
.../src/security/PerClientPrincipal.java | 41 -
qa/apps/qa-regress/axis/EchoHeaders.jws | 136 -
qa/apps/qa-regress/axis/StockQuoteService.jws | 99 -
qa/apps/qa-regress/axis/fingerprint.jsp | 285 -
qa/apps/qa-regress/axis/happyaxis.jsp | 521 -
qa/apps/qa-regress/axis/index.html | 59 -
.../qa-regress/axis/servicesAndPorts/0s0p.wsdl | 182 -
.../BadDotNetWebServiceRequest.wsdl | 866 -
.../axis/servicesAndPorts/ServicesAndPorts1.jws | 30 -
.../axis/servicesAndPorts/ServicesAndPorts2.jws | 29 -
.../axis/servicesAndPorts/ServicesAndPorts3.jws | 30 -
.../axis/servicesAndPorts/ServicesAndPorts4.jws | 29 -
.../qa-regress/axis/servicesAndPorts/echo.wsdl | 622 -
.../axis/servicesAndPorts/noPound.wsdl | 68 -
.../qa-regress/axis/servicesAndPorts/pound.wsdl | 68 -
.../axis/servicesAndPorts/response.xml | 85 -
.../qa-regress/axis/servicesAndPorts/sp.wsdl | 93 -
.../qa-regress/axis/servicesAndPorts/spp.wsdl | 95 -
.../qa-regress/axis/servicesAndPorts/sppsp.wsdl | 100 -
.../axis/servicesAndPorts/sppspp.wsdl | 103 -
.../qa-regress/axis/servicesAndPorts/spsp.wsdl | 752 -
qa/apps/qa-regress/axis/staticEcho.wsdl | 622 -
qa/apps/qa-regress/build.xml | 476 -
qa/apps/qa-regress/deserializationData.xml | 33 -
qa/apps/qa-regress/metadata/application.xml | 30 -
.../qa/RemoteObjectDataTypeMatrix.mxml | 957 -
qa/apps/qa-regress/qa/flexContextTest.mxml | 240 -
.../qa/flexbuilder_default_application.mxml | 22 -
.../qa-regress/qa/resources/languages_pair.txt | 1 -
.../qa-regress/qa/resources/languages_utf8.xml | 33 -
.../qa/resources/languages_utf8woBOM.xml | 33 -
.../qa-regress/qa/resources/macbethShort.xml | 174 -
qa/apps/qa-regress/qa/serverlog.jsp | 40 -
.../qa-regress/remote/HttpXmlEchoService.jsp | 28 -
.../qa-regress/remote/MultipleHeadersTest.jsp | 31 -
qa/apps/qa-regress/remote/basic.xml | 30 -
qa/apps/qa-regress/remote/echoParams.jsp | 35 -
.../qa-regress/remote/echoParamsAsFlashvars.jsp | 39 -
qa/apps/qa-regress/remote/languages_utf8.xml | 33 -
qa/apps/qa-regress/remote/serverlog.jsp | 40 -
qa/apps/qa-regress/remote/testMethods.jsp | 19 -
qa/apps/qa-regress/testsuites/config/build.xml | 401 -
qa/apps/qa-regress/testsuites/config/testng.xml | 26 -
.../Remoting_NetConnectionTest.mxml | 91 -
.../services-config.xml | 64 -
.../Remoting_NetConnectionTest.mxml | 96 -
.../services-config.xml | 73 -
.../tests/IncorrectRootElementTest/error.txt | 1 -
.../services-config.xml | 36 -
.../tests/NoServicesConfigFileTest/error.txt | 1 -
.../tests/channels/DuplicateIdTest/error.txt | 1 -
.../DuplicateIdTest/services-config.xml | 34 -
.../tests/channels/InvalidIdTest/error.txt | 1 -
.../channels/InvalidIdTest/services-config.xml | 31 -
.../clientLoadBalancing/NoURLsTest/error.txt | 1 -
.../NoURLsTest/services-config.xml | 59 -
.../cluster/IncorrectDefaultValueTest/error.txt | 1 -
.../services-config.xml | 39 -
.../error.txt | 1 -
.../services-config.xml | 39 -
.../tests/destination/DuplicateIdTest/error.txt | 1 -
.../DuplicateIdTest/services-config.xml | 78 -
.../IncorrectRootElementTest/dest-config.xml | 22 -
.../dest-config.xml.sb-6f3bc324-2w7qvX | 4 -
.../IncorrectRootElementTest/error.txt | 1 -
.../services-config.xml | 43 -
.../destination/InvalidAdapterRefTest/error.txt | 1 -
.../InvalidAdapterRefTest/services-config.xml | 48 -
.../destination/InvalidChannelTest/error.txt | 1 -
.../InvalidChannelTest/services-config.xml | 48 -
.../tests/destination/InvalidIdTest/error.txt | 1 -
.../InvalidIdTest/services-config.xml | 59 -
.../tests/destination/NoAdapterTest/error.txt | 1 -
.../NoAdapterTest/services-config.xml | 47 -
.../NonExistentAdapterTest/error.txt | 1 -
.../NonExistentAdapterTest/services-config.xml | 48 -
.../NonExistentChannelAttrTest/error.txt | 1 -
.../services-config.xml | 46 -
.../NonExistentChannelTest/error.txt | 1 -
.../NonExistentChannelTest/services-config.xml | 48 -
.../tests/factories/InvalidIdTest/error.txt | 1 -
.../factories/InvalidIdTest/services-config.xml | 40 -
.../factories/NonExistentClassTest/error.txt | 1 -
.../NonExistentClassTest/services-config.xml | 45 -
.../flexclient/InvalidTimeOutTest/error.txt | 1 -
.../InvalidTimeOutTest/services-config.xml | 25 -
.../flexclient/NegativeTimeOutTest/error.txt | 1 -
.../NegativeTimeOutTest/services-config.xml | 25 -
.../AdaptiveFrequencyTest/error.txt | 1 -
.../AdaptiveFrequencyTest/messaging-config.xml | 48 -
.../AdaptiveFrequencyTest/services-config.xml | 52 -
.../FrequencyStepSizeTest/error.txt | 1 -
.../FrequencyStepSizeTest/messaging-config.xml | 48 -
.../FrequencyStepSizeTest/services-config.xml | 52 -
.../MaxQueueSizeTest/error.txt | 1 -
.../MaxQueueSizeTest/messaging-config.xml | 48 -
.../MaxQueueSizeTest/services-config.xml | 81 -
.../AdaptiveServerToClient/readme.txt | 1 -
.../DestinationWithNoChannelTest/error.txt | 1 -
.../services-config.xml | 56 -
.../DestinationWithNoIDTest/error.txt | 1 -
.../DestinationWithNoIDTest/services-config.xml | 59 -
.../error.txt | 1 -
.../services-config.xml | 60 -
.../messagingService/dataTypesTest/Bean.as | 207 -
.../dataTypesTest/BigDecimalTypesTest.mxml | 179 -
.../dataTypesTest/BigIntegerTypesTest.mxml | 162 -
.../messagingService/dataTypesTest/Book.as | 52 -
.../dataTypesTest/BooleanTypesTest.mxml | 731 -
.../dataTypesTest/ByteTypesTest.mxml | 536 -
.../dataTypesTest/CharTypesTest.mxml | 514 -
.../dataTypesTest/ComplexCustomTypeTest.mxml | 141 -
.../dataTypesTest/CustomTypeTest.mxml | 380 -
.../dataTypesTest/DateTypesTest.mxml | 321 -
.../dataTypesTest/DoubleTypesTest.mxml | 675 -
.../messagingService/dataTypesTest/EnumType.as | 51 -
.../dataTypesTest/EnumTypeTest.mxml | 111 -
.../dataTypesTest/ExternalizableDate.as | 69 -
.../dataTypesTest/ExternalizableTest.mxml | 58 -
.../dataTypesTest/FloatTypesTest.mxml | 359 -
.../dataTypesTest/IntTypesTest.mxml | 468 -
.../dataTypesTest/LongTypesTest.mxml | 468 -
.../messagingService/dataTypesTest/MyFileRef.as | 26 -
.../dataTypesTest/SQLDateTypesTest.mxml | 256 -
.../dataTypesTest/ShortTypesTest.mxml | 423 -
.../dataTypesTest/StringTypesTest.mxml | 315 -
.../messagingService/dataTypesTest/SuperBook.as | 26 -
.../dataTypesTest/TestTypedObject.as | 54 -
.../dataTypesTest/bean_namespace.as | 22 -
.../dataTypesTest/messaging-config.xml | 1656 --
.../dataTypesTest/proxy-config.xml | 433 -
.../dataTypesTest/remoting-config.xml | 396 -
.../dataTypesTest/services-config.xml | 473 -
.../jms/InvalidAcknowledgeModeTest/error.txt | 1 -
.../services-config.xml | 84 -
.../jms/InvalidDeliveryModeTest/error.txt | 1 -
.../InvalidDeliveryModeTest/services-config.xml | 84 -
.../jms/InvalidDestinationTypeTest/error.txt | 1 -
.../services-config.xml | 85 -
.../jms/InvalidMessageTypeTest/error.txt | 1 -
.../InvalidMessageTypeTest/services-config.xml | 85 -
.../jms/NoConnectionFactoryTest/error.txt | 1 -
.../NoConnectionFactoryTest/services-config.xml | 82 -
.../jms/NoJNDINameTest/error.txt | 1 -
.../jms/NoJNDINameTest/services-config.xml | 82 -
.../InvalidBufferPolicyTest/error.txt | 1 -
.../messaging-config.xml | 48 -
.../InvalidBufferPolicyTest/services-config.xml | 52 -
.../InvalidConflatePolicyTest/error.txt | 1 -
.../messaging-config.xml | 48 -
.../services-config.xml | 52 -
.../UnknownInboundPolicyTest/error.txt | 1 -
.../messaging-config.xml | 48 -
.../services-config.xml | 52 -
.../frequencies/McfGreaterthanMfTest/error.txt | 1 -
.../McfGreaterthanMfTest/messaging-config.xml | 48 -
.../McfGreaterthanMfTest/services-config.xml | 52 -
.../InvalidBufferPolicyTest/error.txt | 1 -
.../messaging-config.xml | 48 -
.../InvalidBufferPolicyTest/services-config.xml | 52 -
.../InvalidConflatePolicyTest/error.txt | 1 -
.../messaging-config.xml | 48 -
.../services-config.xml | 52 -
.../InvalidErrorPolicyTest/error.txt | 1 -
.../InvalidErrorPolicyTest/messaging-config.xml | 48 -
.../InvalidErrorPolicyTest/services-config.xml | 52 -
.../UnknownOutboundPolicyTest/error.txt | 1 -
.../messaging-config.xml | 48 -
.../services-config.xml | 52 -
.../frequencies/McfGreaterthanMfTest/error.txt | 1 -
.../McfGreaterthanMfTest/messaging-config.xml | 48 -
.../McfGreaterthanMfTest/services-config.xml | 52 -
.../validation/goodValidatorTest/error.txt | 1 -
.../goodValidatorTest/services-config.xml | 365 -
.../nonExistingValidatorTest/error.txt | 1 -
.../services-config.xml | 368 -
.../patternFilterLoggingValidatorTest/error.txt | 1 -
.../services-config.xml | 350 -
.../sameExplicitTypeValidatorTest/error.txt | 1 -
.../services-config.xml | 364 -
.../validation/sameTypeValidatorTest/error.txt | 1 -
.../sameTypeValidatorTest/services-config.xml | 367 -
.../validation/wrongTypeValidatorTest/error.txt | 1 -
.../wrongTypeValidatorTest/services-config.xml | 382 -
.../InvalidClusterMessageRoutingTest/error.txt | 1 -
.../services-config.xml | 61 -
.../InvocationExceptionTest.mxml | 108 -
.../ArgumentsInServerLogTest/error.txt | 4 -
.../remoting-config.xml | 32 -
.../services-config.xml | 49 -
.../logincommand/NoClassAttrTest/error.txt | 1 -
.../NoClassAttrTest/services-config.xml | 40 -
.../logincommand/NoServerAttrTest/error.txt | 1 -
.../NoServerAttrTest/services-config.xml | 40 -
.../securityconstraint/InvalidIdTest/error.txt | 1 -
.../InvalidIdTest/services-config.xml | 46 -
.../UndefinedConstraintTest/error.txt | 1 -
.../UndefinedConstraintTest/services-config.xml | 59 -
.../services/BadDefaultChannelTest/error.txt | 1 -
.../BadDefaultChannelTest/services-config.xml | 42 -
.../tests/services/DuplicateDefTest/error.txt | 1 -
.../DuplicateDefTest/services-config.xml | 35 -
.../DuplicateDefaultAdapterTest/error.txt | 1 -
.../services-config.xml | 41 -
.../ExternalEntityInConfigTest/error.txt | 1 -
.../services-config.xml | 43 -
.../services/IncorrectRootElementTest/error.txt | 1 -
.../messaging-config.xml | 27 -
.../services-config.xml | 34 -
.../services/InvalidAdapterIdTest/error.txt | 1 -
.../InvalidAdapterIdTest/services-config.xml | 40 -
.../InvalidDefSecConstraintTest/error.txt | 1 -
.../services-config.xml | 43 -
.../tests/services/InvalidIdTest/error.txt | 1 -
.../services/InvalidIdTest/services-config.xml | 35 -
.../tests/services/InvalidIncludeTest/error.txt | 1 -
.../InvalidIncludeTest/services-config.xml | 34 -
.../tests/services/NoClassAttrTest/error.txt | 1 -
.../NoClassAttrTest/services-config.xml | 35 -
.../StringTypesTest.mxml | 316 -
.../messaging-config.xml | 35 -
.../remoting-config.xml | 37 -
.../services-config.xml | 154 -
.../simpleMessagingTest.mxml | 264 -
.../StringTypesTest.mxml | 316 -
.../messaging-config.xml | 35 -
.../remoting-config.xml | 37 -
.../services-config.xml | 154 -
.../simpleMessagingTest.mxml | 264 -
.../tests/tokens/InvalidTokenTest/error.txt | 1 -
.../tokens/InvalidTokenTest/services-config.xml | 36 -
.../messaging-config.xml | 68 -
.../CustomUUIDGeneratorTest/services-config.xml | 72 -
.../simpleJMSMessagingTest.mxml | 266 -
.../simpleMessagingTest.mxml | 264 -
.../DuplicateUUIDTest/DuplicateUUIDTest1.mxml | 266 -
.../DuplicateUUIDTest/DuplicateUUIDTest2.mxml | 177 -
.../DuplicateUUIDTest/messaging-config.xml | 66 -
.../DuplicateUUIDTest/services-config.xml | 72 -
.../testsuites/flexunit/_seedFileEnd.txt | 5 -
.../testsuites/flexunit/_seedFileStart.txt | 42 -
.../qa-regress/testsuites/flexunit/basic.xml | 30 -
.../qa-regress/testsuites/flexunit/build.xml | 376 -
.../flexunit/src/mx/messaging/tests/AMF0Test.as | 116 -
.../flexunit/src/mx/messaging/tests/AMF3Test.as | 342 -
.../src/mx/messaging/tests/AMFChannelTest.as | 235 -
.../src/mx/messaging/tests/AllMessagingTests.as | 64 -
.../messaging/tests/Base64EncoderDecoderTest.as | 123 -
.../src/mx/messaging/tests/ChannelSetTest.as | 593 -
.../tests/ConfigurationBasedTestCase.as | 224 -
.../src/mx/messaging/tests/ConsumerTest.as | 172 -
.../messaging/tests/ConsumerWithServerTest.as | 265 -
.../mx/messaging/tests/HexEncoderDecoderTest.as | 122 -
.../src/mx/messaging/tests/MessageAgentTest.as | 255 -
.../src/mx/messaging/tests/ServerConfigTest.as | 138 -
.../messaging/tests/helpers/AMFTestResponder.as | 74 -
.../messaging/tests/helpers/CheckUnsubHelper.as | 56 -
.../tests/helpers/ConsumerPollingHelper.as | 68 -
.../messaging/tests/helpers/EqualityHelper.as | 494 -
.../messaging/tests/helpers/MockMessageAgent.as | 58 -
.../mx/messaging/tests/helpers/PollingTester.as | 87 -
.../src/mx/messaging/tests/helpers/TestEvent.as | 38 -
.../messaging/tests/helpers/TestResultEvent.as | 49 -
.../messaging/tests/helpers/TestStatusEvent.as | 49 -
.../flexunit/src/mx/rpc/tests/AllRemoteTests.as | 77 -
.../src/mx/rpc/tests/MXMLRemoteObjectTest.as | 202 -
.../src/mx/rpc/tests/RemoteObjectAsMXMLTest.as | 64 -
.../src/mx/rpc/tests/RemoteObjectTest.as | 401 -
.../src/mx/utils/tests/ObjectUtilTest.as | 249 -
.../flexunit/src/mx/utils/tests/UIDUtilTest.as | 181 -
.../messaging/Base64EncodeLargeByteArrayTest.as | 78 -
.../mx/messaging/HexEncodeLargeByteArrayTest.as | 78 -
.../flexunit/stylesheets/junit-frames.xsl | 769 -
.../flexunit/stylesheets/junit-noframes.xsl | 537 -
qa/apps/qa-regress/testsuites/mxunit/build.xml | 478 -
.../mxunit/stylesheets/junit-frames.xsl | 767 -
.../mxunit/stylesheets/junit-noframes.xsl | 537 -
.../mxunit/tests/MBean/Log/LogMBeans.mxml | 232 -
.../mxunit/tests/MBean/Log/MBeanFunctions.as | 147 -
.../mxunit/tests/MBean/jmx/MBeanFunctions.as | 152 -
.../tests/MBean/jmx/MBeanServerGateway.mxml | 628 -
.../MBean/jmx/MBeanServerGateway_register.mxml | 270 -
.../testsuites/mxunit/tests/MBean/jmx/Simple.as | 28 -
.../mxunit/tests/MBean/jmx/appServer.jsp | 17 -
.../ServiceAdapterControlMBeanTest.mxml | 194 -
.../StreamingAMFEndpointMBean.mxml | 189 -
.../StreamingHTTPEndpointMBean.mxml | 190 -
.../MBean/proxyservice/HTTPDestinationTest.mxml | 268 -
.../proxyservice/ProxyServiceMBeanTest.mxml | 192 -
.../MBean/proxyservice/SOAPDestinationTest.mxml | 218 -
.../runtime/AdminConsoleDisplayRegistrar.mxml | 132 -
.../runtime/messaging/MessageBrokerControl.mxml | 244 -
.../client/FlexClientManagerControl.mxml | 166 -
.../endpoints/AMF/AMFEndpointControl.mxml | 226 -
.../endpoints/AMF/simpleMessagingTest.as | 156 -
.../endpoints/HTTP/HTTPEndpointControl.mxml | 241 -
.../endpoints/HTTP/simpleMessagingTest.as | 152 -
.../StreamingAMFEndpointControl.mxml | 191 -
.../StreamingAMF/simpleMessagingTest.as | 154 -
.../StreamingHTTPEndpointControl.mxml | 191 -
.../StreamingHTTP/simpleMessagingTest.as | 154 -
.../tests/errorhandling/roExceptionTest.mxml | 68 -
.../serviceAndDestinationMismatchTest.mxml | 131 -
.../MPI/MPIJMSMessagingTest.mxml | 310 -
.../messagingService/MPI/MPIMessagingTest.mxml | 303 -
.../amfChannelWithStreamingEndpoint.mxml | 93 -
.../tests/messagingService/TestTypedObject.as | 29 -
.../blz-300/subscribeConsumerFromClass.mxml | 70 -
.../messagingService/customAdapterTest.mxml | 285 -
.../customTypeMarhsaller/TestTypedObject.as | 28 -
.../typeMarshallerTestAMFStream.mxml | 227 -
.../typeMarshallerTestHTTPStream.mxml | 228 -
.../dynamicDestinations/basicsAMF.mxml | 289 -
.../dynamicDestinations/headersAMF.mxml | 222 -
.../invalidSubtopicsAMF.mxml | 252 -
.../dynamicDestinations/mixedSeparatorsAMF.mxml | 235 -
.../mixedSeparatorsColonSeparatorAMF.mxml | 234 -
.../securityEmployeeUserAMF.mxml | 354 -
.../securityGuestUserAMF.mxml | 353 -
.../securityManagerUserAMF.mxml | 363 -
.../securitySupervisorUserAMF.mxml | 360 -
.../subtopicsEnabledWildcardsNotAllowed.mxml | 147 -
.../subtopicsNotAllowedAMF.mxml | 153 -
...btopicsNotAllowedAllowSubtopicsFalseAMF.mxml | 152 -
.../dynamicDestinations/wildcardsAMF.mxml | 477 -
.../wildcardsColonSeparatorAMF.mxml | 478 -
.../JMSSelectorBooleanTestNegative.mxml | 177 -
.../JMSSelectorBooleanTestPositive.mxml | 156 -
.../jmsselectors/JMSSelectorInTestNegative.mxml | 178 -
.../jmsselectors/JMSSelectorInTestPositive.mxml | 157 -
.../JMSSelectorLikeTestPositive.mxml | 158 -
.../JMSSelectorMixedTestNegative.mxml | 179 -
.../JMSSelectorMixedTestPositive.mxml | 158 -
.../JMSSelectorNullNotNullTestPositive.mxml | 157 -
.../JMSSelectorNumberTestBetween.mxml | 155 -
.../JMSSelectorNumberTestNegative.mxml | 177 -
.../JMSSelectorNumberTestPositive.mxml | 157 -
.../JMSSelectorStringTestNegative.mxml | 177 -
.../JMSSelectorStringTestPositive.mxml | 157 -
.../messagingService/messagingJMSMapTest.mxml | 273 -
.../messagingJMSObjectTest.mxml | 279 -
.../messagingJMSQueueMapTest.mxml | 274 -
.../messagingJMSQueueObjectTest.mxml | 279 -
.../messagingService/messagingObjectTest.mxml | 279 -
.../messagingService/messagingTestNoProps.mxml | 264 -
...ltiTopicConsumerRemoveSubscriptionsTest.mxml | 89 -
.../multiTopicMXMLTagMessagingTest.mxml | 262 -
.../multiTopic/multiTopicMessagingTest.mxml | 267 -
.../messagingService/multipleMessagesTest.mxml | 293 -
.../priority/destinationPriorityTenTest.mxml | 283 -
.../priority/destinationPriorityZeroTest.mxml | 283 -
.../messagePriorityGrtrThanNineTest.mxml | 283 -
.../messagePriorityLessThanZeroTest.mxml | 283 -
.../priority/messagePriorityNineTest.mxml | 283 -
.../priority/messagePriorityZeroTest.mxml | 283 -
.../priority/messagingTest.mxml | 312 -
...pleMessagesDescendingDegreePriorityTest.mxml | 349 -
...agesMessageHeaderDescendingPriorityTest.mxml | 375 -
...gesProducerHeaderDescendingPriorityTest.mxml | 374 -
.../priority/priority01MessagingTest.mxml | 284 -
.../priority/priority02MessagingTest.mxml | 285 -
.../priority/priority03MessagingTest.mxml | 284 -
.../priority/priority04MessagingTest.mxml | 284 -
.../priority/priority05MessagingTest.mxml | 283 -
.../priority/priority06MessagingTest.mxml | 283 -
.../priority/priority07MessagingTest.mxml | 283 -
.../priority/priority08MessagingTest.mxml | 283 -
.../priority/priority09MessagingTest.mxml | 283 -
.../priority/priority10MessagingTest.mxml | 283 -
.../priority/priority11MessagingTest.mxml | 283 -
.../producerPriorityGrtrThanNineTest.mxml | 283 -
...essThanZeroAndHasDefaultDestSettingTest.mxml | 283 -
.../producerPriorityLessThanZeroTest.mxml | 283 -
.../priority/producerPriorityNineTest.mxml | 283 -
.../priority/producerPriorityNullTest.mxml | 283 -
.../priority/producerPriorityZeroTest.mxml | 283 -
.../messagingService/proBadDestination.mxml | 77 -
.../routedMessageListenerTest.mxml | 106 -
...hannelSetAuthenticationJMSMessagingTest.mxml | 262 -
.../ChannelSetAuthenticationMessagingTest.mxml | 241 -
...etAuthenticationMultipleLoginLogoutTest.mxml | 196 -
.../security/ChannelSetAuthenticationTest.mxml | 176 -
.../polling-amf/JMSAuthConSubscribeTest.mxml | 213 -
.../polling-amf/JMSAuthProSendTest.mxml | 214 -
.../JMSAuthSendSubscribeConstraintTest.mxml | 240 -
.../MessagingAuthConSubscribeTest.mxml | 213 -
.../polling-amf/MessagingAuthProSendTest.mxml | 199 -
...essagingAuthSendSubscribeConstraintTest.mxml | 220 -
.../MessagingAuthenticationTest.mxml | 266 -
.../MessagingAuthenticationTest2.mxml | 81 -
...MultiTopicMessagingAuthConSubscribeTest.mxml | 219 -
.../polling-http/JMSAuthConSubscribeTest.mxml | 213 -
.../polling-http/JMSAuthProSendTest.mxml | 214 -
.../JMSAuthSendSubscribeConstraintTest.mxml | 240 -
.../MessagingAuthConSubscribeTest.mxml | 213 -
.../polling-http/MessagingAuthProSendTest.mxml | 199 -
...essagingAuthSendSubscribeConstraintTest.mxml | 220 -
.../MessagingAuthenticationTest.mxml | 266 -
.../MessagingAuthenticationTest2.mxml | 81 -
...MultiTopicMessagingAuthConSubscribeTest.mxml | 219 -
.../streaming-amf/JMSAuthConSubscribeTest.mxml | 213 -
.../streaming-amf/JMSAuthProSendTest.mxml | 214 -
.../JMSAuthSendSubscribeConstraintTest.mxml | 243 -
.../MessagingAuthConSubscribeTest.mxml | 213 -
.../streaming-amf/MessagingAuthProSendTest.mxml | 214 -
...essagingAuthSendSubscribeConstraintTest.mxml | 220 -
.../MessagingAuthenticationTest.mxml | 266 -
.../MessagingAuthenticationTest2.mxml | 81 -
...MultiTopicMessagingAuthConSubscribeTest.mxml | 219 -
.../streaming-http/JMSAuthConSubscribeTest.mxml | 213 -
.../streaming-http/JMSAuthProSendTest.mxml | 214 -
.../JMSAuthSendSubscribeConstraintTest.mxml | 243 -
.../MessagingAuthConSubscribeTest.mxml | 213 -
.../MessagingAuthProSendTest.mxml | 213 -
...essagingAuthSendSubscribeConstraintTest.mxml | 220 -
.../MessagingAuthenticationTest.mxml | 266 -
.../MessagingAuthenticationTest2.mxml | 81 -
...MultiTopicMessagingAuthConSubscribeTest.mxml | 219 -
.../selectors/SelectorBooleanTestNegative.mxml | 177 -
.../selectors/SelectorBooleanTestPositive.mxml | 156 -
.../selectors/SelectorInTestNegative.mxml | 178 -
.../selectors/SelectorInTestPositive.mxml | 157 -
.../selectors/SelectorLikeTestPositive.mxml | 158 -
.../selectors/SelectorMixedTestNegative.mxml | 179 -
.../selectors/SelectorMixedTestPositive.mxml | 158 -
.../SelectorNullNotNullTestPositive.mxml | 157 -
.../selectors/SelectorNumberTestBetween.mxml | 155 -
.../selectors/SelectorNumberTestNegative.mxml | 177 -
.../selectors/SelectorNumberTestPositive.mxml | 157 -
.../selectors/SelectorStringTestNegative.mxml | 177 -
.../selectors/SelectorStringTestPositive.mxml | 157 -
.../serverPushEnumStreamingAMFTest.mxml | 236 -
.../serverPushEnumStreamingHTTPTest.mxml | 236 -
.../messagingService/serverPushEnumTest.mxml | 236 -
.../serverPushOverlappingChannelSetsTest.mxml | 198 -
.../tests/messagingService/serverPushTest.mxml | 237 -
.../serverPushWithSubtopicTest.mxml | 262 -
.../simpleJMSMessagingAsyncTest.mxml | 265 -
...leJMSMessagingConnectionCredentialsTest.mxml | 265 -
...simpleJMSMessagingDeprecatedAttribsTest.mxml | 264 -
.../simpleJMSMessagingDurableQueueTest.mxml | 264 -
.../simpleJMSMessagingDurableTest.mxml | 304 -
.../simpleJMSMessagingPreserveHeadersTest.mxml | 266 -
.../simpleJMSMessagingSyncTest.mxml | 264 -
.../simpleJMSMessagingTest.mxml | 266 -
.../simpleJMSQueueMessagingTest.mxml | 264 -
.../messagingService/simpleMessagingTest.mxml | 264 -
.../simpleMessagingTest_StreamingHTTP.mxml | 264 -
.../disconnectResubscribeJMSTest.mxml | 233 -
.../longpolling/disconnectResubscribeTest.mxml | 233 -
.../multipleDisconnectsResubscribesTest.mxml | 228 -
.../polling/disconnectResubscribeJMSTest.mxml | 233 -
.../polling/disconnectResubscribeTest.mxml | 233 -
.../multipleDisconnectsResubscribesTest.mxml | 228 -
.../streaming/disconnectResubscribeJMSTest.mxml | 233 -
.../streaming/disconnectResubscribeTest.mxml | 233 -
.../multipleDisconnectsResubscribesTest.mxml | 228 -
.../DeserializationValidatorConfigTest.mxml | 141 -
.../tests/proxyService/184631/WSTest.mxml | 116 -
.../184631/bug184631useProxyTrue.mxml | 116 -
.../tests/proxyService/184950/bug184950.mxml | 130 -
.../proxyService/202863/bug202863DocLit.mxml | 126 -
.../proxyService/202863/bug202863RpcEnc.mxml | 126 -
.../proxyService/92441/bug92441SoapFault.mxml | 120 -
.../mxunit/tests/proxyService/92441/echo.wsdl | 622 -
.../tests/proxyService/92441/echoFault.xml | 31 -
.../httpservice/MultiHeaderTest.mxml | 156 -
.../amfchannel/hsMulti_contenttype_xml.mxml | 140 -
.../httpservice/amfchannel/hs_attributes.mxml | 77 -
.../httpservice/amfchannel/hs_cancel.mxml | 61 -
.../httpservice/amfchannel/hs_channelset.mxml | 73 -
.../amfchannel/hs_contenttype_xml.mxml | 114 -
.../httpservice/amfchannel/hs_extraparams.mxml | 84 -
.../httpservice/amfchannel/hs_resultformat.mxml | 217 -
.../amfchannel/hs_send_no_request.mxml | 136 -
.../amfchannel/hs_send_with_request.mxml | 153 -
.../amfchannel/hs_xmldecode_xmlencode.mxml | 98 -
.../httpservice/bugs/171569/bug171569.mxml | 78 -
.../bugs/171569/bug171569_alternate.mxml | 91 -
.../httpservice/bugs/203212/TestCase203212.as | 55 -
.../httpservice/bugs/203212/bug203212.mxml | 96 -
.../httpservice/bugs/203359/bug203359.mxml | 82 -
.../bugs/PutAndDeleteMethodTests.mxml | 85 -
.../httpservice/bugs/sdk-11229/sdk11229.mxml | 126 -
.../httpservice/httpchannel/hs_attributes.mxml | 89 -
.../httpservice/httpchannel/hs_cancel.mxml | 96 -
.../httpservice/httpchannel/hs_channelset.mxml | 97 -
.../httpchannel/hs_contenttype_xml.mxml | 171 -
.../httpservice/httpchannel/hs_extraparams.mxml | 114 -
.../httpchannel/hs_resultformat.mxml | 265 -
.../httpchannel/hs_send_no_request.mxml | 167 -
.../httpchannel/hs_send_with_request.mxml | 188 -
.../httpchannel/hs_xmldecode_xmlencode.mxml | 118 -
.../ConstructorNegativeTest.mxml | 137 -
.../tests/remotingService/badEndpointTest.mxml | 78 -
.../tests/remotingService/dataTypes/Bean.as | 207 -
.../dataTypes/BeanRulesTest.mxml | 190 -
.../dataTypes/BigDecimalTypesTest.mxml | 258 -
.../dataTypes/BigIntegerTypesTest.mxml | 213 -
.../tests/remotingService/dataTypes/Book.as | 52 -
.../dataTypes/BooleanTypesTest.mxml | 865 -
.../dataTypes/ByteTypesTest.mxml | 571 -
.../dataTypes/CharTypesTest.mxml | 514 -
.../dataTypes/CircularReferencingTest.mxml | 143 -
.../dataTypes/ComplexCustomTypeTest.mxml | 141 -
.../dataTypes/CreateASObjectForMissingTest.mxml | 114 -
.../dataTypes/CustomTypeTest.mxml | 380 -
.../dataTypes/DateTypesTest.mxml | 352 -
.../dataTypes/DeferInstantiationTest.mxml | 114 -
.../remotingService/dataTypes/DocumentTest.mxml | 127 -
.../dataTypes/DoubleTypesTest.mxml | 747 -
.../tests/remotingService/dataTypes/EnumType.as | 51 -
.../remotingService/dataTypes/EnumTypeTest.mxml | 109 -
.../dataTypes/ExternalizableDate.as | 69 -
.../dataTypes/ExternalizableTest.mxml | 58 -
.../dataTypes/FloatTypesTest.mxml | 426 -
.../ImageSnapshot/testCaptureBitmapData.mxml | 87 -
.../ImageSnapshot/testCaptureImage.mxml | 112 -
.../ImageSnapshot/testCaptureImageJPEG.mxml | 83 -
.../testCaptureImageScaleLimitedFalse.mxml | 83 -
.../testCaptureImageScaleLimitedFalseJPEG.mxml | 85 -
.../testCaptureImageScaleLimitedTrue.mxml | 84 -
.../testCaptureImageScaleLimitedTrueJPEG.mxml | 83 -
.../ImageSnapshot/testEncodeImageAsBase64.mxml | 81 -
.../remotingService/dataTypes/IntTypesTest.mxml | 535 -
.../dataTypes/LongTypesTest.mxml | 565 -
.../remotingService/dataTypes/MapTypeTest.mxml | 67 -
.../dataTypes/MethodOverLoadingTests.mxml | 89 -
.../remotingService/dataTypes/MissingBook.as | 52 -
.../dataTypes/MissingTestTypedObject.as | 54 -
.../remotingService/dataTypes/MyFileRef.as | 26 -
.../dataTypes/NoRemoteAliasBook.as | 51 -
.../dataTypes/PropertyProxyTest.mxml | 84 -
.../remotingService/dataTypes/ReadOnlyTest.mxml | 85 -
.../dataTypes/SQLDateTypesTest.mxml | 256 -
.../dataTypes/ShortTypesTest.mxml | 475 -
.../dataTypes/StringTypesTest.mxml | 316 -
.../remotingService/dataTypes/SuperBook.as | 26 -
.../dataTypes/TestTypedObject.as | 54 -
.../dataTypes/VectorTypesTest.mxml | 219 -
.../dataTypes/amf/inheritPropsTest.mxml | 68 -
.../remotingService/dataTypes/bean_namespace.as | 22 -
.../dataTypes/http/inheritPropsTest.mxml | 68 -
.../remotingService/domainbaseEndpointTest.mxml | 79 -
.../remotingService/fault/CustomException.as | 29 -
.../fault/CustomExceptionTest.mxml | 69 -
.../fault/DestinatedClassNotFoundTest.mxml | 69 -
.../fault/InvalidMethodTest.mxml | 66 -
.../remotingService/fault/NumberOfArgsTest.mxml | 66 -
.../remotingService/fault/WrongArgTypeTest.mxml | 66 -
.../tests/remotingService/forwardToAMF.jsp | 19 -
.../mxml/ArgumentsOrderTest.mxml | 97 -
.../remotingService/mxml/BasicSyntaxTest.mxml | 76 -
.../mxml/ConcurrencyLastTest.mxml | 74 -
.../mxml/ConcurrencyMultipleTest.mxml | 59 -
.../mxml/ConcurrencyServiceLevelLastTest.mxml | 76 -
.../ConcurrencyServiceLevelMultipleTest.mxml | 59 -
.../mxml/ConcurrencyServiceLevelSingleTest.mxml | 58 -
.../mxml/ConcurrencySingleTest.mxml | 58 -
.../mxml/HttpChannelInValidateTest.mxml | 66 -
.../mxml/MakeObjectBindableTest.mxml | 145 -
.../mxml/RequestTimeoutTest.mxml | 127 -
.../mxml/ShowBusyCursorTest.mxml | 111 -
.../remotingService/relativeEndpointTest.mxml | 79 -
.../result/ResultBindableTest.mxml | 73 -
.../security/CustomAuthHttpChannelTest.mxml | 135 -
.../security/CustomAuthTest.mxml | 106 -
.../security/ExcludeMethodsTest.mxml | 113 -
.../security/IncludeMethodsTest.mxml | 259 -
.../security/IncludeMethodsWinTest.mxml | 258 -
.../security/nestedConstrainsTest.mxml | 246 -
.../FlexSessionAttributeListenerTest.mxml | 112 -
.../stateful/DifferentInstanceTest.mxml | 64 -
.../stateful/IsSameInstanceTest.mxml | 69 -
.../runtimeConfiguration/roMessageDestTest.mxml | 118 -
.../runtimeAddRemoveDestTest.mxml | 124 -
.../runtimeHTTPProxyDestTest.mxml | 92 -
.../runtimeJMSDestTest.mxml | 119 -
.../runtimeMessageDestTest.mxml | 107 -
.../runtimeRemotingDestTest.mxml | 76 -
.../runtimeSOAPProxyAdapterTest.mxml | 117 -
.../runtimeUnmanagedDestTest.mxml | 148 -
.../startupHTTPProxyDestTest.mxml | 79 -
.../startupJMSDestTest.mxml | 114 -
.../startupMessageDestTest.mxml | 114 -
.../startupRemotingDestTest.mxml | 76 -
.../startupSOAPProxyAdapterTest.mxml | 125 -
.../mixedSeparatorsColonSeparatorAMF.mxml | 248 -
.../multiTopic/multiTopicMessagingTest.mxml | 321 -
.../polling-amf/MessagingAuthProSendTest.mxml | 201 -
.../MessagingAuthConSubscribeTest.mxml | 215 -
...essagingAuthSendSubscribeConstraintTest.mxml | 220 -
.../messagingService/simpleMessagingTest.mxml | 318 -
.../remotingService/mxml/BasicSyntaxTest.mxml | 87 -
.../simpleMessagingTest_SecureAMF.mxml | 264 -
.../simpleMessagingTest_SecureHTTP.mxml | 264 -
.../amfchannel/hs_send_no_request.mxml | 163 -
.../amfchannel/hs_send_with_request.mxml | 183 -
.../httpchannel/hs_send_no_request.mxml | 167 -
.../httpchannel/hs_send_with_request.mxml | 185 -
qa/build.properties | 28 -
qa/build.xml | 114 -
qa/features/checkintests-all.properties | 25 -
qa/features/checkintests-messaging.properties | 19 -
qa/features/checkintests-rpc.properties | 19 -
qa/features/checkintests.properties | 19 -
qa/features/common.properties | 17 -
qa/features/excludes.properties | 52 -
qa/features/excludes.soft.properties | 27 -
qa/features/fds_approval.properties | 33 -
qa/features/full.properties | 38 -
qa/features/httpService.properties | 19 -
qa/features/messaging.properties | 23 -
qa/features/remoteObject.properties | 18 -
qa/features/runtimeConfiguration.properties | 17 -
qa/features/spring.properties | 17 -
qa/features/ssl.properties | 17 -
qa/features/test.properties | 32 -
qa/kick-build.txt | 1 -
qa/resources/config/messaging-config.xml | 28 -
qa/resources/config/proxy-config.xml | 47 -
qa/resources/config/remoting-config.xml | 31 -
qa/resources/config/services-config.xml | 113 -
qa/resources/webtier/build.xml | 92 -
qa/resources/webtier/flex_sdk_3/air-config.xml | 281 -
qa/resources/webtier/flex_sdk_3/flex-config.xml | 357 -
.../webtier/flex_sdk_3/flex-webtier-config.xml | 147 -
qa/resources/webtier/flex_sdk_3/web.xml | 217 -
qa/resources/webtier/flex_sdk_3/web.xml.spring | 233 -
qa/resources/webtier/flex_sdk_4/air-config.xml | 403 -
qa/resources/webtier/flex_sdk_4/flex-config.xml | 440 -
.../webtier/flex_sdk_4/flex-webtier-config.xml | 147 -
qa/resources/webtier/flex_sdk_4/web.xml | 204 -
qa/resources/webtier/flex_sdk_4/web.xml.spring | 217 -
.../qa/src/qa/utils/mxml/MXMLCServlet.java | 299 -
qa/resources/webtier/qa/web.xml | 181 -
qa/resources/webtier/qa/web.xml.spring | 194 -
qa/src/build.xml | 87 -
qa/src/tools/ant/MergeXML.java | 63 -
qa/src/utils/XMLMerge.java | 312 -
readme.txt | 41 -
remoting/pom.xml | 45 +
.../services/RemotingServiceControl.java | 49 +
.../services/RemotingServiceControlMBean.java | 26 +
.../remoting/RemotingDestinationControl.java | 143 +
.../RemotingDestinationControlMBean.java | 53 +
.../remoting/adapters/JavaAdapterControl.java | 49 +
.../adapters/JavaAdapterControlMBean.java | 28 +
.../messaging/services/RemotingService.java | 268 +
.../services/remoting/PageableRowSetCache.java | 135 +
.../services/remoting/RemotingDestination.java | 177 +
.../services/remoting/adapters/JavaAdapter.java | 586 +
.../adapters/NoSuchMethodException.java | 38 +
.../adapters/NoSuchServiceException.java | 38 +
.../remoting/adapters/RemotingMethod.java | 95 +
resources/clustering/readme.txt | 36 -
.../HTTPProxyBootstrapService.java | 254 -
.../MessagingBootstrapService.java | 330 -
resources/config/bootstrapservices/README.txt | 22 -
.../RemotingBootstrapService.java | 220 -
resources/config/messaging-config.xml | 368 -
resources/config/proxy-config.xml | 141 -
resources/config/readme.txt | 25 -
resources/config/remoting-config.xml | 220 -
resources/config/services-config.xml | 902 -
.../fds-ajax-bridge/actionscript/FDMSBase.as | 30 -
.../fds-ajax-bridge/actionscript/FDMSBridge.as | 216 -
.../actionscript/bridge/FABridge.as | 942 -
resources/fds-ajax-bridge/build.xml | 90 -
.../fds-ajax-bridge/javascript/FABridge.js | 655 -
resources/fds-ajax-bridge/javascript/FDMSLib.js | 263 -
resources/fds-ajax-bridge/readme.txt | 25 -
.../ClassLoggingDeserializationValidator.java | 127 -
resources/security/jboss/readme.txt | 23 -
resources/security/tomcat/context.xml | 24 -
resources/security/tomcat/readme.txt | 9 -
resources/security/websphere/readme.txt | 11 -
sampledb/flexdemodb/flexdemodb.properties | 32 -
sampledb/flexdemodb/flexdemodb.script | 20074 -----------------
sampledb/server.properties | 20 -
sampledb/startdb.bat | 17 -
sampledb/startdb.sh | 16 -
sampledb/stopdb.bat | 17 -
sampledb/stopdb.sh | 16 -
.../bin/catalina.bat | 287 -
.../bin/catalina.sh | 456 -
servers/apache-tomcat-6.0.29-overlay/build.xml | 55 -
.../conf/Catalina/localhost/blazeds-spring.xml | 47 -
.../localhost/blazeds-spring.xml.install | 21 -
.../conf/Catalina/localhost/blazeds.xml | 47 -
.../conf/Catalina/localhost/blazeds.xml.install | 21 -
.../conf/Catalina/localhost/ds-console.xml | 22 -
.../Catalina/localhost/ds-console.xml.install | 21 -
.../conf/Catalina/localhost/qa-manual.xml | 54 -
.../conf/Catalina/localhost/qa-regress.xml | 50 -
.../conf/Catalina/localhost/samples-spring.xml | 47 -
.../localhost/samples-spring.xml.install | 21 -
.../conf/Catalina/localhost/samples.xml | 22 -
.../conf/Catalina/localhost/samples.xml.install | 21 -
.../conf/catalina.properties | 81 -
.../conf/context.xml | 33 -
.../conf/server.xml | 145 -
.../conf/tomcat-users.xml | 41 -
.../apache-tomcat-6.0.29-overlay/conf/web.xml | 1204 -
.../webapps/ROOT/WEB_INF/web.xml | 29 -
.../webapps/ROOT/index.html | 50 -
testsuite/pom.xml | 84 +
.../test/java/amfclient/ClientCustomType.java | 45 +
.../java/flex/messaging/DestinationTest.java | 335 +
.../java/flex/messaging/MessageBrokerTest.java | 351 +
.../messaging/client/FlexClientManagerTest.java | 125 +
.../cluster/SerializationProxyTest.java | 64 +
.../config/ChannelSettingsParseUriTest.java | 197 +
.../config/ConfigurationConfirmation.java | 544 +
.../config/ConfigurationParserTest.java | 200 +
.../messaging/config/ThrottleSettingsTest.java | 182 +
.../java/flex/messaging/config/services/1a.xml | 37 +
.../java/flex/messaging/config/services/1b.xml | 63 +
.../java/flex/messaging/config/services/1c.xml | 61 +
.../java/flex/messaging/config/services/1d.xml | 93 +
.../java/flex/messaging/config/services/1e.xml | 50 +
.../config/services/1e_adapter_include.xml | 27 +
.../config/services/1e_channel_include.xml | 29 +
.../config/services/1e_constraint_include.xml | 32 +
.../config/services/1e_destination_include.xml | 26 +
.../java/flex/messaging/config/services/1f.xml | 34 +
.../config/services/1f_service_include.xml | 40 +
.../java/flex/messaging/config/services/1g.xml | 26 +
.../java/flex/messaging/config/services/1h.xml | 52 +
.../java/flex/messaging/config/services/1i.xml | 55 +
.../java/flex/messaging/config/services/1j.xml | 40 +
.../messaging/config/services/Confirm1a.java | 54 +
.../messaging/config/services/Confirm1b.java | 87 +
.../messaging/config/services/Confirm1c.java | 99 +
.../messaging/config/services/Confirm1d.java | 112 +
.../messaging/config/services/Confirm1e.java | 41 +
.../messaging/config/services/Confirm1f.java | 39 +
.../messaging/config/services/Confirm1g.java | 46 +
.../messaging/config/services/Confirm1h.java | 46 +
.../messaging/config/services/Confirm1i.java | 41 +
.../messaging/config/services/Confirm1j.java | 39 +
.../services/adapters/1i_adapter_include.xml | 25 +
.../services/channels/1i_channel_include.xml | 27 +
.../constraints/1i_constraint_include.xml | 30 +
.../destinations/1i_destination_include.xml | 29 +
.../services/services/1i_service_include.xml | 42 +
.../messaging/io/amf/AmfDeserializerTest.java | 154 +
.../flex/messaging/io/amf/MessageGenerator.java | 392 +
.../io/amf/client/AMFConnectionTest.java | 787 +
.../io/amf/client/AMFDataTypeTest.java | 486 +
.../amf/translator/HashReferenceTableTest.java | 279 +
.../translator/StrictReferenceTableTest.java | 151 +
.../AmfDeserializationValidatorTest.java | 165 +
.../io/amfx/AmfxSerializationTest.java | 302 +
.../io/amfx/DeserializationConfirmation.java | 520 +
.../messaging/io/amfx/amfx_tag/Confirm1a.java | 42 +
.../messaging/io/amfx/amfx_tag/Confirm1b.java | 54 +
.../messaging/io/amfx/amfx_tag/Confirm1c.java | 43 +
.../messaging/io/amfx/array_tag/Confirm2a.java | 59 +
.../messaging/io/amfx/array_tag/Confirm2b.java | 67 +
.../messaging/io/amfx/array_tag/Confirm2c.java | 62 +
.../messaging/io/amfx/array_tag/Confirm2d.java | 65 +
.../messaging/io/amfx/array_tag/Confirm2e.java | 76 +
.../messaging/io/amfx/array_tag/Confirm2f.java | 96 +
.../messaging/io/amfx/array_tag/Confirm2g.java | 53 +
.../messaging/io/amfx/array_tag/Confirm2h.java | 54 +
.../messaging/io/amfx/array_tag/Confirm2i.java | 74 +
.../messaging/io/amfx/array_tag/Confirm2j.java | 43 +
.../messaging/io/amfx/array_tag/Confirm2k.java | 43 +
.../messaging/io/amfx/array_tag/Confirm2l.java | 44 +
.../messaging/io/amfx/body_tag/Confirm3a.java | 45 +
.../messaging/io/amfx/body_tag/Confirm3b.java | 46 +
.../messaging/io/amfx/body_tag/Confirm3c.java | 66 +
.../messaging/io/amfx/body_tag/Confirm3d.java | 43 +
.../messaging/io/amfx/bytes_tag/Confirm16a.java | 53 +
.../messaging/io/amfx/date_tag/Confirm4a.java | 48 +
.../messaging/io/amfx/date_tag/Confirm4b.java | 54 +
.../messaging/io/amfx/date_tag/Confirm4c.java | 57 +
.../messaging/io/amfx/date_tag/Confirm4d.java | 57 +
.../messaging/io/amfx/date_tag/Confirm4e.java | 84 +
.../messaging/io/amfx/date_tag/Confirm4f.java | 48 +
.../messaging/io/amfx/date_tag/Confirm4g.java | 43 +
.../messaging/io/amfx/double_tag/Confirm5a.java | 46 +
.../messaging/io/amfx/double_tag/Confirm5b.java | 61 +
.../messaging/io/amfx/double_tag/Confirm5c.java | 55 +
.../messaging/io/amfx/double_tag/Confirm5d.java | 60 +
.../messaging/io/amfx/double_tag/Confirm5e.java | 43 +
.../messaging/io/amfx/double_tag/Confirm5f.java | 43 +
.../messaging/io/amfx/double_tag/Confirm5g.java | 43 +
.../messaging/io/amfx/double_tag/Confirm5h.java | 43 +
.../messaging/io/amfx/false_tag/Confirm6a.java | 46 +
.../messaging/io/amfx/false_tag/Confirm6b.java | 52 +
.../messaging/io/amfx/false_tag/Confirm6c.java | 55 +
.../messaging/io/amfx/false_tag/Confirm6d.java | 56 +
.../messaging/io/amfx/header_tag/Confirm7a.java | 46 +
.../messaging/io/amfx/header_tag/Confirm7b.java | 48 +
.../messaging/io/amfx/header_tag/Confirm7c.java | 72 +
.../messaging/io/amfx/header_tag/Confirm7d.java | 43 +
.../messaging/io/amfx/int_tag/Confirm8a.java | 46 +
.../messaging/io/amfx/int_tag/Confirm8b.java | 53 +
.../messaging/io/amfx/int_tag/Confirm8c.java | 55 +
.../messaging/io/amfx/int_tag/Confirm8d.java | 60 +
.../messaging/io/amfx/int_tag/Confirm8e.java | 43 +
.../messaging/io/amfx/int_tag/Confirm8f.java | 43 +
.../messaging/io/amfx/int_tag/Confirm8g.java | 43 +
.../messaging/io/amfx/null_tag/Confirm9a.java | 46 +
.../messaging/io/amfx/null_tag/Confirm9b.java | 52 +
.../messaging/io/amfx/null_tag/Confirm9c.java | 55 +
.../messaging/io/amfx/null_tag/Confirm9d.java | 56 +
.../io/amfx/object_tag/Confirm10a.java | 57 +
.../io/amfx/object_tag/Confirm10b.java | 74 +
.../io/amfx/object_tag/Confirm10c.java | 101 +
.../io/amfx/object_tag/Confirm10d.java | 93 +
.../io/amfx/string_tag/Confirm11a.java | 46 +
.../io/amfx/string_tag/Confirm11b.java | 52 +
.../io/amfx/string_tag/Confirm11c.java | 55 +
.../io/amfx/string_tag/Confirm11d.java | 60 +
.../io/amfx/string_tag/Confirm11e.java | 82 +
.../io/amfx/string_tag/Confirm11f.java | 94 +
.../io/amfx/string_tag/Confirm11g.java | 55 +
.../io/amfx/string_tag/Confirm11h.java | 43 +
.../io/amfx/string_tag/Confirm11i.java | 46 +
.../io/amfx/string_tag/Confirm11j.java | 46 +
.../io/amfx/testtypes/Bleu_dAuvergne.java | 51 +
.../messaging/io/amfx/testtypes/Cheese.java | 33 +
.../messaging/io/amfx/testtypes/CowCheese.java | 34 +
.../messaging/io/amfx/testtypes/EweCheese.java | 33 +
.../messaging/io/amfx/testtypes/Roquefort.java | 50 +
.../io/amfx/traits_tag/Confirm12a.java | 55 +
.../io/amfx/traits_tag/Confirm12b.java | 71 +
.../messaging/io/amfx/true_tag/Confirm13a.java | 46 +
.../messaging/io/amfx/true_tag/Confirm13b.java | 52 +
.../messaging/io/amfx/true_tag/Confirm13c.java | 55 +
.../messaging/io/amfx/true_tag/Confirm13d.java | 56 +
.../io/amfx/undefined_tag/Confirm14a.java | 46 +
.../io/amfx/undefined_tag/Confirm14b.java | 52 +
.../io/amfx/undefined_tag/Confirm14c.java | 55 +
.../io/amfx/undefined_tag/Confirm14d.java | 56 +
.../messaging/io/amfx/xml_tag/Confirm15a.java | 65 +
.../messaging/io/amfx/xml_tag/Confirm15b.java | 64 +
...irmBlazeDsXmlProcessingXXEVulnerability.java | 7 +
.../test/java/flex/messaging/log/LogTest.java | 178 +
.../java/flex/messaging/log/LoggerTest.java | 165 +
.../java/flex/messaging/log/TestingTarget.java | 47 +
.../BlazeDsXmlProcessingXXEVulnerability.java | 66 +
.../messaging/services/AbstractServiceTest.java | 367 +
.../messaging/services/ServiceAdapterTest.java | 120 +
.../services/http/SettingsReplaceUtilTest.java | 229 +
.../services/messaging/SubtopicTest.java | 119 +
.../java/flex/messaging/util/Basae64Test.java | 80 +
.../test/java/flex/messaging/util/HexTest.java | 88 +
.../java/flex/messaging/util/TestServer.java | 132 +
.../java/flex/messaging/util/UUIDUtilTest.java | 162 +
.../DefaultThreadPoolExecutorTest.java | 167 +
.../macromedia/qa/metrics/AbstractDatabase.java | 545 +
.../test/java/macromedia/qa/metrics/Build.java | 120 +
.../test/java/macromedia/qa/metrics/Metric.java | 128 +
.../macromedia/qa/metrics/MetricsDatabase.java | 237 +
.../macromedia/qa/metrics/MetricsManager.java | 166 +
.../java/macromedia/qa/metrics/Persistable.java | 178 +
.../java/macromedia/qa/metrics/Project.java | 119 +
.../test/java/macromedia/qa/metrics/Run.java | 143 +
.../test/java/macromedia/qa/metrics/Value.java | 134 +
.../test/java/macromedia/util/UnitTrace.java | 29 +
.../java/regression/DoNotDeleteUntilFile.txt | 0
.../amfclient/AMFConnectionTestService.java | 122 +
.../remoting/amfclient/ServerCustomType.java | 45 +
.../resources/WEB-INF/flex/remoting-config.xml | 58 +
.../resources/WEB-INF/flex/services-config.xml | 49 +
testsuite/src/test/resources/amf_request.xml | 92 +
.../resources/flex/messaging/io/amfx/amfx.xsd | 139 +
.../flex/messaging/io/amfx/amfx_tag/1a.xml | 20 +
.../flex/messaging/io/amfx/amfx_tag/1b.xml | 27 +
.../flex/messaging/io/amfx/amfx_tag/1c.xml | 24 +
.../flex/messaging/io/amfx/array_tag/2a.xml | 30 +
.../flex/messaging/io/amfx/array_tag/2b.xml | 39 +
.../flex/messaging/io/amfx/array_tag/2c.xml | 33 +
.../flex/messaging/io/amfx/array_tag/2d.xml | 43 +
.../flex/messaging/io/amfx/array_tag/2e.xml | 26 +
.../flex/messaging/io/amfx/array_tag/2f.xml | 40 +
.../flex/messaging/io/amfx/array_tag/2g.xml | 28 +
.../flex/messaging/io/amfx/array_tag/2h.xml | 29 +
.../flex/messaging/io/amfx/array_tag/2i.xml | 42 +
.../flex/messaging/io/amfx/array_tag/2j.xml | 24 +
.../flex/messaging/io/amfx/array_tag/2k.xml | 28 +
.../flex/messaging/io/amfx/array_tag/2l.xml | 28 +
.../flex/messaging/io/amfx/body_tag/3a.xml | 22 +
.../flex/messaging/io/amfx/body_tag/3b.xml | 24 +
.../flex/messaging/io/amfx/body_tag/3c.xml | 44 +
.../flex/messaging/io/amfx/body_tag/3d.xml | 25 +
.../flex/messaging/io/amfx/bytes_tag/16a.xml | 24 +
.../flex/messaging/io/amfx/date_tag/4a.xml | 24 +
.../flex/messaging/io/amfx/date_tag/4b.xml | 31 +
.../flex/messaging/io/amfx/date_tag/4c.xml | 28 +
.../flex/messaging/io/amfx/date_tag/4d.xml | 71 +
.../flex/messaging/io/amfx/date_tag/4e.xml | 28 +
.../flex/messaging/io/amfx/date_tag/4f.xml | 24 +
.../flex/messaging/io/amfx/date_tag/4g.xml | 24 +
.../flex/messaging/io/amfx/double_tag/5a.xml | 24 +
.../flex/messaging/io/amfx/double_tag/5b.xml | 70 +
.../flex/messaging/io/amfx/double_tag/5c.xml | 37 +
.../flex/messaging/io/amfx/double_tag/5d.xml | 71 +
.../flex/messaging/io/amfx/double_tag/5e.xml | 24 +
.../flex/messaging/io/amfx/double_tag/5f.xml | 24 +
.../flex/messaging/io/amfx/double_tag/5g.xml | 24 +
.../flex/messaging/io/amfx/double_tag/5h.xml | 24 +
.../flex/messaging/io/amfx/false_tag/6a.xml | 24 +
.../flex/messaging/io/amfx/false_tag/6b.xml | 31 +
.../flex/messaging/io/amfx/false_tag/6c.xml | 28 +
.../flex/messaging/io/amfx/false_tag/6d.xml | 36 +
.../flex/messaging/io/amfx/header_tag/7a.xml | 22 +
.../flex/messaging/io/amfx/header_tag/7b.xml | 24 +
.../flex/messaging/io/amfx/header_tag/7c.xml | 41 +
.../flex/messaging/io/amfx/header_tag/7d.xml | 25 +
.../flex/messaging/io/amfx/int_tag/8a.xml | 24 +
.../flex/messaging/io/amfx/int_tag/8b.xml | 38 +
.../flex/messaging/io/amfx/int_tag/8c.xml | 37 +
.../flex/messaging/io/amfx/int_tag/8d.xml | 71 +
.../flex/messaging/io/amfx/int_tag/8e.xml | 24 +
.../flex/messaging/io/amfx/int_tag/8f.xml | 24 +
.../flex/messaging/io/amfx/int_tag/8g.xml | 24 +
.../flex/messaging/io/amfx/null_tag/9a.xml | 24 +
.../flex/messaging/io/amfx/null_tag/9b.xml | 31 +
.../flex/messaging/io/amfx/null_tag/9c.xml | 28 +
.../flex/messaging/io/amfx/null_tag/9d.xml | 36 +
.../flex/messaging/io/amfx/object_tag/10a.xml | 41 +
.../flex/messaging/io/amfx/object_tag/10b.xml | 56 +
.../flex/messaging/io/amfx/object_tag/10c.xml | 49 +
.../flex/messaging/io/amfx/object_tag/10d.xml | 38 +
.../flex/messaging/io/amfx/string_tag/11a.xml | 24 +
.../flex/messaging/io/amfx/string_tag/11b.xml | 31 +
.../flex/messaging/io/amfx/string_tag/11c.xml | 28 +
.../flex/messaging/io/amfx/string_tag/11d.xml | 71 +
.../flex/messaging/io/amfx/string_tag/11e.xml | 28 +
.../flex/messaging/io/amfx/string_tag/11f.xml | 30 +
.../flex/messaging/io/amfx/string_tag/11g.xml | 28 +
.../flex/messaging/io/amfx/string_tag/11h.xml | 31 +
.../flex/messaging/io/amfx/string_tag/11i.xml | 24 +
.../flex/messaging/io/amfx/string_tag/11j.xml | 24 +
.../flex/messaging/io/amfx/traits_tag/12a.xml | 35 +
.../flex/messaging/io/amfx/traits_tag/12b.xml | 47 +
.../flex/messaging/io/amfx/true_tag/13a.xml | 24 +
.../flex/messaging/io/amfx/true_tag/13b.xml | 31 +
.../flex/messaging/io/amfx/true_tag/13c.xml | 28 +
.../flex/messaging/io/amfx/true_tag/13d.xml | 36 +
.../messaging/io/amfx/undefined_tag/14a.xml | 24 +
.../messaging/io/amfx/undefined_tag/14b.xml | 31 +
.../messaging/io/amfx/undefined_tag/14c.xml | 28 +
.../messaging/io/amfx/undefined_tag/14d.xml | 36 +
.../flex/messaging/io/amfx/xml_tag/15a.xml | 30 +
.../flex/messaging/io/amfx/xml_tag/15b.xml | 30 +
4144 files changed, 340610 insertions(+), 341599 deletions(-)
----------------------------------------------------------------------
[21/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/ConsoleManager.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/ConsoleManager.as b/attic/apps/ds-console/console/ConsoleManager.as
new file mode 100755
index 0000000..8ab8140
--- /dev/null
+++ b/attic/apps/ds-console/console/ConsoleManager.as
@@ -0,0 +1,1004 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console
+{
+ import console.ConsoleTreeDataDescriptor;
+ import console.events.ManagementOperationInvokeEvent;
+ import flash.events.*;
+ import mx.collections.*;
+ import mx.containers.*;
+ import mx.controls.*;
+ import mx.controls.treeClasses.*;
+ import mx.events.*;
+ import mx.managers.*;
+ import mx.messaging.messages.*;
+ import mx.messaging.management.*;
+ import mx.rpc.events.*;
+ import mx.rpc.remoting.*;
+ import mx.utils.*;
+ import mx.rpc.remoting.RemoteObject;
+ import flash.display.DisplayObject;
+ import console.containers.UpdateManager;
+ import console.containers.UpdateListener;
+ import flash.utils.Timer;
+ import mx.core.LayoutContainer;
+
+ public class ConsoleManager implements console.containers.UpdateManager
+ {
+ public static const GENERAL_SERVER:int = 1;
+ public static const GENERAL_POLLABLE:int = 2;
+ public static const GENERAL_OPERATION:int = 3;
+
+ public static const GRAPH_BY_POLL_INTERVAL:int = 50;
+
+ public static const ENDPOINT_SCALAR:int = 100;
+ public static const ENDPOINT_POLLABLE:int = 101;
+
+ public static const DESTINATION_GENERAL:int = 150;
+ public static const DESTINATION_POLLABLE:int = 151;
+
+ public static const TIMER_INTERVAL:int = 3000;
+
+ ///////////////////////////
+ // Private data structures
+ ///////////////////////////
+ /**
+ * A generic object model of the MBean hierarchy, built from the flat set of object names.
+ * The model is an array of top level objects. Each object has the following slots:
+ * <ul>
+ * <li>label:String - required - the label for the MBean instance or category name/app name</li>
+ * <li>type:String - optional - the type value for a node that parents MBeans of similar type</li>
+ * <li>objectName:ObjectName - optional - the ObjectName instance for an MBean</li>
+ * <li>children:Array - optional - array of child objects</li>
+ * </ul>
+ */
+ private var _mbeanModel:Array;
+ public function get mbeanModel():Object
+ {
+ return _mbeanModel;
+ }
+
+ /**
+ * The listeners map is keyed on the listeners and stores a property called types
+ * which is an array of all of the types that the listener uses and whether or not
+ * an individual type should poll. Not all listeners are always updated however,
+ * there is another map 'activeListeners' which keeps track of which listeners are actively
+ * listening to the timer. This is used because if one panel is hidden,
+ * we do not want to poll all of the data it listens for if it won't be displayed yet.
+ *
+ * An example listeners map then looks like this:
+ *
+ * listeners:Object -+-[listener1:String]-:- { reference: listenerObject,
+ * | types: [[TYPE1, POLL],
+ * | [TYPE2, NOPOLL]]
+ * +-[listener2:String]-:- { ... }
+ */
+ private var listeners:Object;
+
+
+ /**
+ * The activeListeners object stores all of the active listeners
+ * for polling and is keyed on the type of data. An example is:
+ *
+ * activeListeners:Object -+-[ TYPE1:int ]-:- [ l1:UpdateListener , ... ]
+ * |
+ * + [ TYPE2:int ]-:- [ ... , ... , ... ]
+ */
+ private var activeListeners:Object;
+
+ /**
+ * This map handles storing information about what mbeans are associated
+ * with what display types. It is keyed on the types of data (e.g. GENERAL_SCALAR, etc.),
+ * then on the application name stored as a string, then the MBean name.
+ *
+ * An example displays map then looks like this:
+ *
+ * displays:Object -+-[TYPE1:int]-:[Application1]:- [mbean1] -> [attr1, attr2, attr3]
+ * | | [mbean2] -> [attr1, attr2]
+ * | | [mbean3] -> [...]
+ * | +[Application2]:- [mbean...]
+ * | |
+ * |
+ * +-[TYPE2:int]-:- [ ... ]
+ */
+ private var displays:Object;
+
+ /**
+ * Temporarily holds onto data pulled from the server. Anything in the buffer is
+ * always overridden by new data.
+ *
+ * Is a map keyed on the data types which all reference maps keyed on mbeans which
+ * store arrays of associated attributes.
+ *
+ * E.g.
+ *
+ * dataBuffer:Object -+-[TYPE1:int]-+--[mbeanName: bean1] -:- [ attr1:String , attr2:String ]
+ * | +--[mbeanName: bean2] -:- [ attr1:String , attr2:String ]
+ * |
+ * +-[TYPE2:int]----[mbeanName: bean3] ...
+ */
+ private var dataBuffer:Object;
+
+ // is this necessary!? can any reference to types[] be replaced with the keyset of displays?
+ private var types:Array;
+
+
+ ///////////////////////////
+ // Private variables
+ ///////////////////////////
+
+ private var minfo:MBeanInfo;
+ private var isInitialized:Boolean = false;
+
+ /**
+ * Map of ints, keeps track of how many mbeans of each type
+ * we've received from the server when processing getting
+ * data for any given type.
+ */
+ private var callbackCounters:Object;
+
+
+ private var _displayTypesObject:Object;
+
+ /**
+ * Dictionary of callback handlers for remote call results
+ * keyed by message correlationId.
+ */
+ private var callbackMap:Object;
+ protected var callbacks:Object;
+
+ // Keeps track whether a mbeanServer related fault is already handled .
+ private var faultAlreadyHandled:Boolean = false;
+
+ private var updateTimer:Object;
+
+ private var hiddenDomains:Array = [ "flex.runtime.Console" ];
+
+ ///////////////////////////
+ // Public console instance vars
+ ///////////////////////////
+
+ private var _currentApp:String;
+ public function set currentApp(name:String):void
+ {
+ _currentApp = name;
+
+ for (var listener:* in listeners)
+ {
+ // Todo: Update listeners so that they can clear their data buffers.
+ (listeners[listener].reference as UpdateListener).appChanged(name);
+ }
+ }
+ public function get currentApp():String
+ {
+ if (_currentApp == null)
+ {
+ if ((mbeanModel[0] != null) && (mbeanModel[0].label != null))
+ _currentApp = mbeanModel[0].label
+ else
+ return null
+
+ }
+ return _currentApp;
+ }
+
+ /**
+ * Handle to the MBean Server remote object.
+ */
+ private var _mbeanServer:RemoteObject;
+ public function get mbeanServer():RemoteObject
+ {
+ return _mbeanServer;
+ }
+
+ /**
+ * The MBeanName for the currently selected MBean.
+ */
+ private var _currentMBeanName:String;
+ public function get currentMBeanName():String
+ {
+ return _currentMBeanName;
+ }
+ public function set currentMBeanName(s:String):void
+ {
+ _currentMBeanName = s;
+ }
+
+ /**
+ * The MBeanInfo for the currently selected MBean.
+ */
+ private var _currentMBeanInfo:MBeanInfo;
+ public function get currentMBeanInfo():MBeanInfo
+ {
+ return _currentMBeanInfo;
+ }
+ public function set currentMBeanInfo(i:MBeanInfo):void
+ {
+ _currentMBeanInfo = i;
+ }
+
+ protected var _parent:DisplayObject
+ public function set parent(p:DisplayObject):void
+ {
+ _parent = p;
+ }
+
+ public function set timerInterval(interval:int):void
+ {
+ if (interval > 0)
+ {
+ updateTimer.timer.stop();
+ updateTimer.timer = new Timer(interval, 0);
+ updateTimer.timer.addEventListener(TimerEvent.TIMER, pollServer);
+ updateTimer.timer.start();
+ }
+ }
+
+ protected static var privateCall:Boolean;
+ protected static var instance:ConsoleManager;
+
+
+ ////////////////////////////
+ // Console methods
+ ////////////////////////////
+
+ public static function getInstance():ConsoleManager
+ {
+ if (instance == null)
+ {
+ privateCall = true;
+ ConsoleManager.instance = new ConsoleManager();
+ privateCall = false;
+ }
+
+ return ConsoleManager.instance;
+ }
+
+ /**
+ * Initializes the console, and requests the names of
+ * registered Flex MBeans.
+ */
+ public function ConsoleManager():void
+ {
+ if (!privateCall)
+ throw new Error ("This is a Singleton Class!");
+
+ // Create data structures used:
+ _mbeanModel = [];
+ callbacks = {};
+ displays = {};
+ listeners = {};
+ dataBuffer = {};
+ activeListeners = {};
+ _displayTypesObject = {};
+ callbackCounters = {};
+ callbackCounters.dataFetch = {};
+ callbackCounters.typeCount = 0;
+ callbackCounters.appCount = 0;
+
+ _mbeanServer = new RemoteObject("RuntimeManagement");
+ _mbeanServer.addEventListener("result", handleResult);
+ _mbeanServer.addEventListener("fault", handleFault);
+
+ var token:Object = _mbeanServer.getFlexMBeanObjectNames();
+ callbacks[token.message.messageId] = handleMBeanObjectNames;
+ }
+
+
+ public function setAttribute(mbean:String, attribute:String, newValue:Object):void
+ {
+ var attr:Attribute = new Attribute;
+ attr.name = attribute;
+ attr.value = newValue;
+ mx.controls.Alert.show(attr.toString());
+ _mbeanServer.setAttribute(mbean, attr);
+ }
+
+ /**
+ * Register a display panel that implements the UpdateListener interface, passing
+ * in an array, 'regtypes' which contains a list of every display type and
+ * whether or not the type should be polled.
+ */
+ public function registerListener(listener:UpdateListener, regtypes:Array):void
+ {
+ listeners[listener.name] = {reference: listener, types: regtypes};
+ }
+
+ public function unregisterListener(listener:UpdateListener):void
+ {
+ if (listeners[listener.name])
+ {
+ deactivateListener(listener);
+ delete listeners[listener.name];
+ }
+ }
+
+ /**
+ * When a listener is activated using this method, the types are found in the listeners
+ * map and for each type:
+ *
+ * If polling is enabled, we add the listener to the activeListeners map for the types
+ * it listens to.
+ *
+ * If polling is not enabled, we just poll the server once.
+ */
+ public function activateListener(listener:UpdateListener):void
+ {
+ var typesForListener:Array;
+ try
+ {
+ typesForListener = listeners[listener.name].types;
+ }
+ catch (error:Error)
+ {
+ // nothing to do for this listener!
+ }
+
+ if (typesForListener == null)
+ return;
+
+ for (var i:int = 0; i < typesForListener.length; i++)
+ {
+ var type:int = typesForListener[i].type;
+ getDataForType(type, listener);
+
+ if (typesForListener[i].poll)
+ {
+ if (!activeListeners[type])
+ {
+ updateTimer.activeTypesCounter++;
+ activeListeners[type] = new ArrayCollection;
+ }
+
+ (activeListeners[type] as ArrayCollection).addItem(listener);
+
+ if (!updateTimer.timer.running)
+ updateTimer.timer.start();
+ }
+ }
+ }
+
+ public function deactivateListener(listener:UpdateListener):void
+ {
+ // can't deactivate a non-registered listener!
+ if (!listeners[listener.name])
+ return;
+
+ var typesForListener:Array = listeners[listener.name].types;
+ if (typesForListener == null)
+ return;
+
+ for (var i:int = 0; i < typesForListener.length; i++)
+ {
+ var type:int = typesForListener[i].type;
+ if (typesForListener[i].poll)
+ {
+ if (activeListeners[type])
+ {
+ var indexOfListener:int = (activeListeners[type] as ArrayCollection).getItemIndex(listener);
+ if (indexOfListener != -1)
+ (activeListeners[type] as ArrayCollection).removeItemAt(indexOfListener);
+
+ if ((activeListeners[type] as ArrayCollection).length == 0)
+ {
+ delete activeListeners[type];
+
+ if (--updateTimer.activeTypesCounter == 0)
+ updateTimer.timer.stop();
+ }
+ }
+ }
+ }
+ }
+
+ public function addCallback(id:String, o:Object, f:Function):void
+ {
+ callbacks[id] = {object:o, callbackFunction:f};
+ }
+
+
+ public function getMBeanNamesForType(type:int):Array
+ {
+ if ((displays[type] == null) || (displays[type][_currentApp] == null))
+ return new Array;
+
+ return (displays[type][_currentApp] as Array);
+ }
+
+
+ public function getMBeanInfo(name:String, obj:Object, callback:Function):void
+ {
+ try
+ {
+ var token:Object = this.mbeanServer.getMBeanInfo(name);
+ this.addCallback(token.message.messageId,this,callback);
+ }
+ catch (e:Error)
+ {
+ // Ignore runtime error - we get a Fault back from the RPC operation.
+ }
+ }
+
+ /**
+ * Invoke an operation on an MBean.
+ */
+ public function invokeOperation(e:ManagementOperationInvokeEvent, callback:Function = null):void
+ {
+ if (callback == null)
+ {
+ callback = handleInvoke
+ }
+
+ try
+ {
+ var token:Object = _mbeanServer.invoke(e.mbean, e.name, e.values, e.signature);
+ callbacks[token.message.messageId] = callback;
+ }
+ catch (e:Error)
+ {
+ // Ignore runtime error - we get a Fault back from the RPC operation.
+ }
+ }
+
+ /**
+ * Request the current attribute values for an MBean.
+ */
+ public function getAllAttributes(name:String, info:MBeanInfo, obj:Object, callback:Function):void
+ {
+
+ // Fetch attribute values.
+ var attribNames:Array = [];
+ var n:int = info.attributes.length;
+ for (var i:int = 0; i < n; ++i)
+ {
+ var attribInfo:MBeanAttributeInfo = info.attributes[i];
+ // Ignore attributes that are MBean ObjectNames as all MBeans
+ // are rendered in the global tree and don't need to be repeated
+ // in the attributes this. Also ignore non-readable attributes.
+ if (attribInfo.readable && (attribInfo.type.indexOf("ObjectName") == -1))
+ {
+ attribNames.push(attribInfo.name);
+ }
+ }
+ if (attribNames.length)
+ {
+ getAttributes(name, attribNames, obj, callback);
+ }
+
+ }
+
+ public function getAttributes(name:String, attribs:Array, obj:Object, callback:Function):void
+ {
+ try
+ {
+ var token:Object = _mbeanServer.getAttributes(name, attribs);
+ this.addCallback(token.message.messageId, obj, callback);
+ }
+ catch (e:Error)
+ {
+ // Ignore runtime error - we get a Fault back from the RPC operation.
+ }
+ }
+
+
+ public function getChildTrees(...children):Array
+ {
+ var ret:Array = new Array;
+
+ for (var i:int = 0; i < children.length; i++)
+ {
+ if (children[i] is String)
+ {
+ (getChildTree(children[i]) as Array)
+ .forEach(function(it:*, i:int, a:Array):void { ret.push(it); });
+ }
+ }
+ return ret;
+ }
+
+ public function getChildTree(childName:String):Array
+ {
+ var appTree:Array;
+ for each (var app:Object in _mbeanModel)
+ {
+ if (app.label == currentApp)
+ {
+ // The only child of an application is the MessageBroker _class_ which could
+ // have multiple messagebrokerX _instances_ beneath it, but the
+ // first is selected. (Thus the multiple [0].children references.)
+ try
+ {
+ appTree = ((app.children as Array)[0].children as Array)[0].children as Array
+ }
+ catch (e:Error)
+ {
+ return new Array;
+ }
+ }
+ }
+
+ for each (var item:Object in appTree)
+ {
+ if (item.label == childName)
+ return item.children as Array;
+ }
+
+ return new Array;
+ }
+
+ public function getTypesForAttribute(mbean:String, attr:String):Array
+ {
+ var types:Array = [];
+ for (var type:* in displays)
+ {
+ if (displays[type][_currentApp] != null)
+ {
+ for (var b:String in displays[type][_currentApp])
+ {
+ if (mbean == b)
+ {
+ if ((displays[type][_currentApp][mbean] as Array).indexOf(attr) > -1)
+ types.push(type);
+ }
+ }
+ }
+ }
+
+ return types;
+ }
+
+ public function checkTypeForAttribute(type:int, mbean:String, attr:String):Boolean
+ {
+ if ((displays[type as String]) && (displays[type][_currentApp]) && (displays[type][_currentApp][mbean]))
+ if ((displays[type][_currentApp][mbean] as Array).indexOf(attr) > -1)
+ return true;
+
+ return false;
+ }
+
+ public function updateData(listener:UpdateListener):void
+ {
+ var listenerObject:Object = listeners[listener.name];
+ if (!listenerObject)
+ return;
+
+ for (var i:int = 0; i < (listenerObject.types as Array).length; i++)
+ getDataForType((listenerObject.types as Array)[i].type, listener);
+ }
+
+ private function getDataForType(type:int, singleListener:UpdateListener = null):void
+ {
+ if (!isInitialized)
+ {
+ // if we don't have the display data yet, we'll re-query the server and get the mbean object names
+ var objectnamesToken:Object = _mbeanServer.getFlexMBeanObjectNames();
+ callbacks[objectnamesToken.message.messageId] = handleMBeanObjectNames;
+
+ return;
+ }
+
+
+ if ((displays[type] == null) || (displays[type][_currentApp] == null))
+ return
+
+ // Dictionary of arrays keyed on mbeanName:the name of the
+ // mbean, and the associated array is the attributes to query
+ var mbeans:Object = new Object;
+ var queryLength:int = 0;
+
+ for (var mbean:String in displays[type][_currentApp])
+ ++queryLength;
+
+ for (var mbeanName:String in displays[type][_currentApp])
+ {
+ var token:Object = mbeanServer.getAttributes(currentApp+":"+mbeanName,
+ (displays[type][_currentApp][mbeanName] as ArrayCollection).toArray());
+
+ token.type = type;
+ token.mbeanName = mbeanName;
+ token.queryLength = queryLength;
+ token.singleListener = singleListener;
+ callbacks[token.message.messageId] = handleDataForType;
+ }
+ }
+
+ private function handleDataForType(e:ResultEvent):void
+ {
+ var type:int = e.token.type as int;
+ var mbeanName:String = e.token.mbeanName as String;
+ var singleListener:UpdateListener = e.token.singleListener;
+
+ if (!dataBuffer.hasOwnProperty(type))
+ dataBuffer[type] = new Object;
+
+ // Put the data for the mbean for the specific type of data in the proper place in the array
+ if (dataBuffer[type].hasOwnProperty(mbeanName))
+ delete dataBuffer[type][mbeanName];
+
+ dataBuffer[type][mbeanName] = e.result as Array;
+
+ if (!callbackCounters.dataFetch.hasOwnProperty(type)) callbackCounters.dataFetch[type] = 0;
+
+ if (++callbackCounters.dataFetch[type] == e.token.queryLength)
+ {
+ callbackCounters.dataFetch[type] = 0;
+
+ if (!singleListener)
+ {
+ var listenersToUpdate:ArrayCollection = activeListeners[type] as ArrayCollection;
+
+ if (!listenersToUpdate)
+ return;
+
+ for (var i:int = 0; i < listenersToUpdate.length; i++)
+ {
+ (listenersToUpdate[i] as UpdateListener).dataUpdate(type, dataBuffer[type]);
+ }
+ }
+ else
+ {
+ singleListener.dataUpdate(type, dataBuffer[type]);
+ }
+ }
+ }
+
+ /**
+ * Handle any results from the MBean Server remote object by
+ * delegating to the associated callback based on correlationId.
+ */
+ protected function handleResult(e:ResultEvent):void
+ {
+ var msg:AsyncMessage = AsyncMessage(e.message);
+ if (msg.correlationId in callbacks)
+ {
+ var callback:Object = callbacks[msg.correlationId];
+ delete callbacks[msg.correlationId];
+ if (callback is Function)
+ {
+ callback(e);
+ }
+ else
+ {
+ if ((callback.hasOwnProperty("object")) && (callback.hasOwnProperty("callbackFunction")))
+ {
+ var f:Function = callback.callbackFunction;
+ f.call(callback.object, e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Handle any faults from the MBean Server remote object by
+ * displaying an alert to the user.
+ */
+ protected function handleFault(e:FaultEvent):void
+ {
+ if (!faultAlreadyHandled)
+ {
+ mx.controls.Alert.show("Please restart the application since polling has stopped due to the following error: " + e.toString());
+ if (updateTimer != null)
+ {
+ updateTimer.activeTypesCounter = 0;
+ updateTimer.timer.stop();
+ }
+ faultAlreadyHandled = true;
+ }
+ }
+
+ /**
+ * Handles the result of a getFlexMBeanObjectNames() call.
+ */
+ protected function handleMBeanObjectNames(e:ResultEvent):void
+ {
+ var i:int;
+ // Build the model for our MBeans.
+ var mbeanNames:Array = e.result as Array;
+ var domainNames:Array = [];
+ var domainMBeanNames:Object = {};
+ var mbeanName:ObjectName;
+ var n:int = mbeanNames.length;
+ if (n)
+ {
+ for (i = 0; i < n; ++i)
+ {
+ mbeanName = mbeanNames[i];
+ if (hiddenDomains.indexOf(mbeanName.domain) >= 0)
+ {
+
+ }
+ else if (mbeanName.domain in domainMBeanNames)
+ {
+ domainMBeanNames[mbeanName.domain].push(mbeanName);
+ }
+ else
+ {
+ domainNames.push(mbeanName.domain);
+ domainMBeanNames[mbeanName.domain] = [mbeanName];
+ }
+ }
+ _mbeanModel = [];
+ domainNames.sort();
+ callbackCounters.appCount = domainNames.length;
+ var n2:int = domainNames.length;
+ for (i = 0; i < n2; ++i)
+ {
+ buildDomain(domainNames[i], domainMBeanNames[domainNames[i]]);
+
+ if (_displayTypesObject[domainNames[i]] != null)
+ {
+ var token:Object = _mbeanServer.getAttributes(
+ _displayTypesObject[domainNames[i]].canonicalName, ["SupportedTypes"]);
+
+ token.beanName = _displayTypesObject[domainNames[i]].canonicalName;
+ addCallback(token.message.messageId, this, handleSupportedTypesMBean);
+ }
+ }
+
+ }
+ }
+
+ /**
+ * Process the display types that the server has registered. Another function
+ * handles querying the MBean server for all of the actual attributes supported
+ * by the given display type.
+ */
+ private function handleSupportedTypesMBean(e:ResultEvent):void
+ {
+ if ((e.result as Array)[0].name != "SupportedTypes")
+ {
+ return;
+ }
+
+ types = (e.result as Array)[0].value;
+ callbackCounters.typeCount = types.length;
+ for (var i:int = 0; i < types.length; i++)
+ {
+ var invokeEvent:ManagementOperationInvokeEvent = new ManagementOperationInvokeEvent(
+ e.token.beanName,
+ "listForType",
+ [types[i]],
+ ["int"]);
+
+ invokeOperation(invokeEvent, getTypesHandler);
+ }
+ }
+
+ /**
+ * Handles the attribute _names_ for a given type which the server is sending
+ */
+ private function getTypesHandler(e:ResultEvent):void
+ {
+ --callbackCounters.typeCount;
+
+ // Get the defined TYPE from the token
+ var type:int = e.token.message.body[2][0];
+
+ for each (var str:String in (e.result as Array))
+ {
+ var mbeanAttr:Array = str.split(":");
+
+ if (!displays.hasOwnProperty(type))
+ displays[type] = new Object;
+
+ if (!displays[type].hasOwnProperty(mbeanAttr[0]))
+ displays[type][mbeanAttr[0]] = new Object;
+
+ var exposedObjectInfo:Object = new Object;
+
+ if (!displays[type][mbeanAttr[0]].hasOwnProperty(mbeanAttr[1]))
+ displays[type][mbeanAttr[0]][mbeanAttr[1]] = new ArrayCollection();
+
+ (displays[type][mbeanAttr[0]][mbeanAttr[1]] as ArrayCollection).addItem(mbeanAttr[2]);
+ }
+
+ if (callbackCounters.typeCount == 0)
+ {
+ initialize();
+ }
+ }
+
+ /**
+ * Function for handling what to do after all of the necessary mbea
+ * data has been polled for the first time.
+ */
+ private function initialize():void
+ {
+ // now we can poll for data based on a given display type
+ isInitialized = true;
+
+ // We've received and processed all of the display type information
+ // so we can notify the listeners
+ for each (var listener:Object in listeners)
+ {
+ (listener.reference as UpdateListener).mbeanModelUpdate(mbeanModel);
+ }
+
+ updateTimer = new Object;
+
+ updateTimer.timer = new Timer(TIMER_INTERVAL);
+ updateTimer.activeTypesCounter = 0;
+ updateTimer.timer.addEventListener(TimerEvent.TIMER, pollServer);
+ }
+
+ private function pollServer(e:Event):void
+ {
+ for (var type:* in activeListeners)
+ {
+ getDataForType(type);
+ }
+ }
+
+ /**
+ * Builds a top level domain node containing all MBeans
+ * within the domain.
+ */
+ private function buildDomain(domain:String, objectNames:Array):void
+ {
+ var domainNode:Object = {label: domain, children: []};
+ // Process all of the MBean names in this domain.
+ // Put them in sorted order to optimize tree construction.
+ objectNames.sort(compareObjectNames);
+ var n:int = objectNames.length;
+ for (var i:int = 0; i < n; ++i)
+ {
+ buildMBeanNode(domainNode, objectNames[i]);
+ }
+ _mbeanModel.push(domainNode);
+ }
+
+ /**
+ * Comparator function for sorting MBean object names.
+ */
+ private function compareObjectNames(first:ObjectName, second:ObjectName):int
+ {
+ var firstType:String = first.getKeyProperty("type").toLowerCase();
+ var secondType:String = second.getKeyProperty("type").toLowerCase();
+ if (firstType > secondType)
+ return 1;
+ else if (firstType < secondType)
+ return -1;
+ else // Types match - compare on id.
+ {
+ var firstId:String = first.getKeyProperty("id").toLowerCase();
+ var secondId:String = second.getKeyProperty("id").toLowerCase();
+ return (firstId > secondId) ? 1 : (firstId < secondId) ? -1 : 0;
+ }
+ }
+
+ /**
+ * Builds and adds a tree node based on the MBean object name.
+ */
+ private function buildMBeanNode(parent:Object, name:ObjectName):void
+ {
+ var types:Array = name.getKeyProperty("type").split('.');
+ var mbeanId:String = name.getKeyProperty("id") as String;
+ // Sink to our insertion point in the type hierarchy, adding type nodes
+ // along the way when necessary.
+ var n:int = types.length;
+ for (var i:int = 0; i < n; ++i)
+ {
+ if (types[i] == "AdminConsoleDisplay")
+ {
+ var app:String = ((name.canonicalName as String).split(":") as Array)[0];
+ _displayTypesObject[app] = name;
+ return;
+ }
+ }
+
+ for (i = 0; i < n; ++i)
+ {
+ var createChildType:Boolean = true;
+ if (parent.children.length)
+ {
+ // Search for a child matching on current type. This is a linear search,
+ // but there generally aren't enough child nodes to warrant anything more performant.
+ var children:Array = parent.children;
+ var node:Object;
+ var n2:int = children.length;
+ for (var j:int = 0; j < n2; ++j)
+ {
+ node = children[j];
+ if (node.hasOwnProperty("type") && node.type == types[i])
+ {
+ parent = children[j];
+ createChildType = false;
+ // Check whether the parent type (container) node contains a child MBean node
+ // that matches on id. This is the ancestor MBean instance, out of all ancestors
+ // of this current type, that we're parented under.
+ // Again, a linear search because there generally aren't enough siblings of a
+ // given type to warrant anything more performant.
+ if (parent.children.length)
+ {
+ children = parent.children;
+ var n3:int = children.length;
+ for (var k:int = 0; k < n3; ++k)
+ {
+ node = children[k];
+ if (node.hasOwnProperty("objectName") &&
+ (node.objectName.getKeyProperty("id") == name.getKeyProperty(types[i])))
+ {
+ parent = node;
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ if (createChildType)
+ {
+ node = {label: types[i], type: types[i], children: []};
+ parent.children.push(node);
+ parent = node;
+ }
+ }
+ // We're done generating the ancestor hierarchy.
+ // Insert the MBean node.
+ if (parent.children.length)
+ {
+ // Simple linear search for insertion point among siblings for now.
+ var siblings:Array = parent.children;
+ var id:String = mbeanId.toLowerCase();
+ node;
+ n = siblings.length;
+ for (i = 0; i < n; ++i)
+ {
+ node = siblings[i];
+ if (node.hasOwnProperty("objectName") &&
+ (node.objectName.getKeyProperty("id").toLowerCase() > id))
+ {
+ mbeanNode = {label: mbeanId, objectName: name, children: []};
+ if (i == siblings.length)
+ siblings.push(mbeanNode);
+ else
+ siblings.splice(i+1, 0, mbeanNode);
+ return;
+ }
+ }
+ }
+ // Add the MBean node without specifying an index; no insertion point was found for it.
+ var mbeanNode:Object = {label: mbeanId, objectName: name, children: []};
+ parent.children.push(mbeanNode);
+ }
+
+
+
+ /**
+ * Handles the result of invoke().
+ */
+ private function handleInvoke(e:ResultEvent):void
+ {
+ if (_parent)
+ {
+ var resultWindow:ConsoleResultWindow = ConsoleResultWindow(PopUpManager.createPopUp(_parent, ConsoleResultWindow, false));
+ PopUpManager.centerPopUp(resultWindow);
+ if (e.result != null)
+ {
+ resultWindow.showResult(e.result);
+ }
+ else // A null result indicates success with a void return type.
+ {
+ resultWindow.showSuccess();
+ }
+ }
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/ConsoleTreeDataDescriptor.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/ConsoleTreeDataDescriptor.as b/attic/apps/ds-console/console/ConsoleTreeDataDescriptor.as
new file mode 100755
index 0000000..12329c7
--- /dev/null
+++ b/attic/apps/ds-console/console/ConsoleTreeDataDescriptor.as
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package console {
+
+import mx.collections.ArrayCollection;
+import mx.collections.ICollectionView;
+import mx.controls.treeClasses.ITreeDataDescriptor;
+
+public class ConsoleTreeDataDescriptor implements ITreeDataDescriptor {
+
+ public function getChildren(node:Object, model:Object=null):ICollectionView
+ {
+ if (node == null)
+ return null;
+ else if (node.hasOwnProperty("children") && (node.children.length > 0))
+ return new ArrayCollection(node.children);
+ else
+ return null;
+ }
+
+ public function hasChildren(node:Object, model:Object=null):Boolean
+ {
+ return true;
+ }
+
+
+ public function isBranch(node:Object, model:Object=null):Boolean
+ {
+ if (node == null)
+ return false;
+ else
+ return (node.hasOwnProperty("children") && (node.children.length > 0)) ? true : false;
+ }
+
+ public function getData(node:Object, model:Object=null):Object
+ {
+ return node;
+ }
+
+
+ public function addChildAt(node:Object, child:Object, index:int, model:Object=null):Boolean
+ {
+ return true;
+ }
+
+ public function removeChildAt(node:Object, child:Object, index:int, model:Object=null):Boolean
+ {
+ return true;
+ }
+
+}
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/AdvancedPanel.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/AdvancedPanel.as b/attic/apps/ds-console/console/containers/AdvancedPanel.as
new file mode 100755
index 0000000..5b73f3c
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/AdvancedPanel.as
@@ -0,0 +1,169 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console.containers
+{
+ import console.ConsoleManager;
+ import console.containers.*;
+ import console.events.*;
+ import mx.collections.ListCollectionView;
+ import mx.rpc.events.ResultEvent;
+ import mx.messaging.management.MBeanInfo;
+ import mx.messaging.management.MBeanAttributeInfo;
+ import mx.events.*;
+ import mx.controls.Tree;
+ import mx.controls.DataGrid;
+ import flash.events.Event;
+ import flash.events.MouseEvent;
+ import mx.containers.Box;
+
+ public class AdvancedPanel extends UpdateListener
+ {
+ private var display:AdvancedPanelDisplay;
+ private var _manager:ConsoleManager;
+ private var _currentMBeanName:String;
+ private var _currentMBeanInfo:MBeanInfo;
+
+ public function AdvancedPanel():void
+ {
+ super();
+ initialize();
+
+ percentWidth = 100;
+ percentHeight = 100;
+
+ display = new AdvancedPanelDisplay();
+ this.addChild(display);
+
+ label = "Generic Administration View";
+
+ display.mbeanTree.addEventListener(ListEvent.CHANGE, manageMBean);
+ display.attributeGrid.addEventListener(ListEvent.CHANGE, showSelectedValue);
+ display.refreshButton.addEventListener(MouseEvent.CLICK, handleRefreshClick);
+ display.operationsUI.tabnav = display.main;
+
+ _manager = ConsoleManager.getInstance();
+ _manager.registerListener(this, []);
+ display.operationsUI.addEventListener(ManagementOperationInvokeEvent.INVOKE, _manager.invokeOperation);
+ }
+
+ public override function mbeanModelUpdate(model:Object):void
+ {
+ display.mbeanTree.dataProvider = model;
+ }
+
+ /**
+ * Exposes a selected MBean for management.
+ */
+ private function manageMBean(e:Event):void
+ {
+ var node:Object = display.mbeanTree.selectedItem;
+ if (node && node.hasOwnProperty("objectName"))
+ {
+ _currentMBeanName = node["objectName"].canonicalName;
+ display.mbeanNameText.text = _currentMBeanName;
+ _manager.getMBeanInfo(_currentMBeanName, this, handleMBeanInfo);
+ }
+ }
+
+ /**
+ * Handles the result of getMBeanInfo().
+ */
+ public function handleMBeanInfo(e:ResultEvent):void
+ {
+ _currentMBeanInfo = MBeanInfo(e.result);
+ // Update string descriptions for the selected MBean.
+ display.mbeanClassText.text = _currentMBeanInfo.className;
+ display.mbeanDescriptionText.text = _currentMBeanInfo.description;
+ display.mbeanInfoOutput.text = _currentMBeanInfo.toString();
+ // Update the Operations tab.
+ display.operationsUI.mbeanInfo = _currentMBeanInfo;
+ display.operationsUI.mbeanName = _currentMBeanName;
+ // Fetch current attribute values for the selected MBean.
+ // Clear out currently selected attribute value.
+ display.selectedValueText.text = "";
+
+ if (_currentMBeanInfo.attributes.length)
+ {
+ _manager.getAllAttributes(_currentMBeanName, _currentMBeanInfo, this, handleAttributes);
+ }
+ }
+
+ /**
+ * Handles the refresh button click.
+ */
+ private function handleRefreshClick(event:MouseEvent):void
+ {
+ refreshAttributes();
+ }
+
+ /**
+ * Refreshes the displayed attribute values for the currently selected MBean.
+ */
+ private function refreshAttributes():void
+ {
+ if (_currentMBeanInfo != null)
+ {
+ _manager.getAllAttributes(_currentMBeanName, _currentMBeanInfo, this, handleAttributes);
+ }
+ }
+
+ /**
+ * Handles the result of getAttributes().
+ */
+ private function handleAttributes(e:ResultEvent):void
+ {
+ var attribs:Array = e.result as Array;
+ var attribLength:int = attribs.length;
+ display.attributeGrid.dataProvider = e.result;
+ // Show selected item value.
+ var index:int = display.attributeGrid.selectedIndex;
+ if (index != -1)
+ {
+ var item:Object = ListCollectionView(display.attributeGrid.dataProvider).getItemAt(index);
+ if ((item != null) && (item.value != null))
+ {
+ display.selectedValueText.text = item.value.toString();
+ }
+ }
+ else
+ {
+ display.selectedValueText.text = "";
+ }
+ }
+
+
+ /**
+ * Hack function to show the selected grid value - we should get rid of this with
+ * a nice attributes grid that renders values nicely in a selectable fashion.
+ */
+ private function showSelectedValue(e:Event):void
+ {
+ var value:Object = DataGrid(e.target).selectedItem.value;
+ if (value != null)
+ {
+ display.selectedValueText.text = value.toString();
+ }
+ else
+ {
+ display.selectedValueText.text = "null";
+ }
+ }
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/AdvancedPanelDisplay.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/AdvancedPanelDisplay.mxml b/attic/apps/ds-console/console/containers/AdvancedPanelDisplay.mxml
new file mode 100755
index 0000000..8db15cb
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/AdvancedPanelDisplay.mxml
@@ -0,0 +1,69 @@
+<?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:Box xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:console="console.containers.*" xmlns="*" width="100%" height="100%">
+
+ <mx:HDividedBox width="100%" height="100%">
+
+ <mx:VBox height="100%" width="300">
+ <mx:Label text="MBeans"/>
+ <mx:Tree id="mbeanTree" height="100%" width="100%" />
+ </mx:VBox>
+
+ <mx:VBox id="mbeanDetails" height="100%" width="100%">
+
+ <mx:HBox width="100%">
+ <mx:Label text="Name: "/>
+ <mx:Text id="mbeanNameText" width="100%" selectable="true"/>
+ </mx:HBox>
+
+ <mx:TabNavigator id="main" creationPolicy="all" width="100%" height="100%" tabWidth="150">
+
+ <mx:VBox label="Attributes" width="100%" height="100%">
+ <mx:HBox width="100%">
+ <mx:Label text="Selected Value: "/>
+ <mx:Text id="selectedValueText" text="" width="100%" selectable="true" />
+ </mx:HBox>
+ <mx:DataGrid id="attributeGrid" width="100%" height="100%" />
+ <mx:Button label="Refresh" id="refreshButton" />
+ </mx:VBox>
+
+ <mx:VBox label="Operations" id="operationTab" width="100%" height="100%">
+ <console:OperationSet id="operationsUI" />
+ </mx:VBox>
+
+ <mx:VBox label="Info" width="100%" height="100%" >
+ <mx:HBox width="100%">
+ <mx:Label text="MBean Class:"/>
+ <mx:Text id="mbeanClassText" width="100%" selectable="true"/>
+ </mx:HBox>
+ <mx:HBox width="100%">
+ <mx:Label text="Description:" />
+ <mx:Text id="mbeanDescriptionText" width="100%" selectable="true"/>
+ </mx:HBox>
+ <mx:TextArea id="mbeanInfoOutput" height="100%" width="100%"/>
+ </mx:VBox>
+
+ </mx:TabNavigator>
+
+ </mx:VBox>
+
+ </mx:HDividedBox>
+
+</mx:Box>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/DefaultPanel.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/DefaultPanel.as b/attic/apps/ds-console/console/containers/DefaultPanel.as
new file mode 100755
index 0000000..43b4408
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/DefaultPanel.as
@@ -0,0 +1,41 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console.containers
+{
+ import console.ConsoleManager;
+ import mx.containers.Panel;
+ import flash.events.Event;
+
+ public class DefaultPanel extends UpdateListener
+ {
+ private var display:DefaultPanelDisplay;
+
+ public function DefaultPanel():void
+ {
+ super();
+ display = new DefaultPanelDisplay;
+ this.addChild(display);
+ label = "Console";
+
+ // No data is ever used, but to ensure compatibility with the rest of
+ // the app this panel still registers with the ConsoleManager
+ ConsoleManager.getInstance().registerListener(this, []);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/DefaultPanelDisplay.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/DefaultPanelDisplay.mxml b/attic/apps/ds-console/console/containers/DefaultPanelDisplay.mxml
new file mode 100755
index 0000000..4088270
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/DefaultPanelDisplay.mxml
@@ -0,0 +1,29 @@
+<?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:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
+ <mx:TextArea width="100%" height="20%" editable="false" enabled="true" fontSize="12" paddingLeft="10" paddingRight="10">
+ <mx:htmlText>
+ <![CDATA[
+ <font size="18">Welcome to the <strong>Administration Console</font><br />
+ Get started by choosing a panel in the tab navigation above.<br />
+ ]]>
+ </mx:htmlText>
+ </mx:TextArea>
+</mx:VBox>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/DestinationManager.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/DestinationManager.as b/attic/apps/ds-console/console/containers/DestinationManager.as
new file mode 100755
index 0000000..323406e
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/DestinationManager.as
@@ -0,0 +1,238 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console.containers
+{
+ import console.data.Bindable3DHashMap;
+ import console.ConsoleManager;
+ import mx.collections.ArrayCollection;
+ import mx.events.ListEvent;
+ import flash.events.Event;
+ import mx.charts.LineChart;
+ import mx.charts.series.LineSeries;
+ import mx.controls.listClasses.ListBase;
+ import mx.events.CollectionEvent;
+
+ public class DestinationManager extends UpdateListener
+ {
+ private static const pollableTypes:Array = [
+ ConsoleManager.DESTINATION_POLLABLE ];
+
+ private var _manager:ConsoleManager;
+ private var display:DestinationManagerDisplay;
+ private var selectedDestinationId:String;
+ private var selectedMBean:String;
+ private var dataCache:Bindable3DHashMap;
+ private var pollableAttributes:Object;
+
+ [Bindable]
+ private var selectedBeanProperties:ArrayCollection;
+
+ [Bindable]
+ private var selectedPropertyValues:ArrayCollection;
+
+ public override function dataUpdate(type:int, data:Object):void
+ {
+ var dataArray:ArrayCollection = new ArrayCollection;
+
+ // This finds any exposed properties under any destination node and
+ // adds them to the proper data structures so that all data in MBeans
+ // underneath destinations can be accesed by the destination's id
+ for (var name:String in data)
+ {
+ var mapKey:String;
+ var mapValue:String;
+
+ // Gets all properties for this MBean
+ var propertyArrayForMBean:Array = data[name];
+
+ // split the mbean name on the commas, then split on the periods and get the last
+ // type. if it contains destination, insert it into the array
+ // otherwise find the destination tag and insert it into it's data cache key.
+ var mbeanNames:Array = name.split(",");
+
+ // find the actual type of this MBean, and if it is a Destination, we can use the id
+ // as the map key, otherwise, we have to find the MBean's parent which is a Destination
+ var types:Array = (mbeanNames[mbeanNames.length - 1] as String).split(".");
+ if ((types[types.length - 1] as String).indexOf("Destination") >= 0)
+ {
+ // we are going after the id pairing here, most often it will be the second
+ // to last pair but since WAS 6.1 inserts nodes and servers into
+ // the MBean name it may not be the case. For optimization we'll still
+ // go after the second to last pair, but will verify that this is indeed
+ // the id pair and if not will look for it explicitly.
+ var namePair:Array = (mbeanNames[mbeanNames.length - 2] as String).split("=");
+
+ mapKey = namePair[0];
+ mapValue = namePair[1];
+ if (mapKey != "id")
+ {
+ // did not find id where expected go through entire name pair collection
+ // looking for the id pair
+ for each (var mbeanNamePair:String in mbeanNames)
+ {
+ var loopNamePair:Array = mbeanNamePair.split("=");
+ mapKey =loopNamePair[0];
+ mapValue = loopNamePair[1];
+ if (mapKey == "id")
+ {
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ for each (var id:String in mbeanNames)
+ {
+ if (id.indexOf("Destination") >= 0)
+ {
+ // Get the Destination's id name as the key into the map
+ mapValue = id.split("=")[1];
+ break;
+ }
+ }
+ }
+
+ // For each property, add the property and value to the appropriate map
+ for (var i:int = 0; i < propertyArrayForMBean.length; i++)
+ {
+ if (pollableTypes.indexOf(type) >= 0)
+ dataCache.update(mapValue, propertyArrayForMBean[i].name, propertyArrayForMBean[i].value);
+ else
+ dataCache.updateNoPollable(mapValue, propertyArrayForMBean[i].name, propertyArrayForMBean[i].value)
+ }
+ }
+ }
+
+ public override function mbeanModelUpdate(model:Object):void
+ {
+ refreshDestinations();
+ }
+
+ public function DestinationManager():void
+ {
+ super();
+ display = new DestinationManagerDisplay;
+ this.addChild(display);
+
+ this.label = "Destination Management";
+
+ _manager = ConsoleManager.getInstance();
+ var registerTypes:Array = [
+ {type: ConsoleManager.DESTINATION_GENERAL, poll: false},
+ {type: ConsoleManager.DESTINATION_POLLABLE, poll: true},
+ ];
+
+ _manager.registerListener(this, registerTypes);
+ display.dataList.addEventListener(ListEvent.CHANGE, selectedService);
+ display.httpList.addEventListener(ListEvent.CHANGE, selectedService);
+ display.messageList.addEventListener(ListEvent.CHANGE, selectedService);
+ display.remotingList.addEventListener(ListEvent.CHANGE, selectedService);
+
+ display.destinationAttributes.addEventListener(ListEvent.CHANGE, selectedAttribute);
+
+ pollableAttributes = new Object;
+ dataCache = new Bindable3DHashMap();
+
+ selectedBeanProperties = new ArrayCollection();
+ selectedPropertyValues = new ArrayCollection();
+ }
+
+ private function selectedAttribute(e:Event):void
+ {
+ var property:String = e.target.selectedItem.Property as String;
+ var ret:ArrayCollection = dataCache.getBindableDataArray(selectedDestinationId, property);
+ if ((ret != null) && (ret.length >= 0))
+ {
+ display.attrgraph.dataProvider = ret;
+ display.graphLabel.text = property;
+ }
+ /*
+ return;
+
+ for (var type:* in pollableAttributes)
+ {
+ for each (var pollable:Object in pollableAttributes[type][selectedDestinationId])
+ {
+ if (pollable.name == property)
+ {
+ display.attrgraph.dataProvider = dataCache.getBindableDataArray(selectedDestinationId, property);
+ display.graphLabel.text = property;
+ return;
+ }
+ }
+ }
+ */
+ }
+
+ private function selectedService(e:Event):void
+ {
+ selectedDestinationId = e.currentTarget.selectedItem.label;
+ selectedMBean = e.currentTarget.selectedItem.objectName.canonicalName.split(":")[1];
+ display.destinationAttributes.dataProvider = dataCache.getBindableKeyArray(selectedDestinationId);
+ display.selectedProperty.text = e.currentTarget.selectedItem.label;
+ display.graphLabel.text = null;
+ display.attrgraph.dataProvider = null;
+
+ if (e.currentTarget != display.httpList)
+ display.httpList.selectedIndex = -1;
+ if (e.currentTarget != display.messageList)
+ display.messageList.selectedIndex = -1;
+ if (e.currentTarget != display.dataList)
+ display.dataList.selectedIndex = -1;
+ if (e.currentTarget != display.remotingList)
+ display.remotingList.selectedIndex = -1;
+ }
+
+ public override function appChanged(s:String):void
+ {
+ dataCache.clearData();
+ refreshDestinations();
+ display.destinationAttributes.dataProvider = null;
+ display.selectedProperty.text = null;
+ display.graphLabel.text = null;
+ display.attrgraph.dataProvider = null;
+ }
+
+ private function refreshDestinations():void
+ {
+ // TODO: Handle not having any specific services gracefully
+ display.dataList.dataProvider = getChildTree("DataService");
+ display.httpList.dataProvider = getChildTree("HTTPProxyService");
+ display.messageList.dataProvider = getChildTree("MessageService");
+ display.remotingList.dataProvider = getChildTree("RemotingService");
+ }
+
+ /**
+ * This is just a helper method to find the proper MBeans for each Service
+ * from the ConsoleManager's model. The model is a complicated structure
+ * of maps and arrays.
+ */
+ private function getChildTree(child:String):Array
+ {
+ var childArray:Array = _manager.getChildTree(child);
+ if ((childArray.length > 0) && (childArray[0].hasOwnProperty("children")))
+ childArray = childArray[0].children as Array;
+ if ((childArray.length > 0) && (childArray[0].hasOwnProperty("children")))
+ childArray = childArray[0].children as Array;
+
+ return childArray;
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/DestinationManagerDisplay.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/DestinationManagerDisplay.mxml b/attic/apps/ds-console/console/containers/DestinationManagerDisplay.mxml
new file mode 100755
index 0000000..da46e3f
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/DestinationManagerDisplay.mxml
@@ -0,0 +1,61 @@
+<?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:Box xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
+ <mx:HDividedBox width="100%" height="100%">
+ <mx:VDividedBox height="100%" width="350">
+ <mx:DataGrid id="httpList" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn headerText="HTTP Proxy Service" dataField="label" />
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:DataGrid id="messageList" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn headerText="Message Service" dataField="label" />
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:DataGrid id="dataList" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn headerText="Data Service" dataField="label" />
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:DataGrid id="remotingList" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn headerText="Remoting Service" dataField="label" />
+ </mx:columns>
+ </mx:DataGrid>
+ </mx:VDividedBox>
+ <mx:VDividedBox height="100%">
+ <mx:HBox>
+ <mx:Label text="Selected Attribute" />
+ <mx:Text id="selectedProperty" />
+ </mx:HBox>
+ <mx:DataGrid id="destinationAttributes" width="100%" height="50%" />
+ <mx:Label id="graphLabel" />
+ <mx:LineChart id="attrgraph" width="100%">
+ <mx:verticalAxis>
+ <mx:LinearAxis id="attrgraphAxis" />
+ </mx:verticalAxis>
+ <mx:series>
+ <mx:LineSeries id="attrgraphSeries" yField="Value" />
+ </mx:series>
+ </mx:LineChart>
+ </mx:VDividedBox>
+ </mx:HDividedBox>
+</mx:Box>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/EndpointManager.as
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/EndpointManager.as b/attic/apps/ds-console/console/containers/EndpointManager.as
new file mode 100755
index 0000000..3523721
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/EndpointManager.as
@@ -0,0 +1,149 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package console.containers
+{
+ import console.data.Bindable3DHashMap;
+ import console.ConsoleManager;
+ import mx.collections.ArrayCollection;
+ import mx.events.ListEvent;
+ import flash.events.Event;
+ import mx.charts.LineChart;
+ import mx.charts.series.LineSeries;
+ import mx.controls.listClasses.ListBase;
+ import mx.events.CollectionEvent;
+
+ public class EndpointManager extends UpdateListener
+ {
+ private static const pollableTypes:Array = [
+ ConsoleManager.ENDPOINT_POLLABLE ];
+
+ private var _manager:ConsoleManager;
+ private var display:EndpointManagerDisplay;
+ private var selectedMBean:String;
+ private var dataCache:Bindable3DHashMap;
+ private var pollableAttributes:Object;
+
+ [Bindable]
+ private var selectedBeanProperties:ArrayCollection;
+
+ [Bindable]
+ private var selectedPropertyValues:ArrayCollection;
+
+ public override function dataUpdate(type:int, data:Object):void
+ {
+ var dataArray:ArrayCollection = new ArrayCollection;
+
+ for (var name:String in data)
+ {
+
+ var propertyArrayForMBean:Array = data[name];
+
+ for (var i:int = 0; i < propertyArrayForMBean.length; i++)
+ {
+ dataCache.update(name, propertyArrayForMBean[i].name, propertyArrayForMBean[i].value);
+ }
+ }
+
+ if (pollableTypes.indexOf(type) >= 0)
+ pollableAttributes[type] = data;
+ }
+
+ public override function mbeanModelUpdate(model:Object):void
+ {
+ refreshEndpoints();
+ }
+
+ public function EndpointManager():void
+ {
+ super();
+ display = new EndpointManagerDisplay;
+ this.addChild(display);
+
+ this.label = "Endpoint Management";
+
+ _manager = ConsoleManager.getInstance();
+ var registerTypes:Array = [
+ {type: ConsoleManager.ENDPOINT_POLLABLE, poll: true},
+ {type: ConsoleManager.ENDPOINT_SCALAR, poll: false}
+ ]
+ _manager.registerListener(this, registerTypes);
+ display.rtmpEndpointsList.addEventListener(ListEvent.CHANGE, selectedEndpoint);
+ display.amfEndpointsList.addEventListener(ListEvent.CHANGE, selectedEndpoint);
+ display.httpEndpointsList.addEventListener(ListEvent.CHANGE, selectedEndpoint);
+
+ display.endpointAttributes.addEventListener(ListEvent.CHANGE, selectedAttribute);
+
+ pollableAttributes = new Object;
+ dataCache = new Bindable3DHashMap();
+
+ selectedBeanProperties = new ArrayCollection();
+ selectedPropertyValues = new ArrayCollection();
+ }
+
+ private function selectedAttribute(e:Event):void
+ {
+ var property:String = e.currentTarget.selectedItem.Property as String;
+ for (var type:* in pollableAttributes)
+ {
+ for each (var pollable:Object in pollableAttributes[type][selectedMBean])
+ {
+ if (pollable.name == property)
+ {
+ display.attrgraph.dataProvider = dataCache.getBindableDataArray(selectedMBean, property);
+ display.graphLabel.text = property;
+ return;
+ }
+ }
+ }
+ }
+
+ private function selectedEndpoint(e:Event):void
+ {
+ selectedMBean = ((e.currentTarget.selectedItem.objectName.canonicalName as String).split(":") as Array)[1];
+ display.endpointAttributes.dataProvider = dataCache.getBindableKeyArray(selectedMBean);
+ display.selectedProperty.text = e.currentTarget.selectedItem.label;
+ display.graphLabel.text = null;
+ display.attrgraph.dataProvider = null;
+
+ if (e.currentTarget != display.amfEndpointsList)
+ display.amfEndpointsList.selectedIndex = -1;
+ if (e.currentTarget != display.httpEndpointsList)
+ display.httpEndpointsList.selectedIndex = -1;
+ if (e.currentTarget != display.rtmpEndpointsList)
+ display.rtmpEndpointsList.selectedIndex = -1;
+ }
+
+ public override function appChanged(s:String):void
+ {
+ dataCache.clearData();
+ refreshEndpoints();
+ display.endpointAttributes.dataProvider = null;
+ display.selectedProperty.text = null;
+ display.graphLabel.text = null;
+ display.attrgraph.dataProvider = null;
+ }
+
+ private function refreshEndpoints():void
+ {
+ display.httpEndpointsList.dataProvider = _manager.getChildTrees("HTTPEndpoint", "StreamingHTTPEndpoint", "NIOHTTPEndpoint", "StreamingNIOHTTPEndpoint");
+ display.rtmpEndpointsList.dataProvider = _manager.getChildTree("RTMPEndpoint");
+ display.amfEndpointsList.dataProvider = _manager.getChildTrees("AMFEndpoint", "StreamingAMFEndpoint", "NIOAMFEndpoint", "StreamingNIOAMFEndpoint");
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/ds-console/console/containers/EndpointManagerDisplay.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/ds-console/console/containers/EndpointManagerDisplay.mxml b/attic/apps/ds-console/console/containers/EndpointManagerDisplay.mxml
new file mode 100755
index 0000000..6d4ecbe
--- /dev/null
+++ b/attic/apps/ds-console/console/containers/EndpointManagerDisplay.mxml
@@ -0,0 +1,56 @@
+<?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:Box xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
+ <mx:HDividedBox width="100%" height="100%">
+ <mx:VDividedBox height="100%" width="350">
+ <mx:DataGrid id="rtmpEndpointsList" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn headerText="RTMP Endpoints" dataField="label" />
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:DataGrid id="httpEndpointsList" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn headerText="HTTP Endpoints" dataField="label" />
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:DataGrid id="amfEndpointsList" width="100%">
+ <mx:columns>
+ <mx:DataGridColumn headerText="AMF Endpoints" dataField="label" />
+ </mx:columns>
+ </mx:DataGrid>
+ </mx:VDividedBox>
+ <mx:VDividedBox height="100%">
+ <mx:HBox>
+ <mx:Label text="Selected Endpoint" />
+ <mx:Text id="selectedProperty" />
+ </mx:HBox>
+ <mx:DataGrid id="endpointAttributes" width="100%" height="50%" />
+ <mx:Label id="graphLabel" />
+ <mx:LineChart id="attrgraph" width="100%">
+ <mx:verticalAxis>
+ <mx:LinearAxis id="attrgraphAxis" />
+ </mx:verticalAxis>
+ <mx:series>
+ <mx:LineSeries id="attrgraphSeries" yField="Value" />
+ </mx:series>
+ </mx:LineChart>
+ </mx:VDividedBox>
+ </mx:HDividedBox>
+</mx:Box>
[07/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/src/Main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/src/Main.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/src/Main.mxml
new file mode 100755
index 0000000..ca2d828
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/src/Main.mxml
@@ -0,0 +1,87 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ applicationComplete="applicationCompleteHandler()">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.messaging.ChannelSet;
+ import mx.messaging.channels.AMFChannel;
+ import mx.controls.Alert;
+ import mx.rpc.events.FaultEvent;
+
+ private function applicationCompleteHandler():void
+ {
+ var channel:AMFChannel = new AMFChannel("my-amf", "/samples-spring/messagebroker/amf");
+ var channelSet:ChannelSet = new ChannelSet();
+ channelSet.addChannel(channel);
+ ro.channelSet = channelSet;
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultString, "Error accessing RemoteObject");
+ }
+
+ private function login():void
+ {
+ ro.channelSet.login(userId.text, password.text);
+ }
+
+ private function logout():void
+ {
+ ro.channelSet.logout();
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- "productService" is defined in Spring's configuration file WEB-INF/config/web-application-config.xml
+ and provides remote access to the org.springframework.flex.samples.product.ProductDAO class -->
+ <s:RemoteObject id="ro" destination="securedProductService" fault="faultHandler(event)"/>
+ </fx:Declarations>
+
+ <s:layout>
+ <s:VerticalLayout paddingTop="12" paddingBottom="12" paddingLeft="12" paddingRight="12"/>
+ </s:layout>
+
+ <mx:Form>
+ <mx:FormItem label="User Id">
+ <s:TextInput id="userId"/>
+ </mx:FormItem>
+ <mx:FormItem label="Password">
+ <s:TextInput id="password" displayAsPassword="true"/>
+ </mx:FormItem>
+ <mx:FormItem direction="horizontal">
+ <s:Button label="Login" click="login()"/>
+ <s:Button label="Logout" click="logout()"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ <mx:DataGrid dataProvider="{ro.findAll.lastResult}" width="100%" height="100%"/>
+
+ <!-- the findAll() method is defined in org.springframework.flex.samples.product.ProductDAO -->
+ <s:Button label="Get Data" click="ro.findAll()"/>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.actionScriptProperties
new file mode 100755
index 0000000..21f0be4
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="traderdesktop.mxml" projectUUID="834611ae-9033-40d8-b18b-0ab770a9b52b" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="traderdesktop.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.project b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.project
new file mode 100755
index 0000000..5a543c3
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>traderdesktop</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/build.xml
new file mode 100755
index 0000000..2337e47
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="traderdesktop" />
+ <property name="application.file" value="traderdesktop" />
+ <property name="application.bin.dir" value="${samples-spring.war}/traderdesktop" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/traderdesktop/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[09/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/src/simplepush.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/src/simplepush.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/src/simplepush.mxml
new file mode 100755
index 0000000..89ffe75
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/simplepush/src/simplepush.mxml
@@ -0,0 +1,53 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.messaging.messages.IMessage;
+
+ private function messageHandler(message:IMessage):void
+ {
+ pushedValue.text = ""+ message.body;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:ChannelSet id="cs">
+ <mx:StreamingAMFChannel uri="/samples-spring/messagebroker/streamingamf"/>
+ <mx:AMFChannel uri="/samples-spring/messagebroker/amflongpolling"/>
+ <mx:AMFChannel uri="/samples-spring/messagebroker/amfpolling"/>
+ </mx:ChannelSet>
+
+ <mx:Consumer id="consumer" destination="simple-feed" channelSet="{cs}"
+ message="messageHandler(event.message)"/>
+ </fx:Declarations>
+
+ <s:TextInput id="pushedValue" width="250" verticalCenter="0" horizontalCenter="0"/>
+
+ <s:Button label="Subscribe" click="consumer.subscribe()" enabled="{!consumer.subscribed}" verticalCenter="30" horizontalCenter="-50"/>
+ <s:Button label="Unsubscribe" click="consumer.unsubscribe()" enabled="{consumer.subscribed}" verticalCenter="30" horizontalCenter="50"/>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.actionScriptProperties
new file mode 100755
index 0000000..b426059
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="Main.mxml" projectUUID="f21aa2f0-00b4-41cf-8fec-e942e9473bf9" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="Main.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.project b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.project
new file mode 100755
index 0000000..4fdaeb1
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>spring-blazeds-101</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/build.xml
new file mode 100755
index 0000000..9d4ffe0
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="spring-blazeds-101" />
+ <property name="application.file" value="Main" />
+ <property name="application.bin.dir" value="${samples-spring.war}/spring-blazeds-101" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/spring-blazeds-101/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[03/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/build.xml b/attic/apps/samples/WEB-INF/flex-src/inventory/build.xml
new file mode 100755
index 0000000..d64e42e
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/inventory/build.xml
@@ -0,0 +1,82 @@
+<?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="Inventory Management" />
+ <property name="application.file" value="inventory" />
+ <property name="application.bin.dir" value="${samples.war}/inventory" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/inventory/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"
+ history="true"
+ express-install="true"
+ output="${application.bin.dir}"/>
+
+ <copy todir="${application.bin.dir}">
+ <fileset dir="${application.src.dir}" includes="*.jsp"/>
+ </copy>
+
+ </target>
+
+ <target name="clean" description="--> Removes jars and classes">
+ <delete quiet="true" includeemptydirs="true">
+ <fileset dir="${application.bin.dir}" includes="*.swf,index.html,*.jsp"/>
+ <fileset dir="${application.bin.dir}/history" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/Product.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/Product.as b/attic/apps/samples/WEB-INF/flex-src/inventory/src/Product.as
new file mode 100755
index 0000000..3d9b476
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/inventory/src/Product.as
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ [Bindable]
+ [RemoteClass(alias="flex.samples.product.Product")]
+ public class Product
+ {
+ public function Product()
+ {
+ }
+
+ public var productId:int;
+
+ public var name:String;
+
+ public var category:String;
+
+ public var price:Number = 0;
+
+ public var image:String;
+
+ public var description:String;
+
+ public var qtyInStock:int = 0;
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/ProductForm.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/ProductForm.mxml b/attic/apps/samples/WEB-INF/flex-src/inventory/src/ProductForm.mxml
new file mode 100755
index 0000000..9c553a5
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/inventory/src/ProductForm.mxml
@@ -0,0 +1,106 @@
+<?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:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
+ label="{product.productId > 0 ? product.name : 'New Product'}" width="100%" height="100%">
+
+ <mx:Script>
+ <![CDATA[
+ import mx.events.ValidationResultEvent;
+ import mx.rpc.events.ResultEvent;
+
+ [Bindable]
+ public var product:Product;
+
+ private function save():void
+ {
+ if (nameValidator.validate().type == ValidationResultEvent.INVALID) return;
+ product.name = productName.text;
+ product.category = category.text;
+ product.price = Number(price.text);
+ product.qtyInStock = parseInt(qtyInStock.text);
+ product.image = image.text;
+ product.description = description.text;
+ if (product.productId > 0)
+ srv.update(product);
+ else
+ srv.create(product);
+ }
+
+ private function createResult(event:ResultEvent):void
+ {
+ product = event.result as Product;
+ label = product.name;
+ }
+
+ private function removeResult(event:ResultEvent):void
+ {
+ parent.removeChild(this);
+ }
+
+
+ ]]>
+ </mx:Script>
+
+ <mx:StringValidator id="nameValidator" source="{productName}" property="text" minLength="1"/>
+
+ <mx:RemoteObject id="srv" destination="product">
+ <mx:method name="create" result="createResult(event)"/>
+ <mx:method name="remove" result="removeResult(event)"/>
+ </mx:RemoteObject>
+
+ <mx:Image source="../images/{product.image}" top="0" right="20" brokenImageSkin="@Embed('assets/blank.png')"/>
+
+ <mx:Form width="100%" verticalGap="8">
+
+ <mx:FormItem label="Id">
+ <mx:TextInput id="productId" text="{product.productId}" enabled="false"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Name" required="true">
+ <mx:TextInput id="productName" text="{product.name}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Category">
+ <mx:TextInput id="category" text="{product.category}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Image">
+ <mx:TextInput id="image" text="{product.image}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Price">
+ <mx:TextInput id="price" text="{product.price}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="In Stock">
+ <mx:TextInput id="qtyInStock" text="{product.qtyInStock}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Description" width="100%">
+ <mx:TextArea id="description" text="{product.description}" width="100%" height="100"/>
+ </mx:FormItem>
+
+ </mx:Form>
+
+ <mx:Button label="Save" click="save()" bottom="10" left="10" height="36" width="63"/>
+ <mx:Button label="Delete" click="srv.remove(product)" left="75" bottom="10" height="36" width="72"/>
+ <mx:Button label="Close Tab" click="parent.removeChild(this)" right="10" bottom="10" height="36" width="88"/>
+
+</mx:Canvas>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/SearchPopup.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/SearchPopup.mxml b/attic/apps/samples/WEB-INF/flex-src/inventory/src/SearchPopup.mxml
new file mode 100755
index 0000000..04b5ad4
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/inventory/src/SearchPopup.mxml
@@ -0,0 +1,96 @@
+<?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:List xmlns:mx="http://www.adobe.com/2006/mxml"
+ dropShadowEnabled="true"
+ currentState="hidden"
+ labelField="name"
+ keyDown="searchKeyDownHandler(event)"
+ click="openSelectedItem()">
+
+ <mx:Metadata>
+ [Event(name="select")]
+ </mx:Metadata>
+
+ <mx:Script>
+ <![CDATA[
+ import mx.rpc.events.ResultEvent;
+
+ import mx.collections.ArrayCollection;
+
+ public function search(searchStr:String):void
+ {
+ dataProvider = null;
+ srv.getProductsByName(searchStr);
+ if (currentState == "hidden") currentState = "";
+ }
+
+ protected function searchKeyDownHandler(event:KeyboardEvent):void
+ {
+ switch (event.keyCode)
+ {
+ case Keyboard.ENTER:
+ openSelectedItem();
+ break;
+ case Keyboard.ESCAPE:
+ currentState = "hidden";
+ break;
+ }
+ }
+
+ public function openSelectedItem():void
+ {
+ if (selectedItem)
+ {
+ dispatchEvent(new Event("select"));
+ currentState="hidden";
+ }
+ }
+
+ public function selectNext():void
+ {
+ selectedIndex++;
+ }
+
+ public function selectPrevious():void
+ {
+ if (selectedIndex > 0) selectedIndex--;
+ }
+
+ private function resultHandler(event:ResultEvent):void
+ {
+ dataProvider = event.result as ArrayCollection;
+ if (dataProvider && dataProvider.length > 0)
+ {
+ selectedIndex = 0;
+ }
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:RemoteObject id="srv" destination="product" result="resultHandler(event)"/>
+
+ <mx:states>
+ <mx:State name="hidden">
+ <mx:SetProperty name="visible" value="false"/>
+ </mx:State>
+ </mx:states>
+
+</mx:List>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/Thumbs.db
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/Thumbs.db b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/Thumbs.db
new file mode 100755
index 0000000..ad2bbe5
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/Thumbs.db differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/app_skin.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/app_skin.png b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/app_skin.png
new file mode 100755
index 0000000..48d919b
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/app_skin.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/blank.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/blank.png b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/blank.png
new file mode 100755
index 0000000..02f2d4b
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/blank.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_over_skin.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_over_skin.png b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_over_skin.png
new file mode 100755
index 0000000..a489605
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_over_skin.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_skin.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_skin.png b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_skin.png
new file mode 100755
index 0000000..5ac3c63
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/button_skin.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_close.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_close.png b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_close.png
new file mode 100755
index 0000000..ccb86db
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_close.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_plus.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_plus.png b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_plus.png
new file mode 100755
index 0000000..b4ecdba
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_plus.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_search.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_search.png b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_search.png
new file mode 100755
index 0000000..4f62019
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/icon_search.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/search.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/search.png b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/search.png
new file mode 100755
index 0000000..5f0e375
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/search.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/top_separator.png
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/top_separator.png b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/top_separator.png
new file mode 100755
index 0000000..f3848f6
Binary files /dev/null and b/attic/apps/samples/WEB-INF/flex-src/inventory/src/assets/top_separator.png differ
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/inventory.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/inventory.mxml b/attic/apps/samples/WEB-INF/flex-src/inventory/src/inventory.mxml
new file mode 100755
index 0000000..ff97b8f
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/inventory/src/inventory.mxml
@@ -0,0 +1,116 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
+ layout="absolute">
+
+ <mx:Script>
+ <![CDATA[
+
+ private function addItem():void
+ {
+ openTab(new Product())
+ }
+
+ public function openTab(product:Product):void
+ {
+ if (product.productId > 0)
+ {
+ // Check if product is already opened in an existing tab
+ var children:Array = tn.getChildren();
+ var length:int = children.length;
+ for (var i:int = 0; i<length; i++)
+ {
+ if (children[i].product.productId == product.productId)
+ {
+ tn.selectedIndex = i;
+ return;
+ }
+ }
+ }
+ var form:ProductForm = new ProductForm();
+ tn.addChild(form);
+ form.product = product;
+ tn.selectedChild = form;
+ }
+
+ private function search():void
+ {
+ searchPopup.search(searchStr.text);
+ }
+
+ // Handles keys pressed in the search TextInput field
+ protected function searchKeyDownHandler(event:KeyboardEvent):void
+ {
+ if (searchPopup.currentState == "hidden" && event.keyCode != Keyboard.DOWN)
+ {
+ return
+ }
+
+ switch (event.keyCode)
+ {
+ case Keyboard.DOWN:
+ if (searchPopup.currentState == "hidden") search();
+ searchPopup.selectNext();
+ break;
+ case Keyboard.UP:
+ searchPopup.selectPrevious();
+ searchStr.setSelection(searchStr.text.length, searchStr.text.length);
+ break;
+ case Keyboard.ENTER:
+ searchPopup.openSelectedItem();
+ break;
+ case Keyboard.ESCAPE:
+ searchPopup.currentState = "hidden";
+ break;
+ }
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Style source="styles.css"/>
+
+ <mx:Canvas styleName="appContainer" width="100%" height="100%"/>
+
+ <mx:Label text="Inventory Management" styleName="appTitle" left="22" top="10"/>
+
+ <mx:Button icon="@Embed('assets/icon_plus.png')" click="addItem()" toolTip="Add Product" width="31" height="29" right="243" top="10"/>
+
+ <mx:Image source="@Embed('assets/top_separator.png')" right="223" top="-4"/>
+
+ <mx:Image source="@Embed('assets/search.png')" right="69" top="16"/>
+ <mx:TextInput id="searchStr" borderStyle="none" backgroundAlpha="0" top="16" width="110" right="88" focusThickness="0" change="search()"
+ borderSkin="@Embed('assets/blank.png')"
+ keyDown="searchKeyDownHandler(event)"/>
+ <mx:Image source="@Embed('assets/icon_close.png')" visible="{searchPopup.currentState == ''}" right="78" top="21"
+ click="searchPopup.currentState = 'hidden'"/>
+
+
+ <mx:TabNavigator id="tn" right="10" top="60" bottom="10" left="10" />
+ <mx:Text width="480" verticalCenter="0" horizontalCenter="0" visible="{!tn.getChildren().length>0}" textAlign="center">
+ <mx:text>
+ Type a few characters in the Search box in the upper right corner to search for products.
+ For example type "no". You can also click the + button to add a new product.
+ </mx:text>
+ </mx:Text>
+
+ <SearchPopup id="searchPopup" top="52" right="50" width="180" height="250" select="openTab(searchPopup.selectedItem as Product)"/>
+
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/inventory/src/styles.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/inventory/src/styles.css b/attic/apps/samples/WEB-INF/flex-src/inventory/src/styles.css
new file mode 100755
index 0000000..1f20856
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/inventory/src/styles.css
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ */
+@namespace mx "library://ns.adobe.com/flex/mx";
+
+@font-face
+{
+ src: url("assets/fonts/MyriadWebPro.ttf");
+ font-family: main;
+ font-style: normal;
+ font-weight: normal;
+}
+
+@font-face
+{
+ src: url("assets/fonts/MyriadWebPro-Bold.ttf");
+ font-family: main;
+ font-style: normal;
+ font-weight: bold;
+}
+
+mx|Application {
+ font-family: main;
+ font-size: 12;
+}
+
+.appContainer {
+ borderSkin: Embed(source="assets/app_skin.png",
+ scaleGridTop="55",
+ scaleGridLeft="5",
+ scaleGridRight="293",
+ scaleGridBottom="66");
+}
+
+mx|TabNavigator {
+ border-style:solid;
+}
+
+mx|Button {
+ skin: Embed("assets/button_skin.png",
+ scaleGridLeft="8",
+ scaleGridRight="23",
+ scaleGridTop="8",
+ scaleGridBottom="21");
+ over-skin: Embed("assets/button_over_skin.png",
+ scaleGridLeft="8",
+ scaleGridRight="23",
+ scaleGridTop="8",
+ scaleGridBottom="21");
+ open-duration: 0;
+ close-duration: 0;
+ corner-radius: 2;
+}
+
+
+.appTitle
+{
+ color:#222222;
+ font-family: main;
+ font-size: 20pt;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/build.xml b/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/build.xml
new file mode 100755
index 0000000..30f386f
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/build.xml
@@ -0,0 +1,77 @@
+<?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="Runtime Configuration - Messaging" />
+ <property name="application.file" value="main" />
+ <property name="application.bin.dir" value="${samples.war}/runtimeconfig-messaging" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/runtimeconfig-messaging/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}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/ChatPanel.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/ChatPanel.mxml b/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/ChatPanel.mxml
new file mode 100755
index 0000000..7271a5a
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/ChatPanel.mxml
@@ -0,0 +1,87 @@
+<?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:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
+ creationComplete="initComp()">
+
+ <mx:Script>
+ <![CDATA[
+ import mx.messaging.channels.StreamingAMFChannel;
+ import mx.messaging.ChannelSet;
+ import mx.messaging.channels.AMFChannel;
+ import mx.messaging.events.MessageEvent;
+ import mx.messaging.messages.AsyncMessage;
+ import mx.messaging.messages.IMessage;
+
+
+ private function initComp():void
+ {
+ var myStreamingAMF:AMFChannel = new StreamingAMFChannel("my-streaming-amf", "../messagebroker/streamingamf");
+ var myPollingAMF:AMFChannel = new AMFChannel("my-polling-amf", "../messagebroker/amfpolling");
+ myPollingAMF.pollingEnabled = true;
+ myPollingAMF.pollingInterval = 2000;
+ var channelSet:ChannelSet = new ChannelSet();
+ channelSet.addChannel(myStreamingAMF);
+ channelSet.addChannel(myPollingAMF);
+ consumer.channelSet = channelSet;
+ producer.channelSet = channelSet;
+ }
+
+ public function set room(name:String):void
+ {
+ if (!name) return;
+
+ if (consumer && consumer.subscribed)
+ {
+ log.text += "Leaving room " + consumer.destination + "\n";
+ consumer.unsubscribe();
+ }
+ consumer.destination = name;
+ producer.destination = name;
+ consumer.subscribe();
+ log.text += "Entering room " + name + "\n";
+ }
+
+ private function send():void
+ {
+ var message:IMessage = new AsyncMessage();
+ message.body = msg.text;
+ producer.send(message);
+ msg.text = "";
+ }
+
+ private function messageHandler(event:MessageEvent):void
+ {
+ log.text += event.message.body + "\n";
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Producer id="producer"/>
+ <mx:Consumer id="consumer" message="messageHandler(event)"/>
+
+ <mx:TextArea id="log" width="100%" height="100%"/>
+
+ <mx:ControlBar>
+ <mx:TextInput id="msg" width="100%" enter="send()" enabled="{consumer.subscribed}"/>
+ <mx:Button label="Send" click="send()" enabled="{consumer.subscribed}"/>
+ </mx:ControlBar>
+
+</mx:Panel>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/main.mxml b/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/main.mxml
new file mode 100755
index 0000000..8da08cc
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-messaging/src/main.mxml
@@ -0,0 +1,54 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="horizontal"
+ creationComplete="srv.getRoomList()">
+
+ <mx:RemoteObject id="srv" destination="chat-room-service"
+ fault="Alert.show(event.fault.rootCause.message, 'Error')"/>
+
+ <mx:Panel title="Room List" width="100%" height="100%" paddingTop="4" paddingLeft="4" paddingBottom="4" paddingRight="4">
+
+ <mx:Label text="Select a room and start chatting in the right panel:"/>
+ <mx:List id="list" dataProvider="{srv.getRoomList.lastResult}" width="100%" height="100%"/>
+
+ <mx:ControlBar>
+ <mx:VBox width="100%">
+ <mx:Button label="Refresh" click="srv.getRoomList()"/>
+ <mx:Spacer height="2"/>
+ <mx:HRule width="100%" height="1"/>
+ <mx:Label text="Create a room:"/>
+ <mx:HBox>
+ <mx:TextInput id="room"/>
+ <mx:Button label="Create" click="srv.createRoom(room.text)" enabled="{room.text.length>0}"/>
+ </mx:HBox>
+ </mx:VBox>
+ </mx:ControlBar>
+
+ </mx:Panel>
+
+ <ChatPanel title="Chat" room="{list.selectedItem}"/>
+
+ <mx:Script>
+ <![CDATA[
+ import mx.controls.Alert;
+ ]]>
+ </mx:Script>
+
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/build.xml b/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/build.xml
new file mode 100755
index 0000000..2d7ccf0
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/build.xml
@@ -0,0 +1,77 @@
+<?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="Runtime Configuration - Remoting" />
+ <property name="application.file" value="main" />
+ <property name="application.bin.dir" value="${samples.war}/runtimeconfig-remoting" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/runtimeconfig-remoting/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}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/src/main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/src/main.mxml b/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/src/main.mxml
new file mode 100755
index 0000000..a745b7c
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/runtimeconfig-remoting/src/main.mxml
@@ -0,0 +1,64 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml"
+ creationComplete="initApp()">
+
+ <!--
+ Simple client to demonstrate runtime configuration of destinations.
+ The "runtime-employee" destination is configured in
+ EmployeeRuntimeRemotingDestination.java.
+ -->
+
+ <mx:Script>
+ <![CDATA[
+ import mx.rpc.remoting.mxml.RemoteObject;
+ import mx.messaging.ChannelSet;
+ import mx.messaging.channels.AMFChannel;
+
+ [Bindable]
+ private var srv:RemoteObject;
+
+ private function initApp():void
+ {
+ var channel:AMFChannel = new AMFChannel("my-amf", "../messagebroker/amf");
+ var channelSet:ChannelSet = new ChannelSet();
+ channelSet.addChannel(channel);
+ srv = new RemoteObject();
+ srv.destination="runtime-employee-ro";
+ srv.channelSet = channelSet;
+ srv.getEmployees();
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Panel title="Employee List" width="100%" height="100%">
+ <mx:DataGrid width="100%" height="100%" dataProvider="{srv.getEmployees.lastResult}">
+ <mx:columns>
+ <mx:DataGridColumn headerText="First Name" dataField="firstName"/>
+ <mx:DataGridColumn headerText="Last Name" dataField="lastName"/>
+ <mx:DataGridColumn headerText="Title" dataField="title"/>
+ <mx:DataGridColumn headerText="Phone" dataField="phone"/>
+ <mx:DataGridColumn headerText="Email" dataField="email"/>
+ </mx:columns>
+ </mx:DataGrid>
+ </mx:Panel>
+
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-101/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-101/build.xml b/attic/apps/samples/WEB-INF/flex-src/testdrive-101/build.xml
new file mode 100755
index 0000000..eb756ee
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-101/build.xml
@@ -0,0 +1,77 @@
+<?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="Flex Programming Model 101" />
+ <property name="application.file" value="main" />
+ <property name="application.bin.dir" value="${samples.war}/testdrive-101" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-101/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}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/ProductView.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/ProductView.mxml b/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/ProductView.mxml
new file mode 100755
index 0000000..d55d038
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/ProductView.mxml
@@ -0,0 +1,35 @@
+<?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:mx="http://www.adobe.com/2006/mxml" layout="horizontal" width="100%" height="100%"
+ title="Product Details" paddingLeft="12" paddingRight="12" paddingTop="12" paddingBottom="12">
+
+ <mx:Object id="product"/>
+
+ <mx:CurrencyFormatter id="cf"/>
+
+ <mx:Image source="../images/{product.image}"/>
+
+ <mx:VBox width="100%" height="100%">
+ <mx:Label text="{product.name}" fontWeight="bold"/>
+ <mx:Label text="Price: {cf.format(product.price)}" styleName="price"/>
+ <mx:Text text="{product.description}" width="100%" height="100%"/>
+ </mx:VBox>
+
+</mx:Panel>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/Thumb.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/Thumb.mxml b/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/Thumb.mxml
new file mode 100755
index 0000000..79b5f04
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/Thumb.mxml
@@ -0,0 +1,29 @@
+<?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:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="120" height="120"
+ horizontalAlign="center" verticalGap="0" verticalScrollPolicy="off" horizontalScrollPolicy="off">
+
+ <mx:CurrencyFormatter id="cf"/>
+
+ <mx:Label text="{data.name}" fontWeight="bold"/>
+ <mx:Image source="../images/{data.image}" width="40" height="80"/>
+ <mx:Label text="{cf.format(data.price)}" styleName="price"/>
+
+</mx:VBox>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/main.mxml b/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/main.mxml
new file mode 100755
index 0000000..a90fb43
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/main.mxml
@@ -0,0 +1,52 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="horizontal"
+ creationComplete="srv.getProducts()">
+
+ <mx:Style source="testdrive.css"/>
+
+ <mx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+ import mx.rpc.events.ResultEvent;
+
+ [Bindable]
+ private var products:ArrayCollection;
+
+ private function resultHandler(event:ResultEvent):void
+ {
+ products = event.result as ArrayCollection;
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:RemoteObject id="srv" destination="product">
+ <mx:method name="getProducts" result="resultHandler(event)"/>
+ </mx:RemoteObject>
+
+ <mx:Panel title="Catalog" width="100%" height="100%">
+ <mx:TileList id="list" dataProvider="{products}" itemRenderer="Thumb" width="100%" height="100%"/>
+ </mx:Panel>
+
+ <ProductView product="{list.selectedItem}"/>
+
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/testdrive.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/testdrive.css b/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/testdrive.css
new file mode 100755
index 0000000..ac2b336
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-101/src/testdrive.css
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+@namespace mx "library://ns.adobe.com/flex/mx";
+
+mx|Application {
+ background-color: #E57000;
+ themeColor: #E57000;
+}
+
+mx|TileList {
+ selection-color: #FFCC33;
+ roll-over-color: #FFCC99;
+}
+
+mx|Panel {
+ roundedBottomCorners: true;
+}
+
+.price {
+ color: #E57000;
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-chat/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-chat/build.xml b/attic/apps/samples/WEB-INF/flex-src/testdrive-chat/build.xml
new file mode 100755
index 0000000..3fedee4
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-chat/build.xml
@@ -0,0 +1,77 @@
+<?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="Chat" />
+ <property name="application.file" value="main" />
+ <property name="application.bin.dir" value="${samples.war}/testdrive-chat" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-chat/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}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-chat/src/main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-chat/src/main.mxml b/attic/apps/samples/WEB-INF/flex-src/testdrive-chat/src/main.mxml
new file mode 100755
index 0000000..213fa31
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-chat/src/main.mxml
@@ -0,0 +1,56 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml"
+ creationComplete="consumer.subscribe()">
+
+ <mx:Script>
+ <![CDATA[
+
+ import mx.messaging.messages.AsyncMessage;
+ import mx.messaging.messages.IMessage;
+
+ private function send():void
+ {
+ var message:IMessage = new AsyncMessage();
+ message.body.chatMessage = msg.text;
+ producer.send(message);
+ msg.text = "";
+ }
+
+ private function messageHandler(message:IMessage):void
+ {
+ log.text += message.body.chatMessage + "\n";
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Producer id="producer" destination="chat"/>
+ <mx:Consumer id="consumer" destination="chat" message="messageHandler(event.message)"/>
+
+ <mx:Panel title="Chat" width="100%" height="100%">
+ <mx:TextArea id="log" width="100%" height="100%"/>
+ <mx:ControlBar>
+ <mx:TextInput id="msg" width="100%" enter="send()"/>
+ <mx:Button label="Send" click="send()"/>
+ </mx:ControlBar>
+ </mx:Panel>
+
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/build.xml b/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/build.xml
new file mode 100755
index 0000000..d408630
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/build.xml
@@ -0,0 +1,81 @@
+<?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="Data Push" />
+ <property name="application.file" value="main" />
+ <property name="application.bin.dir" value="${samples.war}/testdrive-datapush" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-datapush/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="*.jsp"/>
+ </copy>
+
+ </target>
+
+ <target name="clean" description="--> Removes jars and classes">
+ <delete quiet="true" includeemptydirs="true">
+ <fileset dir="${application.bin.dir}" includes="*.swf,index.html,*.jsp"/>
+ <fileset dir="${application.bin.dir}/history" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/main.mxml b/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/main.mxml
new file mode 100755
index 0000000..f05affe
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/main.mxml
@@ -0,0 +1,42 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
+
+ <mx:Script>
+ <![CDATA[
+
+ import mx.messaging.messages.IMessage;
+
+ private function messageHandler(message:IMessage):void
+ {
+ pushedValue.text = ""+ message.body;
+ }
+
+ ]]>
+ </mx:Script>
+
+ <mx:Consumer id="consumer" destination="feed" message="messageHandler(event.message)"/>
+
+ <mx:Button label="Subscribe to 'feed' destination" click="consumer.subscribe()" enabled="{!consumer.subscribed}"/>
+ <mx:Button label="Unsubscribe from 'feed' destination" click="consumer.unsubscribe()" enabled="{consumer.subscribed}"/>
+
+ <mx:TextInput id="pushedValue"/>
+
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/startfeed.jsp
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/startfeed.jsp b/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/startfeed.jsp
new file mode 100755
index 0000000..8970756
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/startfeed.jsp
@@ -0,0 +1,26 @@
+<!--
+ 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.
+-->
+<%@page import="flex.samples.feed.Feed"%>
+<%
+ try {
+ Feed feed = new Feed();
+ feed.start();
+ out.println("Feed Started");
+ } catch (Exception e) {
+ out.println("A problem occured while starting the feed: "+e.getMessage());
+ }
+%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/stopfeed.jsp
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/stopfeed.jsp b/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/stopfeed.jsp
new file mode 100755
index 0000000..7b94f86
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-datapush/src/stopfeed.jsp
@@ -0,0 +1,26 @@
+<!--
+ 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.
+-->
+<%@page import="flex.samples.feed.Feed"%>
+<%
+ try {
+ Feed feed = new Feed();
+ feed.stop();
+ out.println("Feed Stopped");
+ } catch (Exception e) {
+ out.println("A problem occured while stopping the feed: "+e.getMessage());
+ }
+%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/build.xml b/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/build.xml
new file mode 100755
index 0000000..309ce78
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/build.xml
@@ -0,0 +1,81 @@
+<?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="Testdrive - HTTPService" />
+ <property name="application.file" value="main" />
+ <property name="application.bin.dir" value="${samples.war}/testdrive-httpservice" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-httpservice/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="*.jsp"/>
+ </copy>
+
+ </target>
+
+ <target name="clean" description="--> Removes jars and classes">
+ <delete quiet="true" includeemptydirs="true">
+ <fileset dir="${application.bin.dir}" includes="*.swf,index.html,*.jsp"/>
+ <fileset dir="${application.bin.dir}/history" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/catalog.jsp
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/catalog.jsp b/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/catalog.jsp
new file mode 100755
index 0000000..2ac0688
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/catalog.jsp
@@ -0,0 +1,42 @@
+<!--
+ 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.
+-->
+<%@page import="flex.samples.product.ProductService,
+ flex.samples.product.Product,
+ java.util.List"%>
+<?xml version="1.0" encoding="utf-8"?>
+<catalog>
+<%
+ ProductService srv = new ProductService();
+ List list = null;
+ list = srv.getProducts();
+ Product product;
+ for (int i=0; i<list.size(); i++)
+ {
+ product = (Product) list.get(i);
+%>
+ <product productId="<%= product.getProductId()%>">
+ <name><%= product.getName() %></name>
+ <description><%= product.getDescription() %></description>
+ <price><%= product.getPrice() %></price>
+ <image><%= product.getImage() %></image>
+ <category><%= product.getCategory() %></category>
+ <qtyInStock><%= product.getQtyInStock() %></qtyInStock>
+ </product>
+<%
+ }
+%>
+</catalog>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/main.mxml b/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/main.mxml
new file mode 100755
index 0000000..17c8d34
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-httpservice/src/main.mxml
@@ -0,0 +1,28 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
+
+ <mx:HTTPService id="srv" destination="catalog" useProxy="true"/>
+
+ <mx:DataGrid dataProvider="{srv.lastResult.catalog.product}" width="100%" height="100%"/>
+
+ <mx:Button label="Get Data" click="srv.send()"/>
+
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/build.xml b/attic/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/build.xml
new file mode 100755
index 0000000..bdfea75
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/build.xml
@@ -0,0 +1,77 @@
+<?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="Testdrive - RemoteObject" />
+ <property name="application.file" value="main" />
+ <property name="application.bin.dir" value="${samples.war}/testdrive-remoteobject" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-remoteobject/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}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/src/main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/src/main.mxml b/attic/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/src/main.mxml
new file mode 100755
index 0000000..fb40f23
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-remoteobject/src/main.mxml
@@ -0,0 +1,28 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
+
+ <mx:RemoteObject id="srv" destination="product"/>
+
+ <mx:DataGrid dataProvider="{srv.getProducts.lastResult}" width="100%" height="100%"/>
+
+ <mx:Button label="Get Data" click="srv.getProducts()"/>
+
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-update/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-update/build.xml b/attic/apps/samples/WEB-INF/flex-src/testdrive-update/build.xml
new file mode 100755
index 0000000..6037eb3
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-update/build.xml
@@ -0,0 +1,77 @@
+<?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="Testdrive - Update" />
+ <property name="application.file" value="main" />
+ <property name="application.bin.dir" value="${samples.war}/testdrive-update" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-update/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}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/Product.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/Product.as b/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/Product.as
new file mode 100755
index 0000000..8a68100
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/Product.as
@@ -0,0 +1,44 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ [Bindable]
+ [RemoteClass(alias="flex.samples.product.Product")]
+ public class Product
+ {
+ public function Product()
+ {
+ }
+
+ public var productId:int;
+
+ public var name:String;
+
+ public var description:String;
+
+ public var image:String;
+
+ public var category:String;
+
+ public var price:Number;
+
+ public var qtyInStock:int;
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/ProductForm.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/ProductForm.mxml b/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/ProductForm.mxml
new file mode 100755
index 0000000..5ffb8fa
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/ProductForm.mxml
@@ -0,0 +1,60 @@
+<?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:mx="http://www.adobe.com/2006/mxml" xmlns="*"
+ title="Details" width="100%" height="100%">
+
+ <Product id="product"
+ name="{productName.text}"
+ category="{category.text}"
+ price="{Number(price.text)}"
+ image="{image.text}"
+ description="{description.text}"/>
+
+ <mx:RemoteObject id="srv" destination="product"/>
+
+ <mx:Form width="100%">
+
+ <mx:FormItem label="Name">
+ <mx:TextInput id="productName" text="{product.name}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Category">
+ <mx:TextInput id="category" text="{product.category}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Image">
+ <mx:TextInput id="image" text="{product.image}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Price">
+ <mx:TextInput id="price" text="{product.price}"/>
+ </mx:FormItem>
+
+ <mx:FormItem label="Description" width="100%">
+ <mx:TextArea id="description" text="{product.description}" width="100%" height="100"/>
+ </mx:FormItem>
+
+ </mx:Form>
+
+ <mx:ControlBar>
+ <mx:Button label="Update" click="srv.update(product);"/>
+ </mx:ControlBar>
+
+</mx:Panel>
\ No newline at end of file
[19/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/chat/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/chat/src/chat.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/chat/src/chat.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/chat/src/chat.mxml
new file mode 100755
index 0000000..02e1185
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/chat/src/chat.mxml
@@ -0,0 +1,86 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ applicationComplete="init()">
+
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.messaging.messages.AsyncMessage;
+ import mx.messaging.messages.IMessage;
+
+ private function init():void
+ {
+ consumer.subscribe();
+ }
+
+ private function send():void
+ {
+ var message:IMessage = new AsyncMessage();
+ message.body.userId = userId.text;
+ message.body.chatMessage = msg.text;
+ producer.send(message);
+ msg.text = "";
+ }
+
+ private function messageHandler(message:IMessage):void
+ {
+ log.text += message.body.userId + ": " + message.body.chatMessage + "\n";
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!-- The ChannelSet API allows you to dynamically define your endpoints *at runtime*. In the example below,
+ we hardcode the endpoint URLs. In real life, the client application would typically load these parameters
+ dynamically. For example, the client application could read these parameters from an XML file loaded using
+ the HTTPService at startup. The first channel added to the channelSet, is the first channel that the system
+ will use to try to communicate with the server. If the first channel fails, the system will try to communicate
+ with the second channel defined in the channelSet. -->
+ <mx:ChannelSet id="cs">
+ <mx:StreamingAMFChannel uri="/samples-spring/messagebroker/streamingamf"/>
+ <mx:AMFChannel uri="/samples-spring/messagebroker/amflongpolling"/>
+ <mx:AMFChannel uri="/samples-spring/messagebroker/amfpolling"/>
+ </mx:ChannelSet>
+
+ <mx:Producer id="producer" destination="chat" channelSet="{cs}"/>
+ <mx:Consumer id="consumer" destination="chat" channelSet="{cs}" message="messageHandler(event.message)"/>
+ </fx:Declarations>
+
+ <s:Panel title="Chat" top="12" bottom="12" left="12" right="12">
+ <s:TextArea id="log" width="100%" height="100%" borderVisible="false"/>
+ <s:controlBarContent>
+ <mx:Form width="100%" paddingTop="4" paddingBottom="4" paddingLeft="4" paddingRight="4">
+ <mx:FormItem label="User Id:">
+ <s:TextInput id="userId" width="100" enter="send()"/>
+ </mx:FormItem>
+ <mx:FormItem label="Message:" width="100%" direction="horizontal">
+ <s:TextInput id="msg" width="100%" enter="send()"/>
+ <s:Button label="Send" click="send()"/>
+ </mx:FormItem>
+ </mx:Form>
+ </s:controlBarContent>
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.actionScriptProperties
new file mode 100755
index 0000000..5f32f66
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="collaboration.mxml" projectUUID="494f5a5c-03a0-4a1a-b85b-78075a2c515a" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="collaboration.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.project b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.project
new file mode 100755
index 0000000..9161f26
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>collaboration</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/build.xml
new file mode 100755
index 0000000..6258b6c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="collaboration" />
+ <property name="application.file" value="collaboration" />
+ <property name="application.bin.dir" value="${samples-spring.war}/collaboration" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/collaboration/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/collaboration/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[25/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/messaging_HTTP_Stream.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/messaging_HTTP_Stream.mxml b/apps/team/features/messaging/messaging_HTTP_Stream.mxml
deleted file mode 100755
index 51516dc..0000000
--- a/apps/team/features/messaging/messaging_HTTP_Stream.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP_Stream"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP_Stream"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/multipleendpoints/messaging_AMFLongPoll_and_SecureAMFLongPoll.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/multipleendpoints/messaging_AMFLongPoll_and_SecureAMFLongPoll.mxml b/apps/team/features/messaging/multipleendpoints/messaging_AMFLongPoll_and_SecureAMFLongPoll.mxml
deleted file mode 100755
index 87c24e6..0000000
--- a/apps/team/features/messaging/multipleendpoints/messaging_AMFLongPoll_and_SecureAMFLongPoll.mxml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel1" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
-<mx:Panel id="mainPanel2" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer2"/>
- <mx:Button label="Send Foo{counter2}" click="sendMessage2()"/>
- <mx:Button label="Disconnect" click="producer2.disconnect();" enabled="{producer2.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer2.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer2"/>
- <mx:Button label="Subcribe" click="consumer2.subscribe();" enabled="{!consumer2.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer2.unsubscribe();" enabled="{consumer2.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer2.disconnect();" enabled="{consumer2.connected}"/>
- <mx:Button label="Poll" click="(consumer2.channelSet.currentChannel as PollingChannel).poll();" enabled="{consumer2.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer2.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer2.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta2.text = ""'/>
- <mx:TextArea id="ta2" width="100%" height="100%"/>
- </mx:Panel>
-
-
- <mx:Producer id="producer"
- destination="messaging_AMF_LongPoll"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_LongPoll"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Producer id="producer2"
- destination="messaging_AMF_SecureLongPoll"
- fault="faultHandler2(event)"/>
-
- <mx:Consumer id="consumer2"
- destination="messaging_AMF_SecureLongPoll"
- fault="faultHandler2(event)"
- message="messageHandler2(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
- import mx.messaging.channels.PollingChannel;
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
-
- [Bindable]
- public var counter2:int = 0;
-
-
- private function sendMessage2():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter2++;
- producer2.send(msg);
- }
-
- private function messageHandler2(event:MessageEvent):void
- {
- ta2.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler2(event:MessageFaultEvent):void
- {
- ta2.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-
-
-
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
-
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/multipleendpoints/messaging_SecureAMFLongPoll_and_AMFStream.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/multipleendpoints/messaging_SecureAMFLongPoll_and_AMFStream.mxml b/apps/team/features/messaging/multipleendpoints/messaging_SecureAMFLongPoll_and_AMFStream.mxml
deleted file mode 100755
index c5619cd..0000000
--- a/apps/team/features/messaging/multipleendpoints/messaging_SecureAMFLongPoll_and_AMFStream.mxml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel1" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
-<mx:Panel id="mainPanel2" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer2"/>
- <mx:Button label="Send Foo{counter2}" click="sendMessage2()"/>
- <mx:Button label="Disconnect" click="producer2.disconnect();" enabled="{producer2.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer2.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer2"/>
- <mx:Button label="Subcribe" click="consumer2.subscribe();" enabled="{!consumer2.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer2.unsubscribe();" enabled="{consumer2.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer2.disconnect();" enabled="{consumer2.connected}"/>
- <mx:Button label="Poll" click="(consumer2.channelSet.currentChannel as PollingChannel).poll();" enabled="{consumer2.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer2.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer2.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta2.text = ""'/>
- <mx:TextArea id="ta2" width="100%" height="100%"/>
- </mx:Panel>
-
-
- <mx:Producer id="producer"
- destination="messaging_AMF_SecureLongPoll"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_SecureLongPoll"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Producer id="producer2"
- destination="messaging_AMF_Stream"
- fault="faultHandler2(event)"/>
-
- <mx:Consumer id="consumer2"
- destination="messaging_AMF_Stream"
- fault="faultHandler2(event)"
- message="messageHandler2(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
- import mx.messaging.channels.PollingChannel;
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
-
- [Bindable]
- public var counter2:int = 0;
-
-
- private function sendMessage2():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter2++;
- producer2.send(msg);
- }
-
- private function messageHandler2(event:MessageEvent):void
- {
- ta2.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler2(event:MessageFaultEvent):void
- {
- ta2.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-
-
-
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
-
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/multipleendpoints/messaging_two_AMFLongPoll_Endpoints.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/multipleendpoints/messaging_two_AMFLongPoll_Endpoints.mxml b/apps/team/features/messaging/multipleendpoints/messaging_two_AMFLongPoll_Endpoints.mxml
deleted file mode 100755
index 78d289b..0000000
--- a/apps/team/features/messaging/multipleendpoints/messaging_two_AMFLongPoll_Endpoints.mxml
+++ /dev/null
@@ -1,160 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel1" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
-<mx:Panel id="mainPanel2" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer2"/>
- <mx:Button label="Send Foo{counter2}" click="sendMessage2()"/>
- <mx:Button label="Disconnect" click="producer2.disconnect();" enabled="{producer2.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer2.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer2"/>
- <mx:Button label="Subcribe" click="consumer2.subscribe();" enabled="{!consumer2.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer2.unsubscribe();" enabled="{consumer2.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer2.disconnect();" enabled="{consumer2.connected}"/>
- <mx:Button label="Poll" click="(consumer2.channelSet.currentChannel as PollingChannel).poll();" enabled="{consumer2.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer2.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer2.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta2.text = ""'/>
- <mx:TextArea id="ta2" width="100%" height="100%"/>
- </mx:Panel>
-
-
- <mx:Producer id="producer"
- destination="messaging_AMF_LongPoll"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_LongPoll"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Producer id="producer2"
- destination="messaging_AMF_LongPoll2"
- fault="faultHandler2(event)"/>
-
- <mx:Consumer id="consumer2"
- destination="messaging_AMF_LongPoll2"
- fault="faultHandler2(event)"
- message="messageHandler2(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
- import mx.messaging.channels.PollingChannel;
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
-
- [Bindable]
- public var counter2:int = 0;
-
-
- private function sendMessage2():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter2++;
- producer2.send(msg);
- }
-
- private function messageHandler2(event:MessageEvent):void
- {
- ta2.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler2(event:MessageFaultEvent):void
- {
- ta2.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-
-
-
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
-
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/secure/messaging_SecureAMF.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/secure/messaging_SecureAMF.mxml b/apps/team/features/messaging/secure/messaging_SecureAMF.mxml
deleted file mode 100755
index ae5d1a1..0000000
--- a/apps/team/features/messaging/secure/messaging_SecureAMF.mxml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example where the client manually initiates a poll request without
- relying on polling-interval with secure HTTP.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_SecureAMF"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_SecureAMF"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
-
- import mx.messaging.ChannelSet;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
- import mx.messaging.channels.PollingChannel;
- import mx.messaging.messages.AsyncMessage;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- public var pc:PollingChannel;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer: received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:Object):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
-
- private function poll():void
- {
- ta.text += "Polling" + "\n";
- if (!consumer.subscribed)
- {
- subscribeConsumer();
- }
- pc.poll();
- }
-
- private function subscribeConsumer():void
- {
- ta.text += "Subscribing Consumer \n";
- consumer.subscribe();
-
- var pcs:ChannelSet = consumer.channelSet;
- pc = PollingChannel(pcs.currentChannel);
- }
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/secure/messaging_SecureHTTP.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/secure/messaging_SecureHTTP.mxml b/apps/team/features/messaging/secure/messaging_SecureHTTP.mxml
deleted file mode 100755
index ecbb6e4..0000000
--- a/apps/team/features/messaging/secure/messaging_SecureHTTP.mxml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example where the client manually initiates a poll request without
- relying on polling-interval with secure HTTP.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_SecureHTTP"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_SecureHTTP"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
-
- import mx.messaging.ChannelSet;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
- import mx.messaging.channels.PollingChannel;
- import mx.messaging.messages.AsyncMessage;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- public var pc:PollingChannel;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer: received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:Object):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
-
- private function poll():void
- {
- ta.text += "Polling" + "\n";
- if (!consumer.subscribed)
- {
- subscribeConsumer();
- }
- pc.poll();
- }
-
- private function subscribeConsumer():void
- {
- ta.text += "Subscribing Consumer \n";
- consumer.subscribe();
-
- var pcs:ChannelSet = consumer.channelSet;
- pc = PollingChannel(pcs.currentChannel);
- }
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/selector/messaging_AMF_Poll_JMS_Queue_Selector.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/selector/messaging_AMF_Poll_JMS_Queue_Selector.mxml b/apps/team/features/messaging/selector/messaging_AMF_Poll_JMS_Queue_Selector.mxml
deleted file mode 100755
index 91f9317..0000000
--- a/apps/team/features/messaging/selector/messaging_AMF_Poll_JMS_Queue_Selector.mxml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- This example shows how to use selectors -->
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Poll_JMS_Queue"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Poll_JMS_Queue"
- fault="faultHandler(event)"
- message="messageHandler(event)"
- selector="username = 'Foo'"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private var alternate:Boolean = false;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
-
- // Alternate between sending the message with the header and without the header
- if (alternate)
- msg.headers["username"] = "Foo";
- alternate = !alternate;
-
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/selector/messaging_AMF_Poll_Selector.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/selector/messaging_AMF_Poll_Selector.mxml b/apps/team/features/messaging/selector/messaging_AMF_Poll_Selector.mxml
deleted file mode 100755
index fe69117..0000000
--- a/apps/team/features/messaging/selector/messaging_AMF_Poll_Selector.mxml
+++ /dev/null
@@ -1,100 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- This example shows how to use selectors -->
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Poll"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Poll"
- fault="faultHandler(event)"
- message="messageHandler(event)"
- selector="username = 'Foo'"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private var alternate:Boolean = false;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
-
- // Alternate between sending the message with the header and without the header
- if (alternate)
- msg.headers["username"] = "Foo";
- alternate = !alternate;
-
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/selector/messaging_HTTP_Poll_Selector.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/selector/messaging_HTTP_Poll_Selector.mxml b/apps/team/features/messaging/selector/messaging_HTTP_Poll_Selector.mxml
deleted file mode 100755
index 253af1d..0000000
--- a/apps/team/features/messaging/selector/messaging_HTTP_Poll_Selector.mxml
+++ /dev/null
@@ -1,102 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- This example shows how to use selectors -->
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP_Poll"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP_Poll"
- fault="faultHandler(event)"
- message="messageHandler(event)"
- selector="username = 'Foo'"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private var alternate:Boolean = false;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
-
- // Alternate between sending the message with the header and without the header
- if (alternate)
- msg.headers["username"] = "Foo";
- alternate = !alternate;
-
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_LongPoll_SendSubscribeConstraint.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_LongPoll_SendSubscribeConstraint.mxml b/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_LongPoll_SendSubscribeConstraint.mxml
deleted file mode 100755
index bf102a8..0000000
--- a/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_LongPoll_SendSubscribeConstraint.mxml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example that uses a destination protected by send and subscribe constraint -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:Button label="Logout" click="consumer.logout()" enabled="{consumer.authenticated}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Reset credentials" click="setCredentials()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_LongPoll_SendSubscribeConstraint"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_LongPoll_SendSubscribeConstraint"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- // Set credentials as the destination is protected by send and
- // subscribe constraints.
- setCredentials();
- }
-
- private function setCredentials():void
- {
- producer.setCredentials("sampleuser", "samplepassword");
- consumer.setCredentials("sampleuser", "samplepassword");
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_Poll_SendSubscribeConstraint.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_Poll_SendSubscribeConstraint.mxml b/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_Poll_SendSubscribeConstraint.mxml
deleted file mode 100755
index a1c8fa5..0000000
--- a/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_Poll_SendSubscribeConstraint.mxml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example that uses a destination protected by send and subscribe constraint -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:Button label="Logout" click="consumer.logout()" enabled="{consumer.authenticated}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Reset credentials" click="setCredentials()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Poll_SendSubscribeConstraint"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Poll_SendSubscribeConstraint"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- // Set credentials as the destination is protected by send and
- // subscribe constraints.
- setCredentials();
- }
-
- private function setCredentials():void
- {
- producer.setCredentials("sampleuser", "samplepassword");
- consumer.setCredentials("sampleuser", "samplepassword");
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_Stream_SendSubscribeConstraint.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_Stream_SendSubscribeConstraint.mxml b/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_Stream_SendSubscribeConstraint.mxml
deleted file mode 100755
index 6c1329b..0000000
--- a/apps/team/features/messaging/sendsubscribeconstraint/messaging_AMF_Stream_SendSubscribeConstraint.mxml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example that uses a destination protected by send and subscribe constraint -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:Button label="Logout" click="consumer.logout()" enabled="{consumer.authenticated}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Reset credentials" click="setCredentials()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Stream_SendSubscribeConstraint"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Stream_SendSubscribeConstraint"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- // Set credentials as the destination is protected by send and
- // subscribe constraints.
- setCredentials();
- }
-
- private function setCredentials():void
- {
- producer.setCredentials("sampleuser", "samplepassword");
- consumer.setCredentials("sampleuser", "samplepassword");
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/sendsubscribeconstraint/messaging_HTTP_Poll_SendSubscribeConstraint.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/sendsubscribeconstraint/messaging_HTTP_Poll_SendSubscribeConstraint.mxml b/apps/team/features/messaging/sendsubscribeconstraint/messaging_HTTP_Poll_SendSubscribeConstraint.mxml
deleted file mode 100755
index a375025..0000000
--- a/apps/team/features/messaging/sendsubscribeconstraint/messaging_HTTP_Poll_SendSubscribeConstraint.mxml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example that uses a destination protected by send and subscribe constraint -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:Button label="Logout" click="consumer.logout()" enabled="{consumer.authenticated}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Reset credentials" click="setCredentials()"/>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP_Poll_SendSubscribeConstraint"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP_Poll_SendSubscribeConstraint"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- // Set credentials as the destination is protected by send and
- // subscribe constraints.
- setCredentials();
- }
-
- private function setCredentials():void
- {
- producer.setCredentials("sampleuser", "samplepassword");
- consumer.setCredentials("sampleuser", "samplepassword");
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/subtopic/messaging_AMF_Poll_Subtopic.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/subtopic/messaging_AMF_Poll_Subtopic.mxml b/apps/team/features/messaging/subtopic/messaging_AMF_Poll_Subtopic.mxml
deleted file mode 100755
index a97b75b..0000000
--- a/apps/team/features/messaging/subtopic/messaging_AMF_Poll_Subtopic.mxml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- This example shows how to use subtopics. Before using subtopics, need
- to make sure that the following are set on the messaging destination:
- <properties>
- <server>
- <allow-subtopics>true</allow-subtopics>
- <subtopic-separator>.</subtopic-separator>
- </server>
- </properties>
- -->
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Poll_Subtopic"
- fault="faultHandler(event)"
- subtopic="chat.newton"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Poll_Subtopic"
- fault="faultHandler(event)"
- message="messageHandler(event)"
- subtopic="chat.newton"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/subtopic/messaging_AMF_Stream_MultiSubtopic.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/subtopic/messaging_AMF_Stream_MultiSubtopic.mxml b/apps/team/features/messaging/subtopic/messaging_AMF_Stream_MultiSubtopic.mxml
deleted file mode 100755
index 9e49f2b..0000000
--- a/apps/team/features/messaging/subtopic/messaging_AMF_Stream_MultiSubtopic.mxml
+++ /dev/null
@@ -1,131 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- This example shows how to use a MultiTopicConsumer to listen for multiple
- subtopics. Before using subtopics, need
- to make sure that the following are set on the messaging destination:
- <properties>
- <server>
- <allow-subtopics>true</allow-subtopics>
- <subtopic-separator>.</subtopic-separator>
- </server>
- </properties>
- -->
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter1} to subtopic1" click="sendMessage()"/>
- <mx:Button label="Send Foo{counter2} to subtopic2" click="sendMessage(false)"/>
- <mx:Button label="Disconnect1" click="producer1.disconnect();"/>
- <mx:Button label="Disconnect2" click="producer2.disconnect();"/>
- <mx:CheckBox label="Connected1?" selected="{producer1.connected}"/>
- <mx:CheckBox label="Connected2?" selected="{producer2.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Add sub to subtopic1" click="consumer.addSubscription('chat.newton1');"/>
- <mx:Button label="Add sub to subtopic2" click="consumer.addSubscription('chat.newton2');"/>
- <mx:Button label="Remove sub to subtopic1" click="consumer.removeSubscription('chat.newton1');"/>
- <mx:Button label="Remove sub to subtopic2" click="consumer.removeSubscription('chat.newton2');"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer1"
- destination="messaging_AMF_Stream_Subtopic"
- fault="faultHandler(event)"
- subtopic="chat.newton1"/>
-
- <mx:Producer id="producer2"
- destination="messaging_AMF_Stream_Subtopic"
- fault="faultHandler(event)"
- subtopic="chat.newton2"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.MultiTopicConsumer;
- import mx.messaging.Producer;
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter1:int = 0;
-
- [Bindable]
- public var counter2:int = 0;
-
- [Bindable]
- public var consumer:MultiTopicConsumer = new MultiTopicConsumer();
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
-
- consumer.destination = "messaging_AMF_Stream_Subtopic";
- consumer.addEventListener(MessageEvent.MESSAGE, messageHandler);
- consumer.addEventListener(MessageFaultEvent.FAULT, faultHandler);
- }
-
- private function sendMessage(firstProducer:Boolean = true):void
- {
- var msg:AsyncMessage = new AsyncMessage();
- if (firstProducer)
- {
- msg.body = "Foo" + counter1++;
- producer1.send(msg);
- }
- else
- {
- msg.body = "Foo" + counter2++;
- producer2.send(msg);
- }
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/subtopic/messaging_HTTP_Poll_Subtopic.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/subtopic/messaging_HTTP_Poll_Subtopic.mxml b/apps/team/features/messaging/subtopic/messaging_HTTP_Poll_Subtopic.mxml
deleted file mode 100755
index 53f897f..0000000
--- a/apps/team/features/messaging/subtopic/messaging_HTTP_Poll_Subtopic.mxml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- This example shows how to use subtopics. Before using subtopics, need
- to make sure that the following are set on the messaging destination:
- <properties>
- <server>
- <allow-subtopics>true</allow-subtopics>
- <subtopic-separator>.</subtopic-separator>
- </server>
- </properties>
- -->
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP_Poll_Subtopic"
- fault="faultHandler(event)"
- subtopic="chat.newton"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP_Poll_Subtopic"
- fault="faultHandler(event)"
- message="messageHandler(event)"
- subtopic="chat.newton"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
[26/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/cluster/messaging_SecureAMF_Poll_Cluster.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/cluster/messaging_SecureAMF_Poll_Cluster.mxml b/apps/team/features/messaging/cluster/messaging_SecureAMF_Poll_Cluster.mxml
deleted file mode 100755
index 57367b6..0000000
--- a/apps/team/features/messaging/cluster/messaging_SecureAMF_Poll_Cluster.mxml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- Before running this test, make sure messaging_SecureAMF_Poll_Cluster is
- uncommented from messaging-config.xml and you request the sample with
- secure protocol (https) and port.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_SecureAMF_Poll_Cluster"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_SecureAMF_Poll_Cluster"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/cluster/messaging_SecureHTTP_Poll_Cluster.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/cluster/messaging_SecureHTTP_Poll_Cluster.mxml b/apps/team/features/messaging/cluster/messaging_SecureHTTP_Poll_Cluster.mxml
deleted file mode 100755
index d5da650..0000000
--- a/apps/team/features/messaging/cluster/messaging_SecureHTTP_Poll_Cluster.mxml
+++ /dev/null
@@ -1,95 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- Before running this test, make sure messaging_SecureHTTP_Poll_Cluster is
- uncommented from messaging-config.xml and you request the sample with
- secure protocol (https) and port.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_SecureHTTP_Poll_Cluster"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_SecureHTTP_Poll_Cluster"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/customadapter/messaging_CustomAdapter.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/customadapter/messaging_CustomAdapter.mxml b/apps/team/features/messaging/customadapter/messaging_CustomAdapter.mxml
deleted file mode 100755
index 190b737..0000000
--- a/apps/team/features/messaging/customadapter/messaging_CustomAdapter.mxml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!--
- A sample that talks to a destination that has a custom Actionscript adapter.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_CustomAdapter"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_CustomAdapter"
- acknowledge="ackHandler(event)"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageAckEvent;
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function ackHandler(event:MessageAckEvent):void
- {
- ta.text += "Consumer received ACK: " + event.message.body + "\n";
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/discardedMessaging.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/discardedMessaging.mxml b/apps/team/features/messaging/discardedMessaging.mxml
deleted file mode 100755
index d65c395..0000000
--- a/apps/team/features/messaging/discardedMessaging.mxml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example where the client manually initiates a poll request without
- relying on polling-interval
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:TextInput id="msgInput"/>
- <mx:Button label="Send" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="subscribeConsumer();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Poll" click="poll();"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="dev/null"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="dev/null"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
-
- import mx.messaging.ChannelSet;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
- import mx.messaging.channels.PollingChannel;
- import mx.messaging.messages.AsyncMessage;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- public var pc:PollingChannel;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = msgInput.text;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer: received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:Object):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
-
- private function poll():void
- {
- ta.text += "Polling" + "\n";
- if (!consumer.subscribed)
- {
- subscribeConsumer();
- }
- pc.poll();
- }
-
- private function subscribeConsumer():void
- {
- ta.text += "Subscribing Consumer \n";
- consumer.subscribe();
-
- var pcs:ChannelSet = consumer.channelSet;
- pc = PollingChannel(pcs.currentChannel);
- }
- ]]>
- </mx:Script>
-
-</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/jms/messaging_AMF_LongPoll_JMS_Topic.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/jms/messaging_AMF_LongPoll_JMS_Topic.mxml b/apps/team/features/messaging/jms/messaging_AMF_LongPoll_JMS_Topic.mxml
deleted file mode 100755
index 576f7f4..0000000
--- a/apps/team/features/messaging/jms/messaging_AMF_LongPoll_JMS_Topic.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_LongPoll_JMS_Topic"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_LongPoll_JMS_Topic"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/jms/messaging_AMF_Poll_JMS_Queue.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/jms/messaging_AMF_Poll_JMS_Queue.mxml b/apps/team/features/messaging/jms/messaging_AMF_Poll_JMS_Queue.mxml
deleted file mode 100755
index 0e08155..0000000
--- a/apps/team/features/messaging/jms/messaging_AMF_Poll_JMS_Queue.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Poll_JMS_Queue"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Poll_JMS_Queue"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/jms/messaging_AMF_Poll_JMS_Topic.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/jms/messaging_AMF_Poll_JMS_Topic.mxml b/apps/team/features/messaging/jms/messaging_AMF_Poll_JMS_Topic.mxml
deleted file mode 100755
index c75e5c3..0000000
--- a/apps/team/features/messaging/jms/messaging_AMF_Poll_JMS_Topic.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Poll_JMS_Topic"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Poll_JMS_Topic"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/jms/messaging_HTTP_Poll_JMS_Queue.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/jms/messaging_HTTP_Poll_JMS_Queue.mxml b/apps/team/features/messaging/jms/messaging_HTTP_Poll_JMS_Queue.mxml
deleted file mode 100755
index dda51fe..0000000
--- a/apps/team/features/messaging/jms/messaging_HTTP_Poll_JMS_Queue.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP_Poll_JMS_Queue"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP_Poll_JMS_Queue"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/jms/messaging_HTTP_Poll_JMS_Topic.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/jms/messaging_HTTP_Poll_JMS_Topic.mxml b/apps/team/features/messaging/jms/messaging_HTTP_Poll_JMS_Topic.mxml
deleted file mode 100755
index c8306af..0000000
--- a/apps/team/features/messaging/jms/messaging_HTTP_Poll_JMS_Topic.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP_Poll_JMS_Topic"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP_Poll_JMS_Topic"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/messaging_AMF.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/messaging_AMF.mxml b/apps/team/features/messaging/messaging_AMF.mxml
deleted file mode 100755
index 5ff2534..0000000
--- a/apps/team/features/messaging/messaging_AMF.mxml
+++ /dev/null
@@ -1,121 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example where the client manually initiates a poll request without
- relying on polling-interval
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="subscribeConsumer();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Poll" click="poll();"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
-
- import mx.messaging.ChannelSet;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
- import mx.messaging.channels.PollingChannel;
- import mx.messaging.messages.AsyncMessage;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- public var pc:PollingChannel;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer: received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:Object):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
-
- private function poll():void
- {
- ta.text += "Polling" + "\n";
- if (!consumer.subscribed)
- {
- subscribeConsumer();
- }
- pc.poll();
- }
-
- private function subscribeConsumer():void
- {
- ta.text += "Subscribing Consumer \n";
- consumer.subscribe();
-
- var pcs:ChannelSet = consumer.channelSet;
- pc = PollingChannel(pcs.currentChannel);
- }
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/messaging_AMF_LongPoll.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/messaging_AMF_LongPoll.mxml b/apps/team/features/messaging/messaging_AMF_LongPoll.mxml
deleted file mode 100755
index dfa7593..0000000
--- a/apps/team/features/messaging/messaging_AMF_LongPoll.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_LongPoll"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_LongPoll"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/messaging_AMF_Piggyback.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/messaging_AMF_Piggyback.mxml b/apps/team/features/messaging/messaging_AMF_Piggyback.mxml
deleted file mode 100755
index 9312b8c..0000000
--- a/apps/team/features/messaging/messaging_AMF_Piggyback.mxml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example where the client relies on piggybacking for server updates.
- The intended use for piggybacking is to support very light-weight psuedo-polling,
- where rather than the client channel polling the server on a fixed or adaptive interval,
- when the client sends a non-command message to the server (via a Producer or RemoteObject or DataService)
- we'll piggyback any pending data for the client's messaging or data management subscriptions
- along with the response to the client's message. Piggybacking can also be used
- on a channel that has polling enabled but on a wide interval like 5 or 10 seconds or more,
- in which case the app will feel more responsive if the client is sending messages to the server.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Piggyback"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Piggyback"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
-
- import mx.messaging.ChannelSet;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
- import mx.messaging.messages.AsyncMessage;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:Object):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/messaging_AMF_Poll.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/messaging_AMF_Poll.mxml b/apps/team/features/messaging/messaging_AMF_Poll.mxml
deleted file mode 100755
index 5dba032..0000000
--- a/apps/team/features/messaging/messaging_AMF_Poll.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Poll"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Poll"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/messaging_AMF_Stream.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/messaging_AMF_Stream.mxml b/apps/team/features/messaging/messaging_AMF_Stream.mxml
deleted file mode 100755
index c134fbb..0000000
--- a/apps/team/features/messaging/messaging_AMF_Stream.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_AMF_Stream"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_AMF_Stream"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/messaging_HTTP.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/messaging_HTTP.mxml b/apps/team/features/messaging/messaging_HTTP.mxml
deleted file mode 100755
index 7491e2b..0000000
--- a/apps/team/features/messaging/messaging_HTTP.mxml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example where the client manually initiates a poll request without
- relying on polling-interval
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="subscribeConsumer();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Poll" click="poll();"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
-
- import mx.messaging.ChannelSet;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
- import mx.messaging.channels.PollingChannel;
- import mx.messaging.messages.AsyncMessage;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- public var pc:PollingChannel;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer: received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:Object):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
-
- private function poll():void
- {
- ta.text += "Polling" + "\n";
- if (!consumer.subscribed)
- subscribeConsumer();
- pc.poll();
- }
-
- private function subscribeConsumer():void
- {
- ta.text += "Subscribing Consumer \n";
- consumer.subscribe();
-
- var pcs:ChannelSet = consumer.channelSet;
- pc = PollingChannel(pcs.currentChannel);
- }
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/messaging_HTTP_LongPoll.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/messaging_HTTP_LongPoll.mxml b/apps/team/features/messaging/messaging_HTTP_LongPoll.mxml
deleted file mode 100755
index 233c2be..0000000
--- a/apps/team/features/messaging/messaging_HTTP_LongPoll.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP_LongPoll"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP_LongPoll"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/messaging_HTTP_Piggyback.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/messaging_HTTP_Piggyback.mxml b/apps/team/features/messaging/messaging_HTTP_Piggyback.mxml
deleted file mode 100755
index 244263d..0000000
--- a/apps/team/features/messaging/messaging_HTTP_Piggyback.mxml
+++ /dev/null
@@ -1,104 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <!-- An example where the client relies on piggybacking for server updates.
- The intended use for piggybacking is to support very light-weight psuedo-polling,
- where rather than the client channel polling the server on a fixed or adaptive interval,
- when the client sends a non-command message to the server (via a Producer or RemoteObject or DataService)
- we'll piggyback any pending data for the client's messaging or data management subscriptions
- along with the response to the client's message. Piggybacking can also be used
- on a channel that has polling enabled but on a wide interval like 5 or 10 seconds or more,
- in which case the app will feel more responsive if the client is sending messages to the server.
- -->
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP_Piggyback"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP_Piggyback"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
-
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
-
- import mx.messaging.ChannelSet;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
- import mx.messaging.messages.AsyncMessage;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:Object):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-
-</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/team/features/messaging/messaging_HTTP_Poll.mxml
----------------------------------------------------------------------
diff --git a/apps/team/features/messaging/messaging_HTTP_Poll.mxml b/apps/team/features/messaging/messaging_HTTP_Poll.mxml
deleted file mode 100755
index d385345..0000000
--- a/apps/team/features/messaging/messaging_HTTP_Poll.mxml
+++ /dev/null
@@ -1,91 +0,0 @@
-<?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.
-
--->
-<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%"
- creationComplete="creationCompleteHandler();">
-
- <mx:Panel id="mainPanel" height="100%" width="100%">
- <mx:HBox>
- <mx:Label text="Producer"/>
- <mx:Button label="Send Foo{counter}" click="sendMessage()"/>
- <mx:Button label="Disconnect" click="producer.disconnect();" enabled="{producer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{producer.connected}"/>
- </mx:HBox>
- <mx:HBox>
- <mx:Label text="Consumer"/>
- <mx:Button label="Subcribe" click="consumer.subscribe();" enabled="{!consumer.subscribed}"/>
- <mx:Button label="Unsubscribe" click="consumer.unsubscribe();" enabled="{consumer.subscribed}"/>
- <mx:Button label="Disconnect" click="consumer.disconnect();" enabled="{consumer.connected}"/>
- <mx:CheckBox label="Connected?" selected="{consumer.connected}"/>
- <mx:CheckBox label="Subscribed?" selected="{consumer.subscribed}"/>
- </mx:HBox>
- <mx:Button label="Clear" click='ta.text = ""'/>
- <mx:TextArea id="ta" width="100%" height="100%"/>
- </mx:Panel>
-
- <mx:Producer id="producer"
- destination="messaging_HTTP_Poll"
- fault="faultHandler(event)"/>
-
- <mx:Consumer id="consumer"
- destination="messaging_HTTP_Poll"
- fault="faultHandler(event)"
- message="messageHandler(event)"/>
-
- <mx:Script>
- <![CDATA[
- import mx.messaging.events.MessageFaultEvent;
- import mx.messaging.events.MessageEvent;
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.Producer;
- import mx.messaging.Consumer;
-
- import mx.logging.Log;
- import mx.logging.targets.TraceTarget;
-
- [Bindable]
- public var counter:int = 0;
-
- private function creationCompleteHandler():void
- {
- var target:TraceTarget = new TraceTarget();
- target.includeLevel = true;
- target.filters = ["mx.messaging.*", "mx.rpc.*"];
- Log.addTarget(target);
- }
-
- private function sendMessage():void
- {
- var msg:AsyncMessage = new AsyncMessage();
- msg.body = "Foo" + counter++;
- producer.send(msg);
- }
-
- private function messageHandler(event:MessageEvent):void
- {
- ta.text += "Consumer received message: "+ event.message.body + "\n";
- }
-
- private function faultHandler(event:MessageFaultEvent):void
- {
- ta.text += "Received fault: " + event.faultString + "\n";
- }
- ]]>
- </mx:Script>
-</mx:Application>
\ No newline at end of file
[02/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/main.mxml b/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/main.mxml
new file mode 100755
index 0000000..226a032
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-update/src/main.mxml
@@ -0,0 +1,31 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="horizontal"
+ creationComplete="srv.getProducts()">
+
+ <mx:RemoteObject id="srv" destination="product"/>
+
+ <mx:Panel title="Catalog" width="100%" height="100%">
+ <mx:DataGrid id="list" dataProvider="{srv.getProducts.lastResult}" width="100%" height="100%"/>
+ </mx:Panel>
+
+ <ProductForm product="{Product(list.selectedItem)}"/>
+
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-webservice/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-webservice/build.xml b/attic/apps/samples/WEB-INF/flex-src/testdrive-webservice/build.xml
new file mode 100755
index 0000000..166c86a
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-webservice/build.xml
@@ -0,0 +1,81 @@
+<?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="Testdrive - WebService" />
+ <property name="application.file" value="main" />
+ <property name="application.bin.dir" value="${samples.war}/testdrive-webservice" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/testdrive-webservice/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="*.jsp"/>
+ </copy>
+
+ </target>
+
+ <target name="clean" description="--> Removes jars and classes">
+ <delete quiet="true" includeemptydirs="true">
+ <fileset dir="${application.bin.dir}" includes="*.swf,index.html,*.jsp"/>
+ <fileset dir="${application.bin.dir}/history" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/testdrive-webservice/src/main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/testdrive-webservice/src/main.mxml b/attic/apps/samples/WEB-INF/flex-src/testdrive-webservice/src/main.mxml
new file mode 100755
index 0000000..48c1f9f
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/testdrive-webservice/src/main.mxml
@@ -0,0 +1,33 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
+
+ <mx:WebService id="srv" destination="ws-catalog" useProxy="true" showBusyCursor="true"/>
+
+ <mx:DataGrid dataProvider="{srv.getCategories.lastResult}" width="100%" height="100%">
+ <mx:columns>
+ <mx:DataGridColumn dataField="categoryId" headerText="Category Id"/>
+ <mx:DataGridColumn dataField="categoryName" headerText="Category Name"/>
+ </mx:columns>
+ </mx:DataGrid>
+
+ <mx:Button label="Get Data" click="srv.getCategories()"/>
+
+</mx:Application>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/traderdesktop/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/traderdesktop/build.xml b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/build.xml
new file mode 100755
index 0000000..3e11052
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/build.xml
@@ -0,0 +1,81 @@
+<?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="Trader Desktop" />
+ <property name="application.file" value="traderdesktop" />
+ <property name="application.bin.dir" value="${samples.war}/traderdesktop" />
+ <property name="application.src.dir" value="${samples.war}/WEB-INF/flex-src/traderdesktop/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="*.jsp"/>
+ </copy>
+
+ </target>
+
+ <target name="clean" description="--> Removes jars and classes">
+ <delete quiet="true" includeemptydirs="true">
+ <fileset dir="${application.bin.dir}" includes="*.swf,index.html,*.jsp"/>
+ <fileset dir="${application.bin.dir}/history" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
new file mode 100755
index 0000000..394a2db
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package {
+
+ import mx.controls.Label;
+ import flash.display.Graphics;
+
+ public class BackgroundColorRenderer extends Label {
+
+ public static var symbol:String;
+
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+ var g:Graphics = graphics;
+
+ g.clear();
+
+ if (data && data.date && data.symbol == symbol)
+ {
+ if( data.change && data.change >= 0 )
+ {
+ g.beginFill(0x009900, 0.5);
+ g.drawRect(0, 0, unscaledWidth, unscaledHeight);
+ g.endFill();
+ }
+ else
+ {
+ g.beginFill(0xFF0000, 0.5);
+ g.drawRect(0, 0, unscaledWidth, unscaledHeight);
+ g.endFill();
+ }
+ }
+
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
new file mode 100755
index 0000000..64bd11c
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package {
+
+ import mx.controls.Label;
+ import mx.controls.dataGridClasses.*;
+
+ public class ColorRenderer extends Label {
+
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ if (data && listData && data[DataGridListData(listData).dataField] < 0)
+ {
+ setStyle("color", 0xFF0000);
+ }
+ else
+ {
+ setStyle("color", 0x009900);
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/main.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/main.css b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/main.css
new file mode 100755
index 0000000..3c66056
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/main.css
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+@namespace mx "library://ns.adobe.com/flex/mx";
+
+mx|Application {
+ padding-top: 16;
+ padding-bottom: 16;
+ padding-left: 16;
+ padding-right: 16;
+ vertical-gap: 4;
+}
+mx|Panel
+{
+ borderColor: #006699;
+ borderAlpha: 0.6;
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/samples/portfolio/Stock.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/samples/portfolio/Stock.as b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/samples/portfolio/Stock.as
new file mode 100755
index 0000000..e99d6d7
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/samples/portfolio/Stock.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package samples.portfolio
+{
+ [RemoteClass(alias="flex.samples.marketdata.Stock")]
+ [Bindable]
+ public class Stock
+ {
+ public var symbol:String;
+ public var name:String;
+ public var low:Number;
+ public var high:Number;
+ public var open:Number;
+ public var last:Number;
+ public var change:Number = 0;
+ public var date:Date;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/startfeed.jsp
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/startfeed.jsp b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/startfeed.jsp
new file mode 100755
index 0000000..36bdd30
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/startfeed.jsp
@@ -0,0 +1,26 @@
+<!--
+ 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.
+-->
+<%@page import="flex.samples.marketdata.Feed"%>
+<%
+ try {
+ Feed feed = new Feed();
+ feed.start();
+ out.println("Feed Started");
+ } catch (Exception e) {
+ out.println("A problem occured while starting the feed: "+e.getMessage());
+ }
+%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/stopfeed.jsp
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/stopfeed.jsp b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/stopfeed.jsp
new file mode 100755
index 0000000..01be2b5
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/stopfeed.jsp
@@ -0,0 +1,26 @@
+<!--
+ 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.
+-->
+<%@page import="flex.samples.marketdata.Feed"%>
+<%
+ try {
+ Feed feed = new Feed();
+ feed.stop();
+ out.println("Feed Stopped");
+ } catch (Exception e) {
+ out.println("A problem occured while stopping the feed: "+e.getMessage());
+ }
+%>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
new file mode 100755
index 0000000..95d13c2
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
@@ -0,0 +1,241 @@
+<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
+ backgroundGradientColors="[#FFFFFF,#FFFFFF]"
+ layout="horizontal" horizontalAlign="left" verticalGap="8"
+ creationComplete="initApp()">
+
+ <mx:Style source="main.css"/>
+
+ <mx:Script>
+ <![CDATA[
+ import mx.messaging.channels.HTTPChannel;
+ import mx.messaging.channels.AMFChannel;
+ import mx.controls.Alert;
+ import mx.collections.ArrayCollection;
+ import mx.messaging.Channel;
+ import mx.messaging.ChannelSet;
+ import mx.messaging.config.ServerConfig;
+ import mx.messaging.events.MessageEvent;
+ import samples.portfolio.Stock;
+ import mx.messaging.Consumer;
+
+ private var consumers:Object;
+
+ [Bindable]
+ private var items:ArrayCollection;
+
+ private var stockMap:Object;
+
+ private function initApp():void
+ {
+ var channelSet:ChannelSet = ServerConfig.getChannelSet("market-data-feed");
+ channels.dataProvider = channelSet.channelIds;
+ consumers = new Object();
+ stockMap = new Object();
+ items = new ArrayCollection();
+ initializeWatchList(["IBM", "JBLU", "ADBE", "GE", "C"]);
+ displayChannelInfo();
+ }
+
+ private function deleteSymbol():void
+ {
+ var symbol:String = dg.selectedItem.symbol;
+ unsubscribe(symbol);
+ items.removeItemAt(dg.selectedIndex);
+ delete stockMap[symbol];
+ }
+
+ public function initializeWatchList(list:Array):void
+ {
+ for (var i:int=0; i<list.length; i++)
+ {
+ addSymbol(list[i]);
+ }
+ }
+
+ private function addSymbol(symbol:String):void
+ {
+ if (symbol == null || symbol == "")
+ {
+ Alert.show("Cannot add an empty symbol");
+ return;
+ }
+
+ symbol = symbol.toUpperCase();
+ if (stockMap.hasOwnProperty(symbol))
+ {
+ Alert.show("Symbol '" + symbol + "' is already in the list");
+ return;
+ }
+
+ var stock:Stock = new Stock();
+ stock.symbol = symbol;
+ stockMap[symbol] = stock;
+ items.addItem(stock);
+ subscribe(symbol);
+ }
+
+ private function subscribe(symbol:String):void
+ {
+ var consumer:Consumer = new Consumer();
+ consumer.destination = "market-data-feed";
+ consumer.subtopic = symbol;
+ consumer.channelSet = new ChannelSet([channels.selectedItem]);
+ consumer.addEventListener(MessageEvent.MESSAGE, messageHandler);
+ consumer.subscribe();
+ consumers[symbol] = consumer;
+ }
+
+ private function unsubscribe(symbol:String):void
+ {
+ if (consumers[symbol])
+ {
+ var consumer:Consumer = consumers[symbol];
+ consumer.removeEventListener(MessageEvent.MESSAGE, messageHandler);
+ if (consumer.subscribed)
+ {
+ consumer.unsubscribe();
+ }
+ consumer.channelSet.disconnectAll();
+ consumers[symbol] = null;
+ }
+ }
+
+ private function channelChange():void
+ {
+ displayChannelInfo();
+
+ var i:int;
+ // Get rid of all the subscriptions that use the previously selected channel
+ for (i=0; i<items.length; i++)
+ {
+ unsubscribe(items.getItemAt(i).symbol)
+ }
+
+ // Subscribe using the newly selected channel
+ for (i=0; i<items.length; i++)
+ {
+ subscribe(items.getItemAt(i).symbol)
+ }
+ }
+
+ private function displayChannelInfo():void
+ {
+ var channel:Object = ServerConfig.getChannel(channels.selectedItem as String);
+ channelId.text = channel.id;
+ channelClass.text = getQualifiedClassName(channel);
+ endpoint.text = channel.endpoint;
+ if (channel is AMFChannel || channel is HTTPChannel)
+ {
+ pollingEnabled.text = channel.pollingEnabled;
+ pollingInterval.text = channel.pollingInterval;
+ }
+ else
+ {
+ pollingEnabled.text = "n/a";
+ pollingInterval.text = "n/a";
+ }
+ perClientSettings.visible = channel.id.indexOf("per-client") >= 0;
+ }
+
+ private function messageHandler(event:MessageEvent):void
+ {
+ var changedStock:Stock = event.message.body as Stock;
+ var stock:Stock = stockMap[changedStock.symbol];
+
+ BackgroundColorRenderer.symbol = changedStock.symbol;
+
+ if (stock)
+ {
+ stock.open = changedStock.open;
+ stock.change = changedStock.change;
+ stock.last = changedStock.last;
+ stock.high = changedStock.high;
+ stock.low = changedStock.low;
+ stock.date = changedStock.date;
+ }
+ }
+
+ private function formatNumber(item:Object, column:DataGridColumn):String
+ {
+ return nf.format(item[column.dataField]);
+ }
+
+ // Only used for the per-client-qos channels
+ private function setDelay():void
+ {
+ configSrv.setAttribute("market-data-delay", delay.text);
+ }
+
+
+ ]]>
+ </mx:Script>
+
+ <!-- Only used for the per-client-qos channels to provide per-client config values -->
+ <mx:RemoteObject id="configSrv" destination="flex-client-qos-config"/>
+
+ <mx:NumberFormatter id="nf" precision="2"/>
+
+ <mx:Panel title="Watch List" width="400" height="400">
+ <mx:DataGrid id="dg" dataProvider="{items}" width="100%" height="100%">
+ <mx:columns>
+ <mx:DataGridColumn headerText="Symbol" dataField="symbol" width="80"/>
+ <mx:DataGridColumn headerText="Open" dataField="open" labelFunction="formatNumber" textAlign="right" width="60"/>
+ <mx:DataGridColumn headerText="Last" dataField="last" itemRenderer="BackgroundColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
+ <mx:DataGridColumn headerText="Change" dataField="change" itemRenderer="ColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
+ <mx:DataGridColumn headerText="High" dataField="high" labelFunction="formatNumber" textAlign="right" width="60"/>
+ <mx:DataGridColumn headerText="Low" dataField="low" labelFunction="formatNumber" textAlign="right" width="60"/>
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:ControlBar>
+ <mx:TextInput id="symbol" enter="addSymbol(symbol.text);symbol.text='';" width="50"/>
+ <mx:Button label="Add Symbol" click="addSymbol(symbol.text);symbol.text='';"/>
+ <mx:Spacer width="100%"/>
+ <mx:Button label="Delete Symbol" click="deleteSymbol()" enabled="{dg.selectedItem}"/>
+ </mx:ControlBar>
+ </mx:Panel>
+
+ <mx:Form>
+ <mx:FormItem label="Select a channel">
+ <mx:ComboBox id="channels" change="channelChange()"/>
+ </mx:FormItem>
+ <mx:FormItem label="Channel Id">
+ <mx:Label id="channelId"/>
+ </mx:FormItem>
+ <mx:FormItem label="Channel Class">
+ <mx:Label id="channelClass"/>
+ </mx:FormItem>
+ <mx:FormItem label="Endpoint">
+ <mx:Label id="endpoint"/>
+ </mx:FormItem>
+ <mx:FormItem label="Polling Enabled">
+ <mx:Label id="pollingEnabled"/>
+ </mx:FormItem>
+ <mx:FormItem label="Polling Interval (millis)">
+ <mx:Label id="pollingInterval"/>
+ </mx:FormItem>
+ <mx:FormItem id="perClientSettings" label="Custom (Per Client) Quote Delay" direction="horizontal">
+ <mx:TextInput id="delay" width="80" text="5000"/>
+ <mx:Button label="Apply" click="setDelay()"/>
+ </mx:FormItem>
+ </mx:Form>
+
+</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex/messaging-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex/messaging-config.xml b/attic/apps/samples/WEB-INF/flex/messaging-config.xml
new file mode 100755
index 0000000..7b331c3
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex/messaging-config.xml
@@ -0,0 +1,58 @@
+<?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.
+
+-->
+<service id="message-service" class="flex.messaging.services.MessageService">
+
+ <adapters>
+ <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
+ <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
+ </adapters>
+
+ <default-channels>
+ <channel ref="my-streaming-amf"/>
+ <channel ref="my-polling-amf"/>
+ </default-channels>
+
+ <destination id="feed">
+ <!-- Destination specific channel configuration can be defined if needed
+ <channels>
+ <channel ref="my-streaming-amf"/>
+ </channels>
+ -->
+ </destination>
+
+ <destination id="chat"/>
+
+ <destination id="dashboard"/>
+
+ <destination id="market-data-feed">
+ <properties>
+ <server>
+ <allow-subtopics>true</allow-subtopics>
+ <subtopic-separator>.</subtopic-separator>s
+ </server>
+ </properties>
+ <channels>
+ <channel ref="my-polling-amf"/>
+ <channel ref="my-streaming-amf"/>
+ <channel ref="per-client-qos-polling-amf"/>
+ </channels>
+ </destination>
+
+</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex/proxy-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex/proxy-config.xml b/attic/apps/samples/WEB-INF/flex/proxy-config.xml
new file mode 100755
index 0000000..158a059
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex/proxy-config.xml
@@ -0,0 +1,60 @@
+<?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.
+
+-->
+<service id="proxy-service" class="flex.messaging.services.HTTPProxyService">
+
+ <properties>
+ <connection-manager>
+ <max-total-connections>100</max-total-connections>
+ <default-max-connections-per-host>2</default-max-connections-per-host>
+ </connection-manager>
+
+ <allow-lax-ssl>true</allow-lax-ssl>
+ </properties>
+
+ <default-channels>
+ <channel ref="my-http"/>
+ <channel ref="my-amf"/>
+ </default-channels>
+
+ <adapters>
+ <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
+ <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
+ </adapters>
+
+ <destination id="DefaultHTTP">
+ <properties>
+ </properties>
+ </destination>
+
+ <destination id="catalog">
+ <properties>
+ <url>/{context.root}/testdrive-httpservice/catalog.jsp</url>
+ </properties>
+ </destination>
+
+ <destination id="ws-catalog">
+ <properties>
+ <wsdl>http://feeds.adobe.com/webservices/mxna2.cfc?wsdl</wsdl>
+ <soap>http://feeds.adobe.com/webservices/mxna2.cfc</soap>
+ </properties>
+ <adapter ref="soap-proxy"/>
+ </destination>
+
+</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex/remoting-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex/remoting-config.xml b/attic/apps/samples/WEB-INF/flex/remoting-config.xml
new file mode 100755
index 0000000..8b0546b
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex/remoting-config.xml
@@ -0,0 +1,56 @@
+<?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.
+
+-->
+<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="product">
+ <properties>
+ <source>flex.samples.product.ProductService</source>
+ </properties>
+ </destination>
+
+ <destination id="productService">
+ <properties>
+ <source>flex.samples.dcd.product.ProductService</source>
+ </properties>
+ </destination>
+
+ <destination id="chat-room-service">
+ <properties>
+ <source>flex.samples.runtimeconfig.ChatRoomService</source>
+ <scope>application</scope>
+ </properties>
+ </destination>
+
+ <destination id="flex-client-qos-config" channels="per-client-qos-polling-amf">
+ <properties>
+ <source>flex.samples.qos.FlexClientConfigService</source>
+ </properties>
+ </destination>
+
+ </service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/flex/services-config.xml b/attic/apps/samples/WEB-INF/flex/services-config.xml
new file mode 100755
index 0000000..13c4069
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/flex/services-config.xml
@@ -0,0 +1,146 @@
+<?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.
+
+-->
+<services-config>
+
+ <services>
+
+ <service class="flex.samples.DatabaseCheckService" id="hsqldb" />
+
+ <service-include file-path="remoting-config.xml" />
+ <service-include file-path="proxy-config.xml" />
+ <service-include file-path="messaging-config.xml" />
+
+ <service class="flex.samples.runtimeconfig.EmployeeRuntimeRemotingDestination" id="runtime-employee-ro" />
+
+ <!--
+ Application level default channels. Application level default channels are
+ necessary when a dynamic destination is being used by a service component
+ and no ChannelSet has been defined for the service component. In that case,
+ application level default channels will be used to contact the destination.
+ -->
+ <default-channels>
+ <channel ref="my-amf"/>
+ </default-channels>
+
+ </services>
+
+
+ <security>
+ <security-constraint id="sample-users">
+ <auth-method>Custom</auth-method>
+ <roles>
+ <role>sampleusers</role>
+ </roles>
+ </security-constraint>
+
+ <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
+ <!-- Uncomment the correct app server
+ <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
+ <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
+ <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
+ <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
+ -->
+ </security>
+
+ <channels>
+
+ <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
+ </channel-definition>
+
+ <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
+ <properties>
+ <polling-enabled>false</polling-enabled>
+ </properties>
+ </channel-definition>
+
+ <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
+ <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
+ <properties>
+ <add-no-cache-headers>false</add-no-cache-headers>
+ </properties>
+ </channel-definition>
+
+ <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
+ <properties>
+ <polling-enabled>true</polling-enabled>
+ <polling-interval-seconds>4</polling-interval-seconds>
+ </properties>
+ </channel-definition>
+
+ <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
+ </channel-definition>
+
+ <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
+ <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
+ <properties>
+ <add-no-cache-headers>false</add-no-cache-headers>
+ </properties>
+ </channel-definition>
+
+ <channel-definition id="per-client-qos-polling-amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/qosamfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
+ <properties>
+ <polling-enabled>true</polling-enabled>
+ <polling-interval-millis>500</polling-interval-millis>
+ <flex-client-outbound-queue-processor class="flex.samples.qos.CustomDelayQueueProcessor">
+ <properties>
+ <flush-delay>5000</flush-delay>
+ </properties>
+ </flex-client-outbound-queue-processor>
+ </properties>
+ </channel-definition>
+
+ </channels>
+
+ <logging>
+ <!-- You may also use flex.messaging.log.ServletLogTarget -->
+ <target class="flex.messaging.log.ConsoleTarget" level="Error">
+ <properties>
+ <prefix>[BlazeDS] </prefix>
+ <includeDate>false</includeDate>
+ <includeTime>false</includeTime>
+ <includeLevel>true</includeLevel>
+ <includeCategory>false</includeCategory>
+ </properties>
+ <filters>
+ <pattern>Endpoint.*</pattern>
+ <pattern>Service.*</pattern>
+ <pattern>Configuration</pattern>
+ </filters>
+ </target>
+ </logging>
+
+ <system>
+ <redeploy>
+ <enabled>true</enabled>
+ <watch-interval>20</watch-interval>
+ <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
+ <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
+ <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
+ </redeploy>
+ </system>
+
+</services-config>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java b/attic/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java
new file mode 100755
index 0000000..a04fa73
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/ConnectionHelper.java
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+package flex.samples;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+public class ConnectionHelper
+{
+ private String url;
+ private static ConnectionHelper instance;
+
+ private ConnectionHelper()
+ {
+ try {
+ Class.forName("org.hsqldb.jdbcDriver");
+ url = "jdbc:hsqldb:hsql://localhost:9002/flexdemodb";
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ public static Connection getConnection() throws SQLException {
+ if (instance == null) {
+ instance = new ConnectionHelper();
+ }
+ try {
+ return DriverManager.getConnection(instance.url);
+ } catch (SQLException e) {
+ throw e;
+ }
+ }
+
+ public static void close(Connection connection)
+ {
+ try {
+ if (connection != null) {
+ connection.close();
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/DAOException.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/DAOException.java b/attic/apps/samples/WEB-INF/src/flex/samples/DAOException.java
new file mode 100755
index 0000000..3d71e0f
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/DAOException.java
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+package flex.samples;
+
+public class DAOException extends RuntimeException
+{
+ static final long serialVersionUID = -1881205326938716446L;
+
+ public DAOException(String message)
+ {
+ super(message);
+ }
+
+ public DAOException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public DAOException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java b/attic/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java
new file mode 100755
index 0000000..68f1990
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/DatabaseCheckService.java
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+package flex.samples;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+
+import flex.messaging.config.ConfigMap;
+import flex.messaging.services.AbstractBootstrapService;
+
+public class DatabaseCheckService extends AbstractBootstrapService
+{
+ public void initialize(String id, ConfigMap properties)
+ {
+ Connection c = null;
+ try
+ {
+ // Check that the database is running...
+ c = ConnectionHelper.getConnection();
+ // ... if yes return
+ return;
+ }
+ catch (SQLException e)
+ {
+ System.out.println("******************************************************************************");
+ System.out.println("* *");
+ System.out.println("* Unable to connect to the samples database. *");
+ System.out.println("* You must start the samples database before you can run the samples. *");
+ System.out.println("* To start the samples database: *");
+ System.out.println("* 1. Open a command prompt and go to the {install-dir}/sampledb dir *");
+ System.out.println("* 2. Run startdb.bat (Windows) or startdb.sh (Unix-based systems) *");
+ System.out.println("* *");
+ System.out.println("******************************************************************************");
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+
+ }
+
+ public void start()
+ {
+ }
+
+
+ public void stop()
+ {
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java
new file mode 100755
index 0000000..c13602a
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/ConcurrencyException.java
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ */
+package flex.samples.crm;
+
+public class ConcurrencyException extends Exception
+{
+ private static final long serialVersionUID = -6405818907028247079L;
+
+ public ConcurrencyException(String message)
+ {
+ super(message);
+ }
+
+ public ConcurrencyException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public ConcurrencyException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java
new file mode 100755
index 0000000..2560ca0
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/DAOException.java
@@ -0,0 +1,38 @@
+/*
+ * 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.
+ */
+package flex.samples.crm;
+
+public class DAOException extends RuntimeException
+{
+ private static final long serialVersionUID = -8852593974738250673L;
+
+ public DAOException(String message)
+ {
+ super(message);
+ }
+
+ public DAOException(Throwable cause)
+ {
+ super(cause);
+ }
+
+ public DAOException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java
new file mode 100755
index 0000000..8cd5e24
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/Company.java
@@ -0,0 +1,105 @@
+/*
+ * 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.
+ */
+package flex.samples.crm.company;
+
+public class Company
+{
+ private int companyId;
+
+ private String name;
+
+ private String address;
+
+ private String city;
+
+ private String zip;
+
+ private String state;
+
+ private String industry;
+
+ public String getAddress()
+ {
+ return address;
+ }
+
+ public void setAddress(String address)
+ {
+ this.address = address;
+ }
+
+ public String getCity()
+ {
+ return city;
+ }
+
+ public void setCity(String city)
+ {
+ this.city = city;
+ }
+
+ public int getCompanyId()
+ {
+ return companyId;
+ }
+
+ public void setCompanyId(int companyId)
+ {
+ this.companyId = companyId;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getState()
+ {
+ return state;
+ }
+
+ public void setState(String state)
+ {
+ this.state = state;
+ }
+
+ public String getZip()
+ {
+ return zip;
+ }
+
+ public void setZip(String zip)
+ {
+ this.zip = zip;
+ }
+
+ public String getIndustry()
+ {
+ return this.industry;
+ }
+
+ public void setIndustry(String industry)
+ {
+ this.industry = industry;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java
new file mode 100755
index 0000000..3047319
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/company/CompanyDAO.java
@@ -0,0 +1,228 @@
+/*
+ * 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.
+ */
+package flex.samples.crm.company;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.List;
+
+import flex.samples.ConnectionHelper;
+import flex.samples.crm.ConcurrencyException;
+import flex.samples.crm.DAOException;
+
+public class CompanyDAO
+{
+ public List findCompanies(String name, String industry) throws DAOException
+ {
+ List list = new ArrayList();
+ Connection c = null;
+ try
+ {
+ String sql = "SELECT * FROM company";
+ if (industry != null && industry != "All")
+ sql += " WHERE industry = ?";
+ if (name != null)
+ {
+ if (industry == null)
+ sql += " WHERE company.name LIKE ?";
+ else
+ sql += " AND company.name LIKE ?";
+ }
+ sql += " ORDER BY company.name";
+
+ c = ConnectionHelper.getConnection();
+
+ PreparedStatement ps = c.prepareStatement(sql);
+ ps.setString(1, industry);
+ ps.setString(1, "%" + name + "%");
+ ResultSet rs = ps.executeQuery();
+ Company company;
+ while (rs.next())
+ {
+ company = new Company();
+ company.setCompanyId(rs.getInt("company_id"));
+ company.setName(rs.getString("name"));
+ company.setAddress(rs.getString("address"));
+ company.setCity(rs.getString("city"));
+ company.setZip(rs.getString("zip"));
+ company.setState(rs.getString("state"));
+ company.setIndustry(rs.getString("industry"));
+ list.add(company);
+ }
+ rs.close();
+ ps.close();
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e);
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ return list;
+ }
+
+ public Company getCompany(int companyId) throws DAOException
+ {
+ Company company = null;
+ Connection c = null;
+ try
+ {
+ c = ConnectionHelper.getConnection();
+ PreparedStatement ps = c.prepareStatement("SELECT * FROM company WHERE company_id= ?");
+ ps.setInt(1, companyId);
+ ResultSet rs = ps.executeQuery();
+ if (rs.next())
+ {
+ company = new Company();
+ company.setCompanyId(rs.getInt("company_id"));
+ company.setName(rs.getString("name"));
+ company.setAddress(rs.getString("address"));
+ company.setCity(rs.getString("city"));
+ company.setZip(rs.getString("zip"));
+ company.setState(rs.getString("state"));
+ company.setIndustry(rs.getString("industry"));
+ }
+ rs.close();
+ ps.close();
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e);
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ return company;
+ }
+
+ public Company create(Company company) throws DAOException
+ {
+ Connection c = null;
+ PreparedStatement ps = null;
+ try
+ {
+ c = ConnectionHelper.getConnection();
+ ps = c.prepareStatement("INSERT INTO company (name, address, city, zip, state, industry) VALUES (?, ?, ?, ?, ?, ?)");
+ ps.setString(1, company.getName());
+ ps.setString(2, company.getAddress());
+ ps.setString(3, company.getCity());
+ ps.setString(4, company.getZip());
+ ps.setString(5, company.getState());
+ ps.setString(6, company.getIndustry());
+ ps.execute();
+ ps.close();
+ ps = null;
+ Statement s = c.createStatement();
+ // HSQLDB Syntax to get the identity (company_id) of inserted row
+ ResultSet rs = s.executeQuery("CALL IDENTITY()");
+ rs.next();
+
+ // Update the id in the returned object. This is important as this
+ // value must get returned to the client.
+ company.setCompanyId(rs.getInt(1));
+
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e);
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ return company;
+ }
+
+ public void update(Company newVersion, Company previousVersion, List changes) throws DAOException, ConcurrencyException
+ {
+ Connection c = null;
+ PreparedStatement ps = null;
+ try
+ {
+ c = ConnectionHelper.getConnection();
+ ps = c.prepareStatement("UPDATE company SET name=?, address=?, city=?, zip=?, state=?, industry=? WHERE company_id=? AND name=? AND address=? AND city=? AND zip=? AND state=?" );
+ ps.setString(1, newVersion.getName());
+ ps.setString(2, newVersion.getAddress());
+ ps.setString(3, newVersion.getCity());
+ ps.setString(4, newVersion.getZip());
+ ps.setString(5, newVersion.getState());
+ ps.setString(6, newVersion.getIndustry());
+ ps.setInt(7, newVersion.getCompanyId());
+ ps.setString(8, previousVersion.getName());
+ ps.setString(9, previousVersion.getAddress());
+ ps.setString(10, previousVersion.getCity());
+ ps.setString(11, previousVersion.getZip());
+ ps.setString(12, previousVersion.getState());
+ if (ps.executeUpdate() == 0)
+ {
+ throw new ConcurrencyException("Item not found");
+ }
+ ps.close();
+ ps = null;
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e);
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ }
+
+ public void delete(Company company) throws DAOException, ConcurrencyException
+ {
+ Connection c = null;
+ PreparedStatement ps = null;
+ try
+ {
+ c = ConnectionHelper.getConnection();
+
+ ps = c.prepareStatement("DELETE FROM company WHERE company_id=? AND name=? AND address=? AND city=? AND zip=? AND state=?");
+ ps.setInt(1, company.getCompanyId());
+ ps.setString(2, company.getName());
+ ps.setString(3, company.getAddress());
+ ps.setString(4, company.getCity());
+ ps.setString(5, company.getZip());
+ ps.setString(6, company.getState());
+ if (ps.executeUpdate() == 0)
+ {
+ throw new ConcurrencyException("Item not found");
+ }
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e);
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java
new file mode 100755
index 0000000..7c59871
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/Employee.java
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+package flex.samples.crm.employee;
+
+import flex.samples.crm.company.Company;
+
+public class Employee
+{
+ private int employeeId;
+
+ private String firstName;
+
+ private String lastName;
+
+ private String title;
+
+ private String email;
+
+ private String phone;
+
+ private Company company;
+
+ public String getEmail()
+ {
+ return email;
+ }
+
+ public void setEmail(String email)
+ {
+ this.email = email;
+ }
+
+ public int getEmployeeId()
+ {
+ return employeeId;
+ }
+
+ public void setEmployeeId(int employeeId)
+ {
+ this.employeeId = employeeId;
+ }
+
+ public String getFirstName()
+ {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName)
+ {
+ this.firstName = firstName;
+ }
+
+ public String getLastName()
+ {
+ return lastName;
+ }
+
+ public void setLastName(String lastName)
+ {
+ this.lastName = lastName;
+ }
+
+ public String getPhone()
+ {
+ return phone;
+ }
+
+ public void setPhone(String phone)
+ {
+ this.phone = phone;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+ public Company getCompany()
+ {
+ return company;
+ }
+
+ public void setCompany(Company company)
+ {
+ this.company = company;
+ }
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/EmployeeDAO.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/EmployeeDAO.java b/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/EmployeeDAO.java
new file mode 100755
index 0000000..273dee5
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/crm/employee/EmployeeDAO.java
@@ -0,0 +1,300 @@
+/*
+ * 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.
+ */
+package flex.samples.crm.employee;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.Statement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.List;
+
+import flex.samples.ConnectionHelper;
+import flex.samples.DAOException;
+import flex.samples.crm.ConcurrencyException;
+import flex.samples.crm.company.Company;
+
+public class EmployeeDAO
+{
+ public List getEmployees() throws DAOException
+ {
+ List list = new ArrayList();
+ Connection c = null;
+ try
+ {
+ c = ConnectionHelper.getConnection();
+ Statement s = c.createStatement();
+ ResultSet rs = s.executeQuery("SELECT * FROM employee ORDER BY last_name");
+ Employee employee;
+ while (rs.next())
+ {
+ employee = new Employee();
+ employee.setEmployeeId(rs.getInt("employee_id"));
+ employee.setFirstName(rs.getString("first_name"));
+ employee.setLastName(rs.getString("last_name"));
+ employee.setTitle(rs.getString("title"));
+ employee.setEmail(rs.getString("email"));
+ employee.setPhone(rs.getString("phone"));
+ Company company = new Company();
+ company.setCompanyId(rs.getInt("company_id"));
+ employee.setCompany(company);
+ list.add(employee);
+ }
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e);
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ return list;
+ }
+
+ public List findEmployeesByCompany(Integer companyId) throws DAOException
+ {
+ List list = new ArrayList();
+ Connection c = null;
+ try
+ {
+ Company company = new Company();
+ company.setCompanyId(companyId.intValue());
+ c = ConnectionHelper.getConnection();
+ PreparedStatement ps = c.prepareStatement("SELECT * FROM employee WHERE company_id = ? ORDER BY last_name");
+ ps.setInt(1, companyId.intValue());
+ ResultSet rs = ps.executeQuery();
+ while (rs.next())
+ {
+ Employee employee = new Employee();
+ employee.setEmployeeId(rs.getInt("employee_id"));
+ employee.setFirstName(rs.getString("first_name"));
+ employee.setLastName(rs.getString("last_name"));
+ employee.setTitle(rs.getString("title"));
+ employee.setEmail(rs.getString("email"));
+ employee.setPhone(rs.getString("phone"));
+ employee.setCompany(company);
+ list.add(employee);
+ }
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e);
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ return list;
+ }
+
+ public List findEmployeesByName(String name) throws DAOException
+ {
+ List list = new ArrayList();
+ Connection c = null;
+
+ try
+ {
+ c = ConnectionHelper.getConnection();
+ PreparedStatement ps = c.prepareStatement("SELECT * FROM employee WHERE first_name LIKE ? OR last_name LIKE ? ORDER BY last_name");
+ ps.setString(1, "%" + name + "%");
+ ps.setString(2, "%" + name + "%");
+ ResultSet rs = ps.executeQuery();
+
+ Employee employee;
+ while (rs.next())
+ {
+ employee = new Employee();
+ employee.setEmployeeId(rs.getInt("employee_id"));
+ employee.setFirstName(rs.getString("first_name"));
+ employee.setLastName(rs.getString("last_name"));
+ employee.setTitle(rs.getString("title"));
+ employee.setEmail(rs.getString("email"));
+ employee.setPhone(rs.getString("phone"));
+ Company company = new Company();
+ company.setCompanyId(rs.getInt("company_id"));
+
+ list.add(employee);
+ }
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e);
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ return list;
+ }
+
+ public Employee getEmployee(int employeeId) throws DAOException
+ {
+ Employee employee = null;
+ Connection c = null;
+
+ try
+ {
+ c = ConnectionHelper.getConnection();
+ PreparedStatement ps = c.prepareStatement("SELECT * FROM employee WHERE employee_id= ?");
+ ps.setInt(1, employeeId);
+ ResultSet rs = ps.executeQuery();
+
+ if (rs.next())
+ {
+ employee = new Employee();
+ employee.setEmployeeId(rs.getInt("employee_id"));
+ employee.setFirstName(rs.getString("first_name"));
+ employee.setLastName(rs.getString("last_name"));
+ employee.setTitle(rs.getString("title"));
+ employee.setEmail(rs.getString("email"));
+ employee.setPhone(rs.getString("phone"));
+ }
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e.getMessage());
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ return employee;
+ }
+
+ public Employee createEmployee(Employee employee) throws DAOException
+ {
+ Connection c = null;
+ PreparedStatement ps = null;
+ try
+ {
+ c = ConnectionHelper.getConnection();
+ ps = c.prepareStatement("INSERT INTO employee (first_name, last_name, title, email, phone, company_id) VALUES (?, ?, ?, ?, ?, ?)");
+ ps.setString(1, employee.getFirstName());
+ ps.setString(2, employee.getLastName());
+ ps.setString(3, employee.getTitle());
+ ps.setString(4, employee.getEmail());
+ ps.setString(5, employee.getPhone());
+ if (employee.getCompany() != null)
+ ps.setInt(6, employee.getCompany().getCompanyId());
+ else
+ ps.setNull(6, Types.INTEGER);
+ ps.execute();
+ ps.close();
+ Statement s = c.createStatement();
+ // HSQLDB Syntax to get the identity (employee_id) of inserted row
+ ResultSet rs = s.executeQuery("CALL IDENTITY()");
+ rs.next();
+ // Update the id in the returned object. This is important as this
+ // value must get returned to the client.
+ employee.setEmployeeId(rs.getInt(1));
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e);
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ return employee;
+ }
+
+
+ public void updateEmployee(Employee newVersion, Employee previousVersion, List changes) throws DAOException, ConcurrencyException
+ {
+ Connection c = null;
+ try
+ {
+ c = ConnectionHelper.getConnection();
+ PreparedStatement ps = c.prepareStatement("UPDATE employee SET first_name=?, last_name=?, title=?, email=?, phone=?, company_id=? WHERE employee_id=? AND first_name=? AND last_name=? AND title=? AND email=? AND phone=? AND company_id=?");
+ ps.setString(1, newVersion.getFirstName());
+ ps.setString(2, newVersion.getLastName());
+ ps.setString(3, newVersion.getTitle());
+ ps.setString(4, newVersion.getEmail());
+ ps.setString(5, newVersion.getPhone());
+ if (newVersion.getCompany() != null)
+ ps.setInt(6, newVersion.getCompany().getCompanyId());
+ else
+ ps.setNull(6,Types.INTEGER);
+ ps.setInt(7, newVersion.getEmployeeId());
+ ps.setString(8, previousVersion.getFirstName());
+ ps.setString(9, previousVersion.getLastName());
+ ps.setString(10, previousVersion.getTitle());
+ ps.setString(11, previousVersion.getEmail());
+ ps.setString(12, previousVersion.getPhone());
+ if (previousVersion.getCompany() != null)
+ ps.setInt(13, previousVersion.getCompany().getCompanyId());
+ else
+ ps.setNull(13, Types.INTEGER);
+ if (ps.executeUpdate() == 0)
+ {
+ throw new ConcurrencyException("Item not found");
+ }
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e.getMessage());
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ }
+
+ public void deleteEmployee(Employee employee) throws DAOException, ConcurrencyException
+ {
+ Connection c = null;
+ try
+ {
+ c = ConnectionHelper.getConnection();
+ PreparedStatement ps = c.prepareStatement("DELETE FROM employee WHERE employee_id=? AND first_name=? AND last_name=? AND title=? AND email=? AND phone=? AND company_id=?");
+ ps.setInt(1, employee.getEmployeeId());
+ ps.setString(2, employee.getFirstName());
+ ps.setString(3, employee.getLastName());
+ ps.setString(4, employee.getTitle());
+ ps.setString(5, employee.getEmail());
+ ps.setString(6, employee.getPhone());
+ if (employee.getCompany() != null)
+ ps.setInt(7, employee.getCompany().getCompanyId());
+ else
+ ps.setNull(7, Types.INTEGER);
+ if (ps.executeUpdate() == 0)
+ {
+ throw new ConcurrencyException("Item not found");
+ }
+ }
+ catch (SQLException e)
+ {
+ e.printStackTrace();
+ throw new DAOException(e.getMessage());
+ }
+ finally
+ {
+ ConnectionHelper.close(c);
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples/WEB-INF/src/flex/samples/dcd/product/Product.java
----------------------------------------------------------------------
diff --git a/attic/apps/samples/WEB-INF/src/flex/samples/dcd/product/Product.java b/attic/apps/samples/WEB-INF/src/flex/samples/dcd/product/Product.java
new file mode 100755
index 0000000..be6d992
--- /dev/null
+++ b/attic/apps/samples/WEB-INF/src/flex/samples/dcd/product/Product.java
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ */
+package flex.samples.dcd.product;
+import java.io.Serializable;
+
+public class Product implements Serializable {
+
+ static final long serialVersionUID = 103844514947365244L;
+
+ private int productId;
+ private String name;
+ private String description;
+ private String image;
+ private String category;
+ private double price;
+ private int qtyInStock;
+
+ public Product() {
+
+ }
+
+ public Product(int productId, String name, String description, String image, String category, double price, int qtyInStock) {
+ this.productId = productId;
+ this.name = name;
+ this.description = description;
+ this.image = image;
+ this.category = category;
+ this.price = price;
+ this.qtyInStock = qtyInStock;
+ }
+
+ public String getCategory() {
+ return category;
+ }
+ public void setCategory(String category) {
+ this.category = category;
+ }
+ public String getDescription() {
+ return description;
+ }
+ public void setDescription(String description) {
+ this.description = description;
+ }
+ public String getImage() {
+ return image;
+ }
+ public void setImage(String image) {
+ this.image = image;
+ }
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public double getPrice() {
+ return price;
+ }
+ public void setPrice(double price) {
+ this.price = price;
+ }
+ public int getProductId() {
+ return productId;
+ }
+ public void setProductId(int productId) {
+ this.productId = productId;
+ }
+ public int getQtyInStock() {
+ return qtyInStock;
+ }
+ public void setQtyInStock(int qtyInStock) {
+ this.qtyInStock = qtyInStock;
+ }
+
+}
\ No newline at end of file
[13/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/Contact.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/Contact.as b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/Contact.as
new file mode 100755
index 0000000..8c8a4f8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/Contact.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ [Bindable]
+ [RemoteClass(alias="org.springframework.flex.samples.contact.Contact")]
+ public class Contact
+ {
+ public var id:int;
+ public var firstName:String;
+ public var lastName:String;
+ public var email:String;
+ public var phone:String;
+ public var address:String;
+ public var city:String;
+ public var state:String;
+ public var zip:String;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/ContactForm.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/ContactForm.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/ContactForm.mxml
new file mode 100755
index 0000000..1f6311c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/ContactForm.mxml
@@ -0,0 +1,112 @@
+<?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:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.rpc.events.FaultEvent;
+ import mx.rpc.events.ResultEvent;
+ import mx.controls.Alert;
+
+ [Bindable] public var contact:Contact;
+
+ private function save():void
+ {
+ contact.firstName = firstName.text;
+ contact.lastName = lastName.text;
+ contact.email = email.text;
+ contact.phone = phone.text;
+ contact.address = address.text;
+ contact.city = city.text;
+ contact.state = state.text;
+ contact.zip = zip.text;
+ ro.update(contact);
+ }
+
+ private function update_resultHandler(event:ResultEvent):void
+ {
+ Alert.show("Contact " + contact.id + " updated successfully");
+ }
+
+ private function deleteItem():void
+ {
+ ro.remove(contact);
+ }
+
+ private function remove_resultHandler(event:ResultEvent):void
+ {
+ contact = null;
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <mx:method name="update" result="update_resultHandler(event)"/>
+ <mx:method name="remove" result="remove_resultHandler(event)"/>
+ </mx:RemoteObject>
+ </fx:Declarations>
+
+ <mx:Form>
+ <mx:FormItem label="Id">
+ <mx:TextInput text="{contact.id}" enabled="false"/>
+ </mx:FormItem>
+ <mx:FormItem label="First Name">
+ <mx:TextInput id="firstName" text="{contact.firstName}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Last Name">
+ <mx:TextInput id="lastName" text="{contact.lastName}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Email">
+ <mx:TextInput id="email" text="{contact.email}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Phone">
+ <mx:TextInput id="phone" text="{contact.phone}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Address">
+ <mx:TextInput id="address" text="{contact.address}"/>
+ </mx:FormItem>
+ <mx:FormItem label="City">
+ <mx:TextInput id="city" text="{contact.city}"/>
+ </mx:FormItem>
+ <mx:FormItem label="State">
+ <mx:TextInput id="state" text="{contact.state}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Zip">
+ <mx:TextInput id="zip" text="{contact.zip}"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ <s:HGroup left="8" bottom="8">
+ <s:Button label="Save" click="save()" enabled="{contact != null}"/>
+ <s:Button label="Delete" click="deleteItem()" enabled="{contact != null}"/>
+ </s:HGroup>
+
+</mx:Canvas>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/insync03.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/insync03.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/insync03.mxml
new file mode 100755
index 0000000..db4e6ea
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync03/src/insync03.mxml
@@ -0,0 +1,71 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+ import mx.controls.Alert;
+ import mx.rpc.events.FaultEvent;
+ import mx.rpc.events.ResultEvent;
+
+ [Bindable] private var contacts:ArrayCollection;
+
+ private function resultHandler(event:ResultEvent):void
+ {
+ contacts = event.result as ArrayCollection
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <s:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <s:method name="findByName" result="resultHandler(event)"/>
+ </s:RemoteObject>
+ </fx:Declarations>
+
+ <s:controlBarContent>
+ <s:TextInput id="searchStr"/>
+ <s:Button label="Search" click="ro.findByName(searchStr.text)"/>
+ </s:controlBarContent>
+
+ <mx:HDividedBox top="8" left="8" right="8" bottom="8">
+
+ <mx:DataGrid id="dg" dataProvider="{contacts}" width="30%" height="100%">
+ <mx:columns>
+ <mx:DataGridColumn dataField="firstName" headerText="First Name"/>
+ <mx:DataGridColumn dataField="lastName" headerText="Last Name"/>
+ </mx:columns>
+ </mx:DataGrid>
+
+ <local:ContactForm contact="{dg.selectedItem as Contact}" width="70%" height="100%"/>
+
+ </mx:HDividedBox>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.actionScriptProperties
new file mode 100755
index 0000000..4270cac
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="insync04.mxml" projectUUID="c091ffc5-d356-4296-9974-5dcd4d2c8d67" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="insync04.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.project b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.project
new file mode 100755
index 0000000..0444af0
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>insync04</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/build.xml
new file mode 100755
index 0000000..63fca10
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="insync04" />
+ <property name="application.file" value="insync04" />
+ <property name="application.bin.dir" value="${samples-spring.war}/insync04" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync04/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[12/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/Contact.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/Contact.as b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/Contact.as
new file mode 100755
index 0000000..8c8a4f8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/Contact.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ [Bindable]
+ [RemoteClass(alias="org.springframework.flex.samples.contact.Contact")]
+ public class Contact
+ {
+ public var id:int;
+ public var firstName:String;
+ public var lastName:String;
+ public var email:String;
+ public var phone:String;
+ public var address:String;
+ public var city:String;
+ public var state:String;
+ public var zip:String;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/ContactForm.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/ContactForm.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/ContactForm.mxml
new file mode 100755
index 0000000..6f36a3a
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/ContactForm.mxml
@@ -0,0 +1,120 @@
+<?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:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
+ label="{contact.firstName+' '+contact.lastName}">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.rpc.events.FaultEvent;
+ import mx.rpc.events.ResultEvent;
+ import mx.controls.Alert;
+
+ [Bindable] public var contact:Contact;
+
+ private function save():void
+ {
+ contact.firstName = firstName.text;
+ contact.lastName = lastName.text;
+ contact.email = email.text;
+ contact.phone = phone.text;
+ contact.address = address.text;
+ contact.city = city.text;
+ contact.state = state.text;
+ contact.zip = zip.text;
+ ro.update(contact);
+ }
+
+ private function update_resultHandler(event:ResultEvent):void
+ {
+ Alert.show("Contact " + contact.id + " updated successfully");
+ }
+
+ private function deleteItem():void
+ {
+ ro.remove(contact);
+ closeItem();
+ }
+
+ private function closeItem():void
+ {
+ parent.removeChild(this);
+ }
+
+ private function remove_resultHandler(event:ResultEvent):void
+ {
+ contact = null;
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <mx:method name="update" result="update_resultHandler(event)"/>
+ <mx:method name="remove" result="remove_resultHandler(event)"/>
+ </mx:RemoteObject>
+ </fx:Declarations>
+
+ <mx:Form>
+ <mx:FormItem label="Id">
+ <mx:TextInput text="{contact.id}" enabled="false"/>
+ </mx:FormItem>
+ <mx:FormItem label="First Name">
+ <mx:TextInput id="firstName" text="{contact.firstName}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Last Name">
+ <mx:TextInput id="lastName" text="{contact.lastName}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Email">
+ <mx:TextInput id="email" text="{contact.email}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Phone">
+ <mx:TextInput id="phone" text="{contact.phone}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Address">
+ <mx:TextInput id="address" text="{contact.address}"/>
+ </mx:FormItem>
+ <mx:FormItem label="City">
+ <mx:TextInput id="city" text="{contact.city}"/>
+ </mx:FormItem>
+ <mx:FormItem label="State">
+ <mx:TextInput id="state" text="{contact.state}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Zip">
+ <mx:TextInput id="zip" text="{contact.zip}"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ <s:HGroup left="8" bottom="8">
+ <s:Button label="Close" click="closeItem()"/>
+ <s:Button label="Save" click="save()"/>
+ <s:Button label="Delete" click="deleteItem()"/>
+ </s:HGroup>
+
+</mx:Canvas>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/insync04.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/insync04.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/insync04.mxml
new file mode 100755
index 0000000..484d156
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync04/src/insync04.mxml
@@ -0,0 +1,88 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+ import mx.controls.Alert;
+ import mx.rpc.events.FaultEvent;
+ import mx.rpc.events.ResultEvent;
+
+ [Bindable] private var contacts:ArrayCollection;
+
+ private function resultHandler(event:ResultEvent):void
+ {
+ contacts = event.result as ArrayCollection
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+ public function openContact(contact:Contact):void
+ {
+ var children:Array = tn.getChildren();
+ for (var i:int = 0; i<children.length; i++)
+ {
+ if (ContactForm(children[i]).contact.id == contact.id)
+ {
+ tn.selectedChild = children[i];
+ return;
+ }
+ }
+
+ var form:ContactForm = new ContactForm();
+ tn.addChild(form);
+ form.contact = contact;
+ tn.selectedChild = form;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <s:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <s:method name="findByName" result="resultHandler(event)"/>
+ </s:RemoteObject>
+ </fx:Declarations>
+
+ <s:controlBarContent>
+ <s:TextInput id="searchStr"/>
+ <s:Button label="Search" click="ro.findByName(searchStr.text)"/>
+ </s:controlBarContent>
+
+ <mx:HDividedBox top="8" left="8" right="8" bottom="8">
+ <mx:DataGrid id="dg" dataProvider="{contacts}" width="30%" height="100%"
+ doubleClickEnabled="{dg.selectedItem != null}"
+ doubleClick="openContact(dg.selectedItem as Contact)">
+ <mx:columns>
+ <mx:DataGridColumn dataField="firstName" headerText="First Name"/>
+ <mx:DataGridColumn dataField="lastName" headerText="Last Name"/>
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:TabNavigator id="tn" width="70%" height="100%"/>
+ </mx:HDividedBox>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.actionScriptProperties
new file mode 100755
index 0000000..a1e17b7
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="insync05.mxml" projectUUID="af628f17-d14e-4d43-8da0-9c2b08773a27" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="insync05.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.project b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.project
new file mode 100755
index 0000000..bf6a782
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>insync05</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/build.xml
new file mode 100755
index 0000000..8bd5361
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="insync05" />
+ <property name="application.file" value="insync05" />
+ <property name="application.bin.dir" value="${samples-spring.war}/insync05" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync05/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[08/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/src/Main.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/src/Main.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/src/Main.mxml
new file mode 100755
index 0000000..6627420
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-101/src/Main.mxml
@@ -0,0 +1,39 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+ <!-- "productService" is defined in Spring's configuration file WEB-INF/config/web-application-config.xml
+ and provides remote access to the org.springframework.flex.samples.product.ProductDAO class -->
+ <s:RemoteObject id="ro" destination="productService" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}"/>
+ </fx:Declarations>
+
+ <s:layout>
+ <s:VerticalLayout/>
+ </s:layout>
+
+ <mx:DataGrid dataProvider="{ro.findAll.lastResult}" width="100%" height="100%"/>
+
+ <!-- the findAll() method is defined in org.springframework.flex.samples.product.ProductDAO -->
+ <s:Button label="Get Data" click="ro.findAll()"/>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.actionScriptProperties
new file mode 100755
index 0000000..5738c14
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="Main.mxml" projectUUID="a11f3dd4-3678-494b-b759-bb8260c1c8bb" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="Main.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.project b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.project
new file mode 100755
index 0000000..ac47b7b
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>spring-blazeds-security-101</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/build.xml
new file mode 100755
index 0000000..2cf6145
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="spring-blazeds-security-101" />
+ <property name="application.file" value="Main" />
+ <property name="application.bin.dir" value="${samples-spring.war}/spring-blazeds-security-101" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/spring-blazeds-security-101/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/spring-blazeds-security-101/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[16/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/build.xml
new file mode 100755
index 0000000..ec16155
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="feedstarter" />
+ <property name="application.file" value="feedstarter" />
+ <property name="application.bin.dir" value="${samples-spring.war}/feedstarter" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/feedstarter/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/src/feedstarter.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/src/feedstarter.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/src/feedstarter.mxml
new file mode 100755
index 0000000..a5d3167
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/feedstarter/src/feedstarter.mxml
@@ -0,0 +1,53 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <fx:Declarations>
+
+ <mx:ChannelSet id="cs">
+ <mx:AMFChannel uri="/samples-spring/messagebroker/amf"/>
+ </mx:ChannelSet>
+
+ <mx:RemoteObject id="simpleFeedStarter" destination="simpleFeedStarter" channelSet="{cs}"/>
+ <mx:RemoteObject id="marketFeedStarter" destination="marketFeedStarter" channelSet="{cs}"/>
+
+ </fx:Declarations>
+
+ <s:layout>
+ <s:VerticalLayout paddingTop="20" paddingLeft="20" gap="20"/>
+ </s:layout>
+
+ <s:Label text="Feed Administration" fontSize="18" fontWeight="bold"/>
+
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Simple Feed" width="120"/>
+ <s:Button label="Start" click="simpleFeedStarter.start()"/>
+ <s:Button label="Stop" click="simpleFeedStarter.stop()"/>
+ </s:HGroup>
+
+ <s:HGroup verticalAlign="middle">
+ <s:Label text="Market Feed" width="120"/>
+ <s:Button label="Start" click="marketFeedStarter.start()"/>
+ <s:Button label="Stop" click="marketFeedStarter.stop()"/>
+ </s:HGroup>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.actionScriptProperties
new file mode 100755
index 0000000..1938833
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="insync01.mxml" projectUUID="f3f5b870-6817-40ea-a5e2-dce3eb832d79" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="insync01.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.project b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.project
new file mode 100755
index 0000000..95bbfaa
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>insync01</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync01/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync01/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/build.xml
new file mode 100755
index 0000000..fff6571
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="insync01" />
+ <property name="application.file" value="insync01" />
+ <property name="application.bin.dir" value="${samples-spring.war}/insync01" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync01/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[47/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/classes/commons-logging.properties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/classes/commons-logging.properties b/apps/samples-spring/WEB-INF/classes/commons-logging.properties
deleted file mode 100755
index 46c3be4..0000000
--- a/apps/samples-spring/WEB-INF/classes/commons-logging.properties
+++ /dev/null
@@ -1,19 +0,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.
-
-# suppress logging for 3rd-party libraries using commons-logging
-# Flex logging is not configured here. It is configured through in the logging section of flex-config.xml
-org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
-org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-servlet.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-servlet.xml b/apps/samples-spring/WEB-INF/flex-servlet.xml
deleted file mode 100755
index 158453b..0000000
--- a/apps/samples-spring/WEB-INF/flex-servlet.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:flex="http://www.springframework.org/schema/flex"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
- http://www.springframework.org/schema/flex
- http://www.springframework.org/schema/flex/spring-flex-1.5.xsd">
-
- <flex:message-broker>
- <flex:message-service
- default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" />
- <flex:secured />
- </flex:message-broker>
-
- <!-- Expose the productService bean for BlazeDS remoting -->
- <flex:remoting-destination ref="productService" />
-
- <!-- Expose the contactService bean for BlazeDS remoting -->
- <flex:remoting-destination ref="contactService" />
-
- <!-- Expose the securedProductService bean for BlazeDS remoting -->
- <flex:remoting-destination ref="securedProductService" />
-
- <!-- Helper for getting the currently authenticated user -->
- <bean id="securityHelper" class="org.springframework.flex.samples.secured.Security3Helper">
- <flex:remoting-destination/>
- </bean>
-
- <!-- Messaging destinations -->
- <flex:message-destination id="chat" />
- <flex:message-destination id="simple-feed" />
- <flex:message-destination id="market-feed" allow-subtopics="true" subtopic-separator="." />
-
- <!-- MessageTemplate makes it easy to publish messages -->
- <bean id="defaultMessageTemplate" class="org.springframework.flex.messaging.MessageTemplate" />
-
- <!-- Pojo used to start and stop the data feed that pushes data in the 'simple-feed' destination -->
- <bean id="simpleFeedStarter" class="org.springframework.flex.samples.simplefeed.SimpleFeed">
- <constructor-arg ref="defaultMessageTemplate" />
- <flex:remoting-destination />
- </bean>
-
- <!-- Pojo used to start and stop the data feed that pushes data in the 'market-feed' destination -->
- <bean id="marketFeedStarter" class="org.springframework.flex.samples.marketfeed.MarketFeed">
- <constructor-arg ref="defaultMessageTemplate" />
- <constructor-arg value="stocklist.xml" />
- <flex:remoting-destination />
- </bean>
-
-</beans>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties
deleted file mode 100755
index b5390a8..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/chat/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="chat.mxml" projectUUID="46e6c4ea-bda5-466a-9d9a-a020928ae0f8" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="chat.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/chat/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/chat/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/.project b/apps/samples-spring/WEB-INF/flex-src/chat/.project
deleted file mode 100755
index 0cb0ea0..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/chat/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>chat</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/chat/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/build.xml b/apps/samples-spring/WEB-INF/flex-src/chat/build.xml
deleted file mode 100755
index e5ee6d4..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/chat/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="chat" />
- <property name="application.file" value="chat" />
- <property name="application.bin.dir" value="${samples-spring.war}/chat" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/chat/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/chat/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/chat/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/chat/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/chat/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/chat/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/chat/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/chat/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/chat/src/chat.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/chat/src/chat.mxml b/apps/samples-spring/WEB-INF/flex-src/chat/src/chat.mxml
deleted file mode 100755
index 538851f..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/chat/src/chat.mxml
+++ /dev/null
@@ -1,86 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx"
- applicationComplete="init()">
-
-
- <fx:Script>
- <![CDATA[
-
- import mx.messaging.messages.AsyncMessage;
- import mx.messaging.messages.IMessage;
-
- private function init():void
- {
- consumer.subscribe();
- }
-
- private function send():void
- {
- var message:IMessage = new AsyncMessage();
- message.body.userId = userId.text;
- message.body.chatMessage = msg.text;
- producer.send(message);
- msg.text = "";
- }
-
- private function messageHandler(message:IMessage):void
- {
- log.text += message.body.userId + ": " + message.body.chatMessage + "\n";
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <!-- The ChannelSet API allows you to dynamically define your endpoints *at runtime*. In the example below,
- we hardcode the endpoint URLs. In real life, the client application would typically load these parameters
- dynamically. For example, the client application could read these parameters from an XML file loaded using
- the HTTPService at startup. The first channel added to the channelSet, is the first channel that the system
- will use to try to communicate with the server. If the first channel fails, the system will try to communicate
- with the second channel defined in the channelSet. -->
- <mx:ChannelSet id="cs">
- <mx:StreamingAMFChannel uri="/samples-spring/messagebroker/streamingamf"/>
- <mx:AMFChannel uri="/samples-spring/messagebroker/amflongpolling"/>
- <mx:AMFChannel uri="/samples-spring/messagebroker/amfpolling"/>
- </mx:ChannelSet>
-
- <mx:Producer id="producer" destination="chat" channelSet="{cs}"/>
- <mx:Consumer id="consumer" destination="chat" channelSet="{cs}" message="messageHandler(event.message)"/>
- </fx:Declarations>
-
- <s:Panel title="Chat" top="12" bottom="12" left="12" right="12">
- <s:TextArea id="log" width="100%" height="100%" borderVisible="false"/>
- <s:controlBarContent>
- <mx:Form width="100%" paddingTop="4" paddingBottom="4" paddingLeft="4" paddingRight="4">
- <mx:FormItem label="User Id:">
- <s:TextInput id="userId" width="100" enter="send()"/>
- </mx:FormItem>
- <mx:FormItem label="Message:" width="100%" direction="horizontal">
- <s:TextInput id="msg" width="100%" enter="send()"/>
- <s:Button label="Send" click="send()"/>
- </mx:FormItem>
- </mx:Form>
- </s:controlBarContent>
- </s:Panel>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/collaboration/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/collaboration/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/collaboration/.actionScriptProperties
deleted file mode 100755
index 34a7b09..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/collaboration/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="collaboration.mxml" projectUUID="494f5a5c-03a0-4a1a-b85b-78075a2c515a" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="collaboration.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
[39/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/src/Contact.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/src/Contact.as b/apps/samples-spring/WEB-INF/flex-src/insync05/src/Contact.as
deleted file mode 100755
index ffa1f02..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/src/Contact.as
+++ /dev/null
@@ -1,35 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- [Bindable]
- [RemoteClass(alias="org.springframework.flex.samples.contact.Contact")]
- public class Contact
- {
- public var id:int = -1;
- public var firstName:String;
- public var lastName:String;
- public var email:String;
- public var phone:String;
- public var address:String;
- public var city:String;
- public var state:String;
- public var zip:String;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/src/ContactForm.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/src/ContactForm.mxml b/apps/samples-spring/WEB-INF/flex-src/insync05/src/ContactForm.mxml
deleted file mode 100755
index ee0fe5b..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/src/ContactForm.mxml
+++ /dev/null
@@ -1,133 +0,0 @@
-<?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:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
- label="{contact.id>-1?contact.firstName+' '+contact.lastName:'New Contact'}">
-
- <fx:Script>
- <![CDATA[
-
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
- import mx.controls.Alert;
-
- [Bindable] public var contact:Contact;
-
- private function save():void
- {
- contact.firstName = firstName.text;
- contact.lastName = lastName.text;
- contact.email = email.text;
- contact.phone = phone.text;
- contact.address = address.text;
- contact.city = city.text;
- contact.state = state.text;
- contact.zip = zip.text;
- if (contact.id == -1)
- {
- ro.create(contact);
- }
- else
- {
- ro.update(contact);
- }
- }
-
- private function create_resultHandler(event:ResultEvent):void
- {
- contact.id = event.result.id;
- }
-
- private function update_resultHandler(event:ResultEvent):void
- {
- // no specific action for now
- }
-
- private function deleteItem():void
- {
- ro.remove(contact);
- closeItem();
- }
-
- private function closeItem():void
- {
- parent.removeChild(this);
- }
-
- private function remove_resultHandler(event:ResultEvent):void
- {
- contact = null;
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <mx:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <mx:method name="create" result="create_resultHandler(event)"/>
- <mx:method name="update" result="update_resultHandler(event)"/>
- <mx:method name="remove" result="remove_resultHandler(event)"/>
- </mx:RemoteObject>
- </fx:Declarations>
-
- <mx:Form>
- <mx:FormItem label="Id">
- <mx:TextInput text="{contact.id}" enabled="false"/>
- </mx:FormItem>
- <mx:FormItem label="First Name">
- <mx:TextInput id="firstName" text="{contact.firstName}"/>
- </mx:FormItem>
- <mx:FormItem label="Last Name">
- <mx:TextInput id="lastName" text="{contact.lastName}"/>
- </mx:FormItem>
- <mx:FormItem label="Email">
- <mx:TextInput id="email" text="{contact.email}"/>
- </mx:FormItem>
- <mx:FormItem label="Phone">
- <mx:TextInput id="phone" text="{contact.phone}"/>
- </mx:FormItem>
- <mx:FormItem label="Address">
- <mx:TextInput id="address" text="{contact.address}"/>
- </mx:FormItem>
- <mx:FormItem label="City">
- <mx:TextInput id="city" text="{contact.city}"/>
- </mx:FormItem>
- <mx:FormItem label="State">
- <mx:TextInput id="state" text="{contact.state}"/>
- </mx:FormItem>
- <mx:FormItem label="Zip">
- <mx:TextInput id="zip" text="{contact.zip}"/>
- </mx:FormItem>
- </mx:Form>
-
- <s:HGroup left="8" bottom="8">
- <s:Button label="Close" click="closeItem()"/>
- <s:Button label="Save" click="save()"/>
- <s:Button label="Delete" click="deleteItem()"/>
- </s:HGroup>
-
-</mx:Canvas>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync05/src/insync05.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync05/src/insync05.mxml b/apps/samples-spring/WEB-INF/flex-src/insync05/src/insync05.mxml
deleted file mode 100755
index 4450358..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync05/src/insync05.mxml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?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.
-
--->
-<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*">
-
- <fx:Script>
- <![CDATA[
-
- import mx.collections.ArrayCollection;
- import mx.controls.Alert;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- [Bindable] private var contacts:ArrayCollection;
-
- private function resultHandler(event:ResultEvent):void
- {
- contacts = event.result as ArrayCollection
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
- public function openContact(contact:Contact):void
- {
- var children:Array = tn.getChildren();
- for (var i:int = 0; i<children.length; i++)
- {
- if (ContactForm(children[i]).contact.id == contact.id)
- {
- tn.selectedChild = children[i];
- return;
- }
- }
-
- var form:ContactForm = new ContactForm();
- tn.addChild(form);
- form.contact = contact;
- tn.selectedChild = form;
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <s:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <s:method name="findByName" result="resultHandler(event)"/>
- </s:RemoteObject>
- </fx:Declarations>
-
- <s:controlBarContent>
- <s:TextInput id="searchStr"/>
- <s:Button label="Search" click="ro.findByName(searchStr.text)"/>
- <mx:Button label="New Contact" click="openContact(new Contact())"/>
- </s:controlBarContent>
-
- <mx:HDividedBox top="8" left="8" right="8" bottom="8">
- <mx:DataGrid id="dg" dataProvider="{contacts}" width="30%" height="100%"
- doubleClickEnabled="{dg.selectedItem != null}"
- doubleClick="openContact(dg.selectedItem as Contact)">
- <mx:columns>
- <mx:DataGridColumn dataField="firstName" headerText="First Name"/>
- <mx:DataGridColumn dataField="lastName" headerText="Last Name"/>
- </mx:columns>
- </mx:DataGrid>
- <mx:TabNavigator id="tn" width="70%" height="100%"/>
- </mx:HDividedBox>
-
-</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/.actionScriptProperties b/apps/samples-spring/WEB-INF/flex-src/insync06/.actionScriptProperties
deleted file mode 100755
index bdabdba..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/.actionScriptProperties
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<actionScriptProperties mainApplicationPath="insync06.mxml" projectUUID="cef66dd7-3cb6-46e2-976f-96991d0b8b89" version="6">
- <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
- <compilerSourcePath/>
- <libraryPath defaultLinkType="0">
- <libraryPathEntry kind="4" path="">
- <excludedEntries>
- <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
- </excludedEntries>
- </libraryPathEntry>
- <libraryPathEntry kind="1" linkType="1" path="libs"/>
- </libraryPath>
- <sourceAttachmentPath/>
- </compiler>
- <applications>
- <application path="insync06.mxml"/>
- </applications>
- <modules/>
- <buildCSSFiles/>
-</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/.flexProperties
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/.flexProperties b/apps/samples-spring/WEB-INF/flex-src/insync06/.flexProperties
deleted file mode 100755
index 1d99468..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/.flexProperties
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
- 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.
-
--->
-<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/.project
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/.project b/apps/samples-spring/WEB-INF/flex-src/insync06/.project
deleted file mode 100755
index c78b675..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/.project
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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.
-
--->
-<projectDescription>
- <name>insync06</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>com.adobe.flexbuilder.project.flexbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.adobe.flexbuilder.project.flexnature</nature>
- <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/build.xml b/apps/samples-spring/WEB-INF/flex-src/insync06/build.xml
deleted file mode 100755
index 2888084..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="insync06" />
- <property name="application.file" value="insync06" />
- <property name="application.bin.dir" value="${samples-spring.war}/insync06" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync06/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
[49/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds/WEB-INF/flex/services-config.xml b/apps/blazeds/WEB-INF/flex/services-config.xml
deleted file mode 100755
index 289fbfe..0000000
--- a/apps/blazeds/WEB-INF/flex/services-config.xml
+++ /dev/null
@@ -1,117 +0,0 @@
-<?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.
-
--->
-<services-config>
-
- <services>
- <service-include file-path="remoting-config.xml" />
- <service-include file-path="proxy-config.xml" />
- <service-include file-path="messaging-config.xml" />
- </services>
-
- <security>
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
- <!-- Uncomment the correct app server
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
- <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
- <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
- <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
- -->
-
- <!--
- <security-constraint id="basic-read-access">
- <auth-method>Basic</auth-method>
- <roles>
- <role>guests</role>
- <role>accountants</role>
- <role>employees</role>
- <role>managers</role>
- </roles>
- </security-constraint>
- -->
- </security>
-
- <channels>
-
- <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
- </channel-definition>
-
- <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
- <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
- <properties>
- <add-no-cache-headers>false</add-no-cache-headers>
- </properties>
- </channel-definition>
-
- <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>true</polling-enabled>
- <polling-interval-seconds>4</polling-interval-seconds>
- </properties>
- </channel-definition>
-
- <!--
- <channel-definition id="my-http" class="mx.messaging.channels.HTTPChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/http" class="flex.messaging.endpoints.HTTPEndpoint"/>
- </channel-definition>
-
- <channel-definition id="my-secure-http" class="mx.messaging.channels.SecureHTTPChannel">
- <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure" class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
- <properties>
- <add-no-cache-headers>false</add-no-cache-headers>
- </properties>
- </channel-definition>
- -->
- </channels>
-
- <logging>
- <target class="flex.messaging.log.ConsoleTarget" level="Error">
- <properties>
- <prefix>[BlazeDS] </prefix>
- <includeDate>false</includeDate>
- <includeTime>false</includeTime>
- <includeLevel>false</includeLevel>
- <includeCategory>false</includeCategory>
- </properties>
- <filters>
- <pattern>Endpoint.*</pattern>
- <pattern>Service.*</pattern>
- <pattern>Configuration</pattern>
- </filters>
- </target>
- </logging>
-
- <system>
- <redeploy>
- <enabled>false</enabled>
- <!--
- <watch-interval>20</watch-interval>
- <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
- <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
- <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
- -->
- </redeploy>
- </system>
-
-</services-config>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds/WEB-INF/web.xml b/apps/blazeds/WEB-INF/web.xml
deleted file mode 100755
index 9bf2f4a..0000000
--- a/apps/blazeds/WEB-INF/web.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-<?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.
-
--->
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-<web-app>
-
- <display-name>BlazeDS</display-name>
- <description>BlazeDS Application</description>
-
- <!-- Http Flex Session attribute and binding listener support -->
- <listener>
- <listener-class>flex.messaging.HttpFlexSession</listener-class>
- </listener>
-
- <!-- MessageBroker Servlet -->
- <servlet>
- <servlet-name>MessageBrokerServlet</servlet-name>
- <display-name>MessageBrokerServlet</display-name>
- <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
- <init-param>
- <param-name>services.configuration.file</param-name>
- <param-value>/WEB-INF/flex/services-config.xml</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
-<!-- begin rds
- <servlet>
- <servlet-name>RDSDispatchServlet</servlet-name>
- <display-name>RDSDispatchServlet</display-name>
- <servlet-class>flex.rds.server.servlet.FrontEndServlet</servlet-class>
- <init-param>
- <param-name>useAppserverSecurity</param-name>
- <param-value>true</param-value>
- </init-param>
- <load-on-startup>10</load-on-startup>
- </servlet>
-
- <servlet-mapping id="RDS_DISPATCH_MAPPING">
- <servlet-name>RDSDispatchServlet</servlet-name>
- <url-pattern>/CFIDE/main/ide.cfm</url-pattern>
- </servlet-mapping>
-end rds -->
-
- <servlet-mapping>
- <servlet-name>MessageBrokerServlet</servlet-name>
- <url-pattern>/messagebroker/*</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- <welcome-file>index.htm</welcome-file>
- </welcome-file-list>
-
- <!-- for WebSphere deployment, please uncomment -->
- <!--
- <resource-ref>
- <description>Flex Messaging WorkManager</description>
- <res-ref-name>wm/MessagingWorkManager</res-ref-name>
- <res-type>com.ibm.websphere.asynchbeans.WorkManager</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
- -->
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds/build.xml
----------------------------------------------------------------------
diff --git a/apps/blazeds/build.xml b/apps/blazeds/build.xml
deleted file mode 100755
index c47017f..0000000
--- a/apps/blazeds/build.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?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="blazeds.war/build.xml" default="main" basedir="../..">
-
- <property file="${basedir}/build.properties" />
- <property name="blazeds.war" value="${basedir}/apps/blazeds" />
- <property name="dist.dir" value="${basedir}/dist" />
- <property name="src.dir" value="${blazeds.war}/WEB-INF/src"/>
- <property name="classes.dir" value="${blazeds.war}/WEB-INF/classes"/>
-
- <path id="classpath">
- <fileset dir="${blazeds.war}/WEB-INF/lib" includes="**/*.jar" />
- </path>
-
- <target name="main" depends="clean,compile" />
-
- <target name="prepare">
- <mkdir dir="${blazeds.war}/WEB-INF/src" />
- <mkdir dir="${blazeds.war}/WEB-INF/lib" />
- <mkdir dir="${blazeds.war}/WEB-INF/classes" />
- </target>
-
- <target name="run-depend" if="src.depend">
- <echo message="Removing class files that changed and dependent class files." />
- <depend cache="${classes.dir}" srcdir="${src.dir}" destdir="${classes.dir}" />
- </target>
-
- <target name="copy-resources">
- <copy todir="${blazeds.war}/WEB-INF/lib">
- <fileset dir="${basedir}/lib" includes="${webapp.ce.lib}" />
- </copy>
- <copy todir="${classes.dir}">
- <fileset dir="${basedir}/lib" includes="${webapp.classes}" />
- </copy>
-
- <propertyfile file="${blazeds.war}/WEB-INF/flex/version.properties">
- <entry key="build" value="${manifest.Implementation-Version}.${build.number}"/>
- <entry key="minimumSDKVersion" value="${min.sdk.version}"/>
- </propertyfile>
-
- </target>
-
- <target name="compile" depends="prepare,run-depend,copy-resources" description="compile">
- <javac source="1.4" debug="${src.debug}" destdir="${classes.dir}" srcdir="${src.dir}" classpathref="classpath" />
- </target>
-
- <target name="package" description=" Creates distribution war file">
- <mkdir dir="${dist.dir}" />
- <war file="${dist.dir}/blazeds.war" webxml="${blazeds.war}/WEB-INF/web.xml">
- <manifest>
- <attribute name="Sealed" value="${manifest.sealed}" />
- <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - BlazeDS Application" />
- <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}" />
- <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}" />
- </manifest>
- <fileset dir="${blazeds.war}">
- <exclude name="build.xml" />
- <exclude name="WEB-INF/src/**/*.java" />
- <exclude name="WEB-INF/jsp/**/*" />
- <exclude name="WEB-INF/sessions/**/*" />
- <!-- This is included in the war task already -->
- <exclude name="WEB-INF/web.xml" />
- </fileset>
- </war>
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true">
- <fileset dir="${blazeds.war}/WEB-INF/lib" includes="${webapp.ce.lib},${old.jars.to.clean}" />
- </delete>
- <delete quiet="true">
- <fileset dir="${classes.dir}" includes="**/*.class"/>
- </delete>
- <delete quiet="true" file="${dist.dir}/blazeds.war" />
- <delete quiet="true" dir="${blazeds.war}/WEB-INF/lib" />
- <delete quiet="true" dir="${blazeds.war}/WEB-INF/src" />
- <delete quiet="true" file="${blazeds.war}/WEB-INF/flex/version.properties" />
- <echo>apps/blazeds clean</echo>
- </target>
-
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/blazeds/index.htm
----------------------------------------------------------------------
diff --git a/apps/blazeds/index.htm b/apps/blazeds/index.htm
deleted file mode 100755
index aeec257..0000000
--- a/apps/blazeds/index.htm
+++ /dev/null
@@ -1,50 +0,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.
--->
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Welcome to BlazeDS</title>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<style>
-body, pre { font-family:Tahoma,Helvetica,sans-serif; font-size:10pt; }
-div.indent { margin-left: 20;}
-span.reference { font-weight: bold }
-span.header {white-space:nowrap }
-span.title {font-size:12pt; color:blue}
-span.highlight { background-color: #FFFFB7 }
-table.code { font-family: courier; font-size: 9pt;}
-span.fade { color:#666666; font-size:11px }
-</style>
-</head>
-<body>
-<span class="title">Welcome to BlazeDS</span>
-<br>
- <br>
-This is an empty BlazeDS application that serves as a template for creating your custom application.
-<!--
-<br> <br>
-If you're looking for sample Flex applications, check with the system administrator for the URL where the samples are deployed.
--->
-<br>
- <br>
-Visit the <a href="http://opensource.adobe.com/wiki/display/blazeds/BlazeDS">product page</a> for documentation and further information.
-</body>
-</html>
-
-
-
-
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/ConsoleResultWindow.mxml
----------------------------------------------------------------------
diff --git a/apps/ds-console/ConsoleResultWindow.mxml b/apps/ds-console/ConsoleResultWindow.mxml
deleted file mode 100755
index 4a8eac2..0000000
--- a/apps/ds-console/ConsoleResultWindow.mxml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" title="Results" width="200" height="200" showCloseButton="true" close="close()" borderStyle="solid">
- <mx:Script>
- <![CDATA[
-
- import mx.managers.*;
-
- public function showResult(result:Object):void
- {
- resultMessage.text = result.toString();
- }
-
- public function showSuccess():void
- {
- resultMessage.text = "Operation executed";
- }
-
- private function close():void
- {
- PopUpManager.removePopUp(this);
- }
-
- ]]>
- </mx:Script>
- <mx:Spacer height="20%"/>
- <mx:VBox height="80%">
- <mx:Label id="resultMessage" />
- </mx:VBox>
-
-</mx:TitleWindow>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/apps/ds-console/WEB-INF/flex/services-config.xml b/apps/ds-console/WEB-INF/flex/services-config.xml
deleted file mode 100755
index 9283f8c..0000000
--- a/apps/ds-console/WEB-INF/flex/services-config.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?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.
-
--->
-<services-config>
-
- <services>
- <!--
- REMOTING SERVICE
- -->
- <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>
-
- <!-- Runtime management console destination -->
- <destination id="RuntimeManagement" channels="amf">
- <properties>
- <source>flex.management.jmx.MBeanServerGateway</source>
- </properties>
-
- <!--
- If running the console on WebSphere with administrative security enabled uncomment this section. Also,
- create a User Group called "console_administrator" and add any users that are allowed to use the console to this group.
- These users must also have at least one role that allows them to access MBeans under WebSphere security. Finally,
- be sure to use the WebSphere login-command below.
- <security>
- <security-constraint ref="console"/>
- </security>
- -->
- </destination>
-
- </service>
-
- </services>
-
-
- <security>
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
- <!-- Uncomment the correct app server
- <login-command class="flex.messaging.security.TomcatLoginCommand" server="JBoss"/>
- <login-command class="flex.messaging.security.JRunLoginCommand" server="JRun"/>
- <login-command class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
- <login-command class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
- -->
-
- <!--
- If running the console on WebSphere with administrative security enabled uncomment this section. Also,
- create a User Group called "console_administrator" and add any users that are allowed to use the console to this group.
- These users must also have at least one role that allows them to access MBeans under WebSphere security. Finally,
- be sure to use the WebSphere login-command above.
- <security-constraint id="console">
- <auth-method>Basic</auth-method>
- <roles>
- <role>console_administrator</role>
- </roles>
- </security-constraint>
- -->
- </security>
-
-
- <channels>
-
- <channel-definition id="amf" class="mx.messaging.channels.AMFChannel">
- <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
- <properties>
- <polling-enabled>false</polling-enabled>
- </properties>
- </channel-definition>
-
- </channels>
-
- <logging>
-
- <!-- You may also use flex.messaging.log.ServletLogTarget -->
- <target class="flex.messaging.log.ConsoleTarget" level="Error">
- <properties>
- <prefix>[BlazeDS] </prefix>
- <includeDate>false</includeDate>
- <includeTime>false</includeTime>
- <includeLevel>true</includeLevel>
- <includeCategory>true</includeCategory>
- </properties>
- <filters>
- <pattern>Endpoint.*</pattern>
- </filters>
- </target>
-
- </logging>
-
- <system>
- <redeploy>
- <enabled>true</enabled>
- <watch-interval>20</watch-interval>
- <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
- <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
- </redeploy>
- </system>
-
-</services-config>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/WEB-INF/install-web.xml
----------------------------------------------------------------------
diff --git a/apps/ds-console/WEB-INF/install-web.xml b/apps/ds-console/WEB-INF/install-web.xml
deleted file mode 100755
index a741ed8..0000000
--- a/apps/ds-console/WEB-INF/install-web.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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.
-
--->
-
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
- <display-name>Console</display-name>
- <description>Administration tools for monitoring and management</description>
-
- <!-- MessageBroker Servlet -->
- <servlet>
- <servlet-name>MessageBrokerServlet</servlet-name>
- <display-name>MessageBrokerServlet</display-name>
- <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
- <init-param>
- <param-name>services.configuration.file</param-name>
- <param-value>/WEB-INF/flex/services-config.xml</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>MessageBrokerServlet</servlet-name>
- <url-pattern>/messagebroker/*</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- </welcome-file-list>
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/apps/ds-console/WEB-INF/web.xml b/apps/ds-console/WEB-INF/web.xml
deleted file mode 100755
index 61c89e5..0000000
--- a/apps/ds-console/WEB-INF/web.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?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.
-
--->
-
-<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
-
-<web-app>
- <display-name>Console</display-name>
- <description>Administration tools for monitoring and management</description>
-
- <context-param>
- <param-name>flex.class.path</param-name>
- <param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</param-value>
- </context-param>
-
- <!-- MessageBroker Servlet -->
- <servlet>
- <servlet-name>MessageBrokerServlet</servlet-name>
- <display-name>MessageBrokerServlet</display-name>
- <servlet-class>flex.messaging.MessageBrokerServlet</servlet-class>
- <init-param>
- <param-name>services.configuration.file</param-name>
- <param-value>/WEB-INF/flex/services-config.xml</param-value>
- </init-param>
- <init-param>
- <param-name>flex.write.path</param-name>
- <param-value>/WEB-INF/flex</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>MessageBrokerServlet</servlet-name>
- <url-pattern>/messagebroker/*</url-pattern>
- </servlet-mapping>
-
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- </welcome-file-list>
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/build.xml
----------------------------------------------------------------------
diff --git a/apps/ds-console/build.xml b/apps/ds-console/build.xml
deleted file mode 100755
index 4abf7af..0000000
--- a/apps/ds-console/build.xml
+++ /dev/null
@@ -1,174 +0,0 @@
-<?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="ds-console.war/build.xml" default="main" basedir="../..">
-
- <property environment="env" />
-
- <property file="${basedir}/build.properties"/>
- <property name="ds-console.war" value="${basedir}/apps/ds-console"/>
- <property name="dist.dir" value="${basedir}/dist"/>
- <property name="src.dir" value="${ds-console.war}/WEB-INF/src"/>
- <property name="classes.dir" value="${ds-console.war}/WEB-INF/classes"/>
- <property name="mxmlc.dir" value="${basedir}/bin"/>
-
-
- <property name="application.name" value="DS Console" />
- <property name="application.dir" value="${ds-console.war}" />
- <property name="application.file" value="console" />
-
- <path id="classpath">
- <fileset dir="${ds-console.war}/WEB-INF/lib" includes="**/*.jar"/>
- </path>
-
- <target name="main" depends="clean,ds-console"/>
- <target name="ds-console" depends="compile,compile-swf"/>
-
- <property environment="env"/>
-
- <target name="prepare">
- <mkdir dir="${ds-console.war}/WEB-INF/src"/>
- <mkdir dir="${ds-console.war}/WEB-INF/lib"/>
- <mkdir dir="${ds-console.war}/WEB-INF/classes"/>
- </target>
-
- <target name="copy-resources">
- <fail unless="local.sdk.lib.dir" message="must specify local.sdk.lib.dir in server/build.properties"/>
- <fail unless="local.sdk.frameworks.dir" message="must specify local.sdk.frameworks.dir in build.properties"/>
-
- <!-- copy to the lib directory -->
- <copy todir="${ds-console.war}/WEB-INF/lib">
- <fileset dir="${basedir}/lib" includes="${webapp.lib}" />
- </copy>
-
- <!-- copy to the classes directory -->
- <copy todir="${ds-console.war}/WEB-INF/classes">
- <fileset dir="${ds-console.war}/WEB-INF/src" erroronmissingdir="false">
- <include name="**/*.xml"/>
- </fileset>
- <fileset dir="${basedir}/lib" includes="${webapp.classes}" />
- </copy>
- </target>
-
- <target name="run-depend" if="src.depend">
- <echo message="Removing class files that changed and dependent class files."/>
- <depend cache="${classes.dir}" srcdir="${src.dir}" destdir="${classes.dir}"/>
- </target>
-
- <target name="compile" depends="prepare,run-depend,copy-resources" description="compile">
- <mkdir dir="${src.dir}"/>
- <javac source="1.4" debug="${src.debug}" destdir="${classes.dir}" srcdir="${src.dir}" classpathref="classpath"/>
- </target>
-
- <target name="compile-swf" >
-
- <delete file="${ds-console.war}/${application.file}.swf"/>
- <taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
- <property name="FLEX_HOME" value="${basedir}"/>
-
- <mxmlc file="${application.dir}/${application.file}.mxml"
- output="${application.dir}/${application.file}.swf"
- actionscript-file-encoding="UTF-8"
- keep-generated-actionscript="false"
- incremental="false"
- services="${ds-console.war}/WEB-INF/flex/services-config.xml"
- context-root="ds-console"
- 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"
- history="true"
- express-install="true"
- output="${application.dir}"/>
-
- </target>
-
- <target name="package" description=" Creates distribution war file">
- <mkdir dir="${dist.dir}"/>
- <antcall target="compile-swf"/>
- <delete file="${dist.dir}/ds-console.war"/>
- <war file="${dist.dir}/ds-console.war"
- webxml="${ds-console.war}/WEB-INF/install-web.xml">
- <manifest>
- <attribute name="Sealed" value="${manifest.sealed}"/>
- <attribute name="Implementation-Title" value="${manifest.Implementation-Title} - ${application.name}"/>
- <attribute name="Implementation-Version" value="${manifest.Implementation-Version}.${build.number}"/>
- <attribute name="Implementation-Vendor" value="${manifest.Implementation-Vendor}"/>
- </manifest>
- <fileset dir="${ds-console.war}">
- <include name="index.html"/>
- <include name="console.swf"/>
- <include name="playerProductInstall.swf"/>
- <include name="swfobject.js"/>
- <include name="history/*"/>
- <include name="WEB-INF/flex/services-config.xml"/>
- <include name="WEB-INF/classes/*"/>
- <include name="WEB-INF/lib/**/*"/>
- </fileset>
- </war>
- </target>
-
- <target name="clean" description="--> Removes jars and classes">
- <delete quiet="true">
- <fileset dir="${ds-console.war}/" includes="swfobject.js,index.html,console.swf,expressInstall.swf,history/*"/>
- </delete>
- <delete quiet="true">
- <fileset dir="${ds-console.war}/WEB-INF/lib" includes="${webapp.lib},${webtier.lib}"/>
- </delete>
- <delete quiet="true" includeEmptyDirs="true">
- <fileset dir="${ds-console.war}/WEB-INF/flex/locale" includes="**/*"/>
- </delete>
- <delete quiet="true">
- <fileset dir="${ds-console.war}/WEB-INF/flex/jars" includes="**/*"/>
- </delete>
- <delete quiet="true" includeEmptyDirs="true">
- <fileset dir="${ds-console.war}/WEB-INF/flex/frameworks" includes="**/*"/>
- </delete>
- <delete quiet="true" includeEmptyDirs="true">
- <fileset dir="${ds-console.war}/WEB-INF/flex" includes="*.ser,mxml-manifest.xml,cache.dep"/>
- </delete>
- <delete quiet="true">
- <fileset dir="${classes.dir}" includes="**/*.class"/>
- </delete>
- <delete quiet="true" file="${dist.dir}/console.war"/>
- <delete quiet="true" file="${dist.dir}/ds-console.war"/>
- <delete quiet="true" dir="${ds-console.war}/history" />
- <delete quiet="true" dir="${ds-console.war}/WEB-INF/lib" />
- <delete quiet="true" dir="${ds-console.war}/WEB-INF/classes" />
-
- </target>
-
-</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console.mxml
----------------------------------------------------------------------
diff --git a/apps/ds-console/console.mxml b/apps/ds-console/console.mxml
deleted file mode 100755
index f616a52..0000000
--- a/apps/ds-console/console.mxml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?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:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:console="console.containers.*" xmlns="*" creationComplete="initApp();">
- <mx:Script>
- <![CDATA[
- import console.ConsoleListener;
- import console.containers.LogManager;
- import console.containers.DestinationManager;
- import console.containers.EndpointManager;
- import console.containers.DefaultPanel;
- import mx.core.Container;
- import console.containers.UpdateListener;
- import console.events.ManagementOperationInvokeEvent;
- import mx.collections.ArrayCollection;
- import console.containers.ServerManager;
- import console.containers.AdvancedPanel;
- import console.ConsoleManager;
- import mx.messaging.management.*;
- import mx.rpc.events.ResultEvent;
-
- private var manager:ConsoleManager;
- private var advPanel:AdvancedPanel;
- private var srvManager:ServerManager;
- private var currentSelectedPanel:Container;
- private var consoleListener:ConsoleListener;
-
- [Bindable]
- public var appsList:ArrayCollection;
-
- private function initApp():void
- {
- appsList = new ArrayCollection;
-
- manager = ConsoleManager.getInstance();
- manager.parent = this;
-
- consoleNavigator.addChild(new DefaultPanel());
- consoleNavigator.addChild(new ServerManager());
- consoleNavigator.addChild(new EndpointManager());
- consoleNavigator.addChild(new DestinationManager());
- consoleNavigator.addChild(new LogManager());
- consoleNavigator.addChild(new AdvancedPanel());
-
- consoleListener = new ConsoleListener(this);
-
- currentSelectedPanel = consoleNavigator.selectedChild as Container;
- manager.activateListener(consoleNavigator.selectedChild as UpdateListener);
- }
-
- private function setCurrentTab():void
- {
- manager.deactivateListener(currentSelectedPanel as UpdateListener);
- manager.activateListener(consoleNavigator.selectedChild as UpdateListener);
-
- currentSelectedPanel = consoleNavigator.selectedChild as Container;
- }
-
- private function setCurrentApp():void
- {
- manager.currentApp = appSelect.selectedItem.data.label as String;
- }
-
- private function updatePollInterval():void
- {
- manager.timerInterval = pollIntervalSlider.value * 1000;
- }
-
- public function updateModel(model:Object):void
- {
- var mbeanModel:Object = manager.mbeanModel;
- for each (var appObj:Object in mbeanModel)
- {
- var names:Array = (appObj.label as String).split(".");
- appsList.addItem({label: names[2], data: appObj});
- }
- appSelect.selectedIndex = 0;
- }
- ]]>
- </mx:Script>
- <mx:HBox width="100%" textAlign="left" horizontalAlign="right">
- <mx:Label text="Application"/>
- <mx:ComboBox id="appSelect" dataProvider="{appsList}" labelField="label" width="300" change="{setCurrentApp()}" editable="false" enabled="true"/>
- <mx:Label text="Polling Interval (seconds)" />
- <mx:HSlider id="pollIntervalSlider" minimum="0" maximum="20" snapInterval=".5" enabled="true" change="{updatePollInterval()}"/>
- </mx:HBox>
- <mx:TabNavigator width="100%" height="100%" id="consoleNavigator" change="{setCurrentTab()}">
- </mx:TabNavigator>
-</mx:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/ConsoleListener.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/ConsoleListener.as b/apps/ds-console/console/ConsoleListener.as
deleted file mode 100755
index 72e7bb9..0000000
--- a/apps/ds-console/console/ConsoleListener.as
+++ /dev/null
@@ -1,43 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console
-{
- import console.containers.UpdateListener;
-
- public class ConsoleListener extends UpdateListener
- {
- private var _console:console;
-
- public function ConsoleListener(c:console)
- {
- _console = c;
- ConsoleManager.getInstance().registerListener(this, []);
- }
-
- public override function mbeanModelUpdate(mbeanModel:Object):void
- {
- for each (var appObj:Object in mbeanModel)
- {
- var names:Array = (appObj.label as String).split(".");
- _console.appsList.addItem({label: names[2], data: appObj});
- }
- _console.appSelect.selectedIndex = 0;
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/ConsoleManager.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/ConsoleManager.as b/apps/ds-console/console/ConsoleManager.as
deleted file mode 100755
index f8be6cb..0000000
--- a/apps/ds-console/console/ConsoleManager.as
+++ /dev/null
@@ -1,1004 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package console
-{
- import console.ConsoleTreeDataDescriptor;
- import console.events.ManagementOperationInvokeEvent;
- import flash.events.*;
- import mx.collections.*;
- import mx.containers.*;
- import mx.controls.*;
- import mx.controls.treeClasses.*;
- import mx.events.*;
- import mx.managers.*;
- import mx.messaging.messages.*;
- import mx.messaging.management.*;
- import mx.rpc.events.*;
- import mx.rpc.remoting.*;
- import mx.utils.*;
- import mx.rpc.remoting.RemoteObject;
- import flash.display.DisplayObject;
- import console.containers.UpdateManager;
- import console.containers.UpdateListener;
- import flash.utils.Timer;
- import mx.core.LayoutContainer;
-
- public class ConsoleManager implements console.containers.UpdateManager
- {
- public static const GENERAL_SERVER:int = 1;
- public static const GENERAL_POLLABLE:int = 2;
- public static const GENERAL_OPERATION:int = 3;
-
- public static const GRAPH_BY_POLL_INTERVAL:int = 50;
-
- public static const ENDPOINT_SCALAR:int = 100;
- public static const ENDPOINT_POLLABLE:int = 101;
-
- public static const DESTINATION_GENERAL:int = 150;
- public static const DESTINATION_POLLABLE:int = 151;
-
- public static const TIMER_INTERVAL:int = 3000;
-
- ///////////////////////////
- // Private data structures
- ///////////////////////////
- /**
- * A generic object model of the MBean hierarchy, built from the flat set of object names.
- * The model is an array of top level objects. Each object has the following slots:
- * <ul>
- * <li>label:String - required - the label for the MBean instance or category name/app name</li>
- * <li>type:String - optional - the type value for a node that parents MBeans of similar type</li>
- * <li>objectName:ObjectName - optional - the ObjectName instance for an MBean</li>
- * <li>children:Array - optional - array of child objects</li>
- * </ul>
- */
- private var _mbeanModel:Array;
- public function get mbeanModel():Object
- {
- return _mbeanModel;
- }
-
- /**
- * The listeners map is keyed on the listeners and stores a property called types
- * which is an array of all of the types that the listener uses and whether or not
- * an individual type should poll. Not all listeners are always updated however,
- * there is another map 'activeListeners' which keeps track of which listeners are actively
- * listening to the timer. This is used because if one panel is hidden,
- * we do not want to poll all of the data it listens for if it won't be displayed yet.
- *
- * An example listeners map then looks like this:
- *
- * listeners:Object -+-[listener1:String]-:- { reference: listenerObject,
- * | types: [[TYPE1, POLL],
- * | [TYPE2, NOPOLL]]
- * +-[listener2:String]-:- { ... }
- */
- private var listeners:Object;
-
-
- /**
- * The activeListeners object stores all of the active listeners
- * for polling and is keyed on the type of data. An example is:
- *
- * activeListeners:Object -+-[ TYPE1:int ]-:- [ l1:UpdateListener , ... ]
- * |
- * + [ TYPE2:int ]-:- [ ... , ... , ... ]
- */
- private var activeListeners:Object;
-
- /**
- * This map handles storing information about what mbeans are associated
- * with what display types. It is keyed on the types of data (e.g. GENERAL_SCALAR, etc.),
- * then on the application name stored as a string, then the MBean name.
- *
- * An example displays map then looks like this:
- *
- * displays:Object -+-[TYPE1:int]-:[Application1]:- [mbean1] -> [attr1, attr2, attr3]
- * | | [mbean2] -> [attr1, attr2]
- * | | [mbean3] -> [...]
- * | +[Application2]:- [mbean...]
- * | |
- * |
- * +-[TYPE2:int]-:- [ ... ]
- */
- private var displays:Object;
-
- /**
- * Temporarily holds onto data pulled from the server. Anything in the buffer is
- * always overridden by new data.
- *
- * Is a map keyed on the data types which all reference maps keyed on mbeans which
- * store arrays of associated attributes.
- *
- * E.g.
- *
- * dataBuffer:Object -+-[TYPE1:int]-+--[mbeanName: bean1] -:- [ attr1:String , attr2:String ]
- * | +--[mbeanName: bean2] -:- [ attr1:String , attr2:String ]
- * |
- * +-[TYPE2:int]----[mbeanName: bean3] ...
- */
- private var dataBuffer:Object;
-
- // is this necessary!? can any reference to types[] be replaced with the keyset of displays?
- private var types:Array;
-
-
- ///////////////////////////
- // Private variables
- ///////////////////////////
-
- private var minfo:MBeanInfo;
- private var isInitialized:Boolean = false;
-
- /**
- * Map of ints, keeps track of how many mbeans of each type
- * we've received from the server when processing getting
- * data for any given type.
- */
- private var callbackCounters:Object;
-
-
- private var _displayTypesObject:Object;
-
- /**
- * Dictionary of callback handlers for remote call results
- * keyed by message correlationId.
- */
- private var callbackMap:Object;
- protected var callbacks:Object;
-
- // Keeps track whether a mbeanServer related fault is already handled .
- private var faultAlreadyHandled:Boolean = false;
-
- private var updateTimer:Object;
-
- private var hiddenDomains:Array = [ "flex.runtime.Console" ];
-
- ///////////////////////////
- // Public console instance vars
- ///////////////////////////
-
- private var _currentApp:String;
- public function set currentApp(name:String):void
- {
- _currentApp = name;
-
- for (var listener:* in listeners)
- {
- // Todo: Update listeners so that they can clear their data buffers.
- (listeners[listener].reference as UpdateListener).appChanged(name);
- }
- }
- public function get currentApp():String
- {
- if (_currentApp == null)
- {
- if ((mbeanModel[0] != null) && (mbeanModel[0].label != null))
- _currentApp = mbeanModel[0].label
- else
- return null
-
- }
- return _currentApp;
- }
-
- /**
- * Handle to the MBean Server remote object.
- */
- private var _mbeanServer:RemoteObject;
- public function get mbeanServer():RemoteObject
- {
- return _mbeanServer;
- }
-
- /**
- * The MBeanName for the currently selected MBean.
- */
- private var _currentMBeanName:String;
- public function get currentMBeanName():String
- {
- return _currentMBeanName;
- }
- public function set currentMBeanName(s:String):void
- {
- _currentMBeanName = s;
- }
-
- /**
- * The MBeanInfo for the currently selected MBean.
- */
- private var _currentMBeanInfo:MBeanInfo;
- public function get currentMBeanInfo():MBeanInfo
- {
- return _currentMBeanInfo;
- }
- public function set currentMBeanInfo(i:MBeanInfo):void
- {
- _currentMBeanInfo = i;
- }
-
- protected var _parent:DisplayObject
- public function set parent(p:DisplayObject):void
- {
- _parent = p;
- }
-
- public function set timerInterval(interval:int):void
- {
- if (interval > 0)
- {
- updateTimer.timer.stop();
- updateTimer.timer = new Timer(interval, 0);
- updateTimer.timer.addEventListener(TimerEvent.TIMER, pollServer);
- updateTimer.timer.start();
- }
- }
-
- protected static var privateCall:Boolean;
- protected static var instance:ConsoleManager;
-
-
- ////////////////////////////
- // Console methods
- ////////////////////////////
-
- public static function getInstance():ConsoleManager
- {
- if (instance == null)
- {
- privateCall = true;
- ConsoleManager.instance = new ConsoleManager();
- privateCall = false;
- }
-
- return ConsoleManager.instance;
- }
-
- /**
- * Initializes the console, and requests the names of
- * registered Flex MBeans.
- */
- public function ConsoleManager():void
- {
- if (!privateCall)
- throw new Error ("This is a Singleton Class!");
-
- // Create data structures used:
- _mbeanModel = [];
- callbacks = {};
- displays = {};
- listeners = {};
- dataBuffer = {};
- activeListeners = {};
- _displayTypesObject = {};
- callbackCounters = {};
- callbackCounters.dataFetch = {};
- callbackCounters.typeCount = 0;
- callbackCounters.appCount = 0;
-
- _mbeanServer = new RemoteObject("RuntimeManagement");
- _mbeanServer.addEventListener("result", handleResult);
- _mbeanServer.addEventListener("fault", handleFault);
-
- var token:Object = _mbeanServer.getFlexMBeanObjectNames();
- callbacks[token.message.messageId] = handleMBeanObjectNames;
- }
-
-
- public function setAttribute(mbean:String, attribute:String, newValue:Object):void
- {
- var attr:Attribute = new Attribute;
- attr.name = attribute;
- attr.value = newValue;
- mx.controls.Alert.show(attr.toString());
- _mbeanServer.setAttribute(mbean, attr);
- }
-
- /**
- * Register a display panel that implements the UpdateListener interface, passing
- * in an array, 'regtypes' which contains a list of every display type and
- * whether or not the type should be polled.
- */
- public function registerListener(listener:UpdateListener, regtypes:Array):void
- {
- listeners[listener.name] = {reference: listener, types: regtypes};
- }
-
- public function unregisterListener(listener:UpdateListener):void
- {
- if (listeners[listener.name])
- {
- deactivateListener(listener);
- delete listeners[listener.name];
- }
- }
-
- /**
- * When a listener is activated using this method, the types are found in the listeners
- * map and for each type:
- *
- * If polling is enabled, we add the listener to the activeListeners map for the types
- * it listens to.
- *
- * If polling is not enabled, we just poll the server once.
- */
- public function activateListener(listener:UpdateListener):void
- {
- var typesForListener:Array;
- try
- {
- typesForListener = listeners[listener.name].types;
- }
- catch (error:Error)
- {
- // nothing to do for this listener!
- }
-
- if (typesForListener == null)
- return;
-
- for (var i:int = 0; i < typesForListener.length; i++)
- {
- var type:int = typesForListener[i].type;
- getDataForType(type, listener);
-
- if (typesForListener[i].poll)
- {
- if (!activeListeners[type])
- {
- updateTimer.activeTypesCounter++;
- activeListeners[type] = new ArrayCollection;
- }
-
- (activeListeners[type] as ArrayCollection).addItem(listener);
-
- if (!updateTimer.timer.running)
- updateTimer.timer.start();
- }
- }
- }
-
- public function deactivateListener(listener:UpdateListener):void
- {
- // can't deactivate a non-registered listener!
- if (!listeners[listener.name])
- return;
-
- var typesForListener:Array = listeners[listener.name].types;
- if (typesForListener == null)
- return;
-
- for (var i:int = 0; i < typesForListener.length; i++)
- {
- var type:int = typesForListener[i].type;
- if (typesForListener[i].poll)
- {
- if (activeListeners[type])
- {
- var indexOfListener:int = (activeListeners[type] as ArrayCollection).getItemIndex(listener);
- if (indexOfListener != -1)
- (activeListeners[type] as ArrayCollection).removeItemAt(indexOfListener);
-
- if ((activeListeners[type] as ArrayCollection).length == 0)
- {
- delete activeListeners[type];
-
- if (--updateTimer.activeTypesCounter == 0)
- updateTimer.timer.stop();
- }
- }
- }
- }
- }
-
- public function addCallback(id:String, o:Object, f:Function):void
- {
- callbacks[id] = {object:o, callbackFunction:f};
- }
-
-
- public function getMBeanNamesForType(type:int):Array
- {
- if ((displays[type] == null) || (displays[type][_currentApp] == null))
- return new Array;
-
- return (displays[type][_currentApp] as Array);
- }
-
-
- public function getMBeanInfo(name:String, obj:Object, callback:Function):void
- {
- try
- {
- var token:Object = this.mbeanServer.getMBeanInfo(name);
- this.addCallback(token.message.messageId,this,callback);
- }
- catch (e:Error)
- {
- // Ignore runtime error - we get a Fault back from the RPC operation.
- }
- }
-
- /**
- * Invoke an operation on an MBean.
- */
- public function invokeOperation(e:ManagementOperationInvokeEvent, callback:Function = null):void
- {
- if (callback == null)
- {
- callback = handleInvoke
- }
-
- try
- {
- var token:Object = _mbeanServer.invoke(e.mbean, e.name, e.values, e.signature);
- callbacks[token.message.messageId] = callback;
- }
- catch (e:Error)
- {
- // Ignore runtime error - we get a Fault back from the RPC operation.
- }
- }
-
- /**
- * Request the current attribute values for an MBean.
- */
- public function getAllAttributes(name:String, info:MBeanInfo, obj:Object, callback:Function):void
- {
-
- // Fetch attribute values.
- var attribNames:Array = [];
- var n:int = info.attributes.length;
- for (var i:int = 0; i < n; ++i)
- {
- var attribInfo:MBeanAttributeInfo = info.attributes[i];
- // Ignore attributes that are MBean ObjectNames as all MBeans
- // are rendered in the global tree and don't need to be repeated
- // in the attributes this. Also ignore non-readable attributes.
- if (attribInfo.readable && (attribInfo.type.indexOf("ObjectName") == -1))
- {
- attribNames.push(attribInfo.name);
- }
- }
- if (attribNames.length)
- {
- getAttributes(name, attribNames, obj, callback);
- }
-
- }
-
- public function getAttributes(name:String, attribs:Array, obj:Object, callback:Function):void
- {
- try
- {
- var token:Object = _mbeanServer.getAttributes(name, attribs);
- this.addCallback(token.message.messageId, obj, callback);
- }
- catch (e:Error)
- {
- // Ignore runtime error - we get a Fault back from the RPC operation.
- }
- }
-
-
- public function getChildTrees(...children):Array
- {
- var ret:Array = new Array;
-
- for (var i:int = 0; i < children.length; i++)
- {
- if (children[i] is String)
- {
- (getChildTree(children[i]) as Array)
- .forEach(function(it:*, i:int, a:Array):void { ret.push(it); });
- }
- }
- return ret;
- }
-
- public function getChildTree(childName:String):Array
- {
- var appTree:Array;
- for each (var app:Object in _mbeanModel)
- {
- if (app.label == currentApp)
- {
- // The only child of an application is the MessageBroker _class_ which could
- // have multiple messagebrokerX _instances_ beneath it, but the
- // first is selected. (Thus the multiple [0].children references.)
- try
- {
- appTree = ((app.children as Array)[0].children as Array)[0].children as Array
- }
- catch (e:Error)
- {
- return new Array;
- }
- }
- }
-
- for each (var item:Object in appTree)
- {
- if (item.label == childName)
- return item.children as Array;
- }
-
- return new Array;
- }
-
- public function getTypesForAttribute(mbean:String, attr:String):Array
- {
- var types:Array = [];
- for (var type:* in displays)
- {
- if (displays[type][_currentApp] != null)
- {
- for (var b:String in displays[type][_currentApp])
- {
- if (mbean == b)
- {
- if ((displays[type][_currentApp][mbean] as Array).indexOf(attr) > -1)
- types.push(type);
- }
- }
- }
- }
-
- return types;
- }
-
- public function checkTypeForAttribute(type:int, mbean:String, attr:String):Boolean
- {
- if ((displays[type as String]) && (displays[type][_currentApp]) && (displays[type][_currentApp][mbean]))
- if ((displays[type][_currentApp][mbean] as Array).indexOf(attr) > -1)
- return true;
-
- return false;
- }
-
- public function updateData(listener:UpdateListener):void
- {
- var listenerObject:Object = listeners[listener.name];
- if (!listenerObject)
- return;
-
- for (var i:int = 0; i < (listenerObject.types as Array).length; i++)
- getDataForType((listenerObject.types as Array)[i].type, listener);
- }
-
- private function getDataForType(type:int, singleListener:UpdateListener = null):void
- {
- if (!isInitialized)
- {
- // if we don't have the display data yet, we'll re-query the server and get the mbean object names
- var objectnamesToken:Object = _mbeanServer.getFlexMBeanObjectNames();
- callbacks[objectnamesToken.message.messageId] = handleMBeanObjectNames;
-
- return;
- }
-
-
- if ((displays[type] == null) || (displays[type][_currentApp] == null))
- return
-
- // Dictionary of arrays keyed on mbeanName:the name of the
- // mbean, and the associated array is the attributes to query
- var mbeans:Object = new Object;
- var queryLength:int = 0;
-
- for (var mbean:String in displays[type][_currentApp])
- ++queryLength;
-
- for (var mbeanName:String in displays[type][_currentApp])
- {
- var token:Object = mbeanServer.getAttributes(currentApp+":"+mbeanName,
- (displays[type][_currentApp][mbeanName] as ArrayCollection).toArray());
-
- token.type = type;
- token.mbeanName = mbeanName;
- token.queryLength = queryLength;
- token.singleListener = singleListener;
- callbacks[token.message.messageId] = handleDataForType;
- }
- }
-
- private function handleDataForType(e:ResultEvent):void
- {
- var type:int = e.token.type as int;
- var mbeanName:String = e.token.mbeanName as String;
- var singleListener:UpdateListener = e.token.singleListener;
-
- if (!dataBuffer.hasOwnProperty(type))
- dataBuffer[type] = new Object;
-
- // Put the data for the mbean for the specific type of data in the proper place in the array
- if (dataBuffer[type].hasOwnProperty(mbeanName))
- delete dataBuffer[type][mbeanName];
-
- dataBuffer[type][mbeanName] = e.result as Array;
-
- if (!callbackCounters.dataFetch.hasOwnProperty(type)) callbackCounters.dataFetch[type] = 0;
-
- if (++callbackCounters.dataFetch[type] == e.token.queryLength)
- {
- callbackCounters.dataFetch[type] = 0;
-
- if (!singleListener)
- {
- var listenersToUpdate:ArrayCollection = activeListeners[type] as ArrayCollection;
-
- if (!listenersToUpdate)
- return;
-
- for (var i:int = 0; i < listenersToUpdate.length; i++)
- {
- (listenersToUpdate[i] as UpdateListener).dataUpdate(type, dataBuffer[type]);
- }
- }
- else
- {
- singleListener.dataUpdate(type, dataBuffer[type]);
- }
- }
- }
-
- /**
- * Handle any results from the MBean Server remote object by
- * delegating to the associated callback based on correlationId.
- */
- protected function handleResult(e:ResultEvent):void
- {
- var msg:AsyncMessage = AsyncMessage(e.message);
- if (msg.correlationId in callbacks)
- {
- var callback:Object = callbacks[msg.correlationId];
- delete callbacks[msg.correlationId];
- if (callback is Function)
- {
- callback(e);
- }
- else
- {
- if ((callback.hasOwnProperty("object")) && (callback.hasOwnProperty("callbackFunction")))
- {
- var f:Function = callback.callbackFunction;
- f.call(callback.object, e);
- }
- }
- }
- }
-
- /**
- * Handle any faults from the MBean Server remote object by
- * displaying an alert to the user.
- */
- protected function handleFault(e:FaultEvent):void
- {
- if (!faultAlreadyHandled)
- {
- mx.controls.Alert.show("Please restart the application since polling has stopped due to the following error: " + e.toString());
- if (updateTimer != null)
- {
- updateTimer.activeTypesCounter = 0;
- updateTimer.timer.stop();
- }
- faultAlreadyHandled = true;
- }
- }
-
- /**
- * Handles the result of a getFlexMBeanObjectNames() call.
- */
- protected function handleMBeanObjectNames(e:ResultEvent):void
- {
- var i:int;
- // Build the model for our MBeans.
- var mbeanNames:Array = e.result as Array;
- var domainNames:Array = [];
- var domainMBeanNames:Object = {};
- var mbeanName:ObjectName;
- var n:int = mbeanNames.length;
- if (n)
- {
- for (i = 0; i < n; ++i)
- {
- mbeanName = mbeanNames[i];
- if (hiddenDomains.indexOf(mbeanName.domain) >= 0)
- {
-
- }
- else if (mbeanName.domain in domainMBeanNames)
- {
- domainMBeanNames[mbeanName.domain].push(mbeanName);
- }
- else
- {
- domainNames.push(mbeanName.domain);
- domainMBeanNames[mbeanName.domain] = [mbeanName];
- }
- }
- _mbeanModel = [];
- domainNames.sort();
- callbackCounters.appCount = domainNames.length;
- var n2:int = domainNames.length;
- for (i = 0; i < n2; ++i)
- {
- buildDomain(domainNames[i], domainMBeanNames[domainNames[i]]);
-
- if (_displayTypesObject[domainNames[i]] != null)
- {
- var token:Object = _mbeanServer.getAttributes(
- _displayTypesObject[domainNames[i]].canonicalName, ["SupportedTypes"]);
-
- token.beanName = _displayTypesObject[domainNames[i]].canonicalName;
- addCallback(token.message.messageId, this, handleSupportedTypesMBean);
- }
- }
-
- }
- }
-
- /**
- * Process the display types that the server has registered. Another function
- * handles querying the MBean server for all of the actual attributes supported
- * by the given display type.
- */
- private function handleSupportedTypesMBean(e:ResultEvent):void
- {
- if ((e.result as Array)[0].name != "SupportedTypes")
- {
- return;
- }
-
- types = (e.result as Array)[0].value;
- callbackCounters.typeCount = types.length;
- for (var i:int = 0; i < types.length; i++)
- {
- var invokeEvent:ManagementOperationInvokeEvent = new ManagementOperationInvokeEvent(
- e.token.beanName,
- "listForType",
- [types[i]],
- ["int"]);
-
- invokeOperation(invokeEvent, getTypesHandler);
- }
- }
-
- /**
- * Handles the attribute _names_ for a given type which the server is sending
- */
- private function getTypesHandler(e:ResultEvent):void
- {
- --callbackCounters.typeCount;
-
- // Get the defined TYPE from the token
- var type:int = e.token.message.body[2][0];
-
- for each (var str:String in (e.result as Array))
- {
- var mbeanAttr:Array = str.split(":");
-
- if (!displays.hasOwnProperty(type))
- displays[type] = new Object;
-
- if (!displays[type].hasOwnProperty(mbeanAttr[0]))
- displays[type][mbeanAttr[0]] = new Object;
-
- var exposedObjectInfo:Object = new Object;
-
- if (!displays[type][mbeanAttr[0]].hasOwnProperty(mbeanAttr[1]))
- displays[type][mbeanAttr[0]][mbeanAttr[1]] = new ArrayCollection();
-
- (displays[type][mbeanAttr[0]][mbeanAttr[1]] as ArrayCollection).addItem(mbeanAttr[2]);
- }
-
- if (callbackCounters.typeCount == 0)
- {
- initialize();
- }
- }
-
- /**
- * Function for handling what to do after all of the necessary mbea
- * data has been polled for the first time.
- */
- private function initialize():void
- {
- // now we can poll for data based on a given display type
- isInitialized = true;
-
- // We've received and processed all of the display type information
- // so we can notify the listeners
- for each (var listener:Object in listeners)
- {
- (listener.reference as UpdateListener).mbeanModelUpdate(mbeanModel);
- }
-
- updateTimer = new Object;
-
- updateTimer.timer = new Timer(TIMER_INTERVAL);
- updateTimer.activeTypesCounter = 0;
- updateTimer.timer.addEventListener(TimerEvent.TIMER, pollServer);
- }
-
- private function pollServer(e:Event):void
- {
- for (var type:* in activeListeners)
- {
- getDataForType(type);
- }
- }
-
- /**
- * Builds a top level domain node containing all MBeans
- * within the domain.
- */
- private function buildDomain(domain:String, objectNames:Array):void
- {
- var domainNode:Object = {label: domain, children: []};
- // Process all of the MBean names in this domain.
- // Put them in sorted order to optimize tree construction.
- objectNames.sort(compareObjectNames);
- var n:int = objectNames.length;
- for (var i:int = 0; i < n; ++i)
- {
- buildMBeanNode(domainNode, objectNames[i]);
- }
- _mbeanModel.push(domainNode);
- }
-
- /**
- * Comparator function for sorting MBean object names.
- */
- private function compareObjectNames(first:ObjectName, second:ObjectName):int
- {
- var firstType:String = first.getKeyProperty("type").toLowerCase();
- var secondType:String = second.getKeyProperty("type").toLowerCase();
- if (firstType > secondType)
- return 1;
- else if (firstType < secondType)
- return -1;
- else // Types match - compare on id.
- {
- var firstId:String = first.getKeyProperty("id").toLowerCase();
- var secondId:String = second.getKeyProperty("id").toLowerCase();
- return (firstId > secondId) ? 1 : (firstId < secondId) ? -1 : 0;
- }
- }
-
- /**
- * Builds and adds a tree node based on the MBean object name.
- */
- private function buildMBeanNode(parent:Object, name:ObjectName):void
- {
- var types:Array = name.getKeyProperty("type").split('.');
- var mbeanId:String = name.getKeyProperty("id") as String;
- // Sink to our insertion point in the type hierarchy, adding type nodes
- // along the way when necessary.
- var n:int = types.length;
- for (var i:int = 0; i < n; ++i)
- {
- if (types[i] == "AdminConsoleDisplay")
- {
- var app:String = ((name.canonicalName as String).split(":") as Array)[0];
- _displayTypesObject[app] = name;
- return;
- }
- }
-
- for (i = 0; i < n; ++i)
- {
- var createChildType:Boolean = true;
- if (parent.children.length)
- {
- // Search for a child matching on current type. This is a linear search,
- // but there generally aren't enough child nodes to warrant anything more performant.
- var children:Array = parent.children;
- var node:Object;
- var n2:int = children.length;
- for (var j:int = 0; j < n2; ++j)
- {
- node = children[j];
- if (node.hasOwnProperty("type") && node.type == types[i])
- {
- parent = children[j];
- createChildType = false;
- // Check whether the parent type (container) node contains a child MBean node
- // that matches on id. This is the ancestor MBean instance, out of all ancestors
- // of this current type, that we're parented under.
- // Again, a linear search because there generally aren't enough siblings of a
- // given type to warrant anything more performant.
- if (parent.children.length)
- {
- children = parent.children;
- var n3:int = children.length;
- for (var k:int = 0; k < n3; ++k)
- {
- node = children[k];
- if (node.hasOwnProperty("objectName") &&
- (node.objectName.getKeyProperty("id") == name.getKeyProperty(types[i])))
- {
- parent = node;
- }
- }
- }
- break;
- }
- }
- }
- if (createChildType)
- {
- node = {label: types[i], type: types[i], children: []};
- parent.children.push(node);
- parent = node;
- }
- }
- // We're done generating the ancestor hierarchy.
- // Insert the MBean node.
- if (parent.children.length)
- {
- // Simple linear search for insertion point among siblings for now.
- var siblings:Array = parent.children;
- var id:String = mbeanId.toLowerCase();
- node;
- n = siblings.length;
- for (i = 0; i < n; ++i)
- {
- node = siblings[i];
- if (node.hasOwnProperty("objectName") &&
- (node.objectName.getKeyProperty("id").toLowerCase() > id))
- {
- mbeanNode = {label: mbeanId, objectName: name, children: []};
- if (i == siblings.length)
- siblings.push(mbeanNode);
- else
- siblings.splice(i+1, 0, mbeanNode);
- return;
- }
- }
- }
- // Add the MBean node without specifying an index; no insertion point was found for it.
- var mbeanNode:Object = {label: mbeanId, objectName: name, children: []};
- parent.children.push(mbeanNode);
- }
-
-
-
- /**
- * Handles the result of invoke().
- */
- private function handleInvoke(e:ResultEvent):void
- {
- if (_parent)
- {
- var resultWindow:ConsoleResultWindow = ConsoleResultWindow(PopUpManager.createPopUp(_parent, ConsoleResultWindow, false));
- PopUpManager.centerPopUp(resultWindow);
- if (e.result != null)
- {
- resultWindow.showResult(e.result);
- }
- else // A null result indicates success with a void return type.
- {
- resultWindow.showSuccess();
- }
- }
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/ds-console/console/ConsoleTreeDataDescriptor.as
----------------------------------------------------------------------
diff --git a/apps/ds-console/console/ConsoleTreeDataDescriptor.as b/apps/ds-console/console/ConsoleTreeDataDescriptor.as
deleted file mode 100755
index 50e4a57..0000000
--- a/apps/ds-console/console/ConsoleTreeDataDescriptor.as
+++ /dev/null
@@ -1,70 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-package console {
-
-import mx.collections.ArrayCollection;
-import mx.collections.ICollectionView;
-import mx.controls.treeClasses.ITreeDataDescriptor;
-
-public class ConsoleTreeDataDescriptor implements ITreeDataDescriptor {
-
- public function getChildren(node:Object, model:Object=null):ICollectionView
- {
- if (node == null)
- return null;
- else if (node.hasOwnProperty("children") && (node.children.length > 0))
- return new ArrayCollection(node.children);
- else
- return null;
- }
-
- public function hasChildren(node:Object, model:Object=null):Boolean
- {
- return true;
- }
-
-
- public function isBranch(node:Object, model:Object=null):Boolean
- {
- if (node == null)
- return false;
- else
- return (node.hasOwnProperty("children") && (node.children.length > 0)) ? true : false;
- }
-
- public function getData(node:Object, model:Object=null):Object
- {
- return node;
- }
-
-
- public function addChildAt(node:Object, child:Object, index:int, model:Object=null):Boolean
- {
- return true;
- }
-
- public function removeChildAt(node:Object, child:Object, index:int, model:Object=null):Boolean
- {
- return true;
- }
-
-}
-
-}
\ No newline at end of file
[15/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync01/src/insync01.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync01/src/insync01.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/src/insync01.mxml
new file mode 100755
index 0000000..4279623
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync01/src/insync01.mxml
@@ -0,0 +1,35 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%">
+
+ <fx:Declarations>
+ <s:RemoteObject id="ro" destination="contactService" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}"/>
+ </fx:Declarations>
+
+ <s:controlBarContent>
+ <s:TextInput id="searchStr"/>
+ <s:Button label="Search" click="ro.findByName(searchStr.text)"/>
+ </s:controlBarContent>
+
+ <mx:DataGrid id="dg" dataProvider="{ro.findByName.lastResult}" top="8" left="8" right="8" bottom="8"/>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.actionScriptProperties
new file mode 100755
index 0000000..cad1bd8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="insync02.mxml" projectUUID="f975ff1e-3bc6-433b-a8f8-43e3a6349ba6" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="insync02.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.project b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.project
new file mode 100755
index 0000000..2380817
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>insync02</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync02/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync02/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/build.xml
new file mode 100755
index 0000000..ac3b3f1
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="insync02" />
+ <property name="application.file" value="insync02" />
+ <property name="application.bin.dir" value="${samples-spring.war}/insync02" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync02/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync02/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[11/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/Contact.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/Contact.as b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/Contact.as
new file mode 100755
index 0000000..89599ea
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/Contact.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package
+{
+ [Bindable]
+ [RemoteClass(alias="org.springframework.flex.samples.contact.Contact")]
+ public class Contact
+ {
+ public var id:int = -1;
+ public var firstName:String;
+ public var lastName:String;
+ public var email:String;
+ public var phone:String;
+ public var address:String;
+ public var city:String;
+ public var state:String;
+ public var zip:String;
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/ContactForm.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/ContactForm.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/ContactForm.mxml
new file mode 100755
index 0000000..1771202
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/ContactForm.mxml
@@ -0,0 +1,133 @@
+<?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:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
+ label="{contact.id>-1?contact.firstName+' '+contact.lastName:'New Contact'}">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.rpc.events.FaultEvent;
+ import mx.rpc.events.ResultEvent;
+ import mx.controls.Alert;
+
+ [Bindable] public var contact:Contact;
+
+ private function save():void
+ {
+ contact.firstName = firstName.text;
+ contact.lastName = lastName.text;
+ contact.email = email.text;
+ contact.phone = phone.text;
+ contact.address = address.text;
+ contact.city = city.text;
+ contact.state = state.text;
+ contact.zip = zip.text;
+ if (contact.id == -1)
+ {
+ ro.create(contact);
+ }
+ else
+ {
+ ro.update(contact);
+ }
+ }
+
+ private function create_resultHandler(event:ResultEvent):void
+ {
+ contact.id = event.result.id;
+ }
+
+ private function update_resultHandler(event:ResultEvent):void
+ {
+ // no specific action for now
+ }
+
+ private function deleteItem():void
+ {
+ ro.remove(contact);
+ closeItem();
+ }
+
+ private function closeItem():void
+ {
+ parent.removeChild(this);
+ }
+
+ private function remove_resultHandler(event:ResultEvent):void
+ {
+ contact = null;
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <mx:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <mx:method name="create" result="create_resultHandler(event)"/>
+ <mx:method name="update" result="update_resultHandler(event)"/>
+ <mx:method name="remove" result="remove_resultHandler(event)"/>
+ </mx:RemoteObject>
+ </fx:Declarations>
+
+ <mx:Form>
+ <mx:FormItem label="Id">
+ <mx:TextInput text="{contact.id}" enabled="false"/>
+ </mx:FormItem>
+ <mx:FormItem label="First Name">
+ <mx:TextInput id="firstName" text="{contact.firstName}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Last Name">
+ <mx:TextInput id="lastName" text="{contact.lastName}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Email">
+ <mx:TextInput id="email" text="{contact.email}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Phone">
+ <mx:TextInput id="phone" text="{contact.phone}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Address">
+ <mx:TextInput id="address" text="{contact.address}"/>
+ </mx:FormItem>
+ <mx:FormItem label="City">
+ <mx:TextInput id="city" text="{contact.city}"/>
+ </mx:FormItem>
+ <mx:FormItem label="State">
+ <mx:TextInput id="state" text="{contact.state}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Zip">
+ <mx:TextInput id="zip" text="{contact.zip}"/>
+ </mx:FormItem>
+ </mx:Form>
+
+ <s:HGroup left="8" bottom="8">
+ <s:Button label="Close" click="closeItem()"/>
+ <s:Button label="Save" click="save()"/>
+ <s:Button label="Delete" click="deleteItem()"/>
+ </s:HGroup>
+
+</mx:Canvas>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/insync05.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/insync05.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/insync05.mxml
new file mode 100755
index 0000000..1537bfa
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync05/src/insync05.mxml
@@ -0,0 +1,89 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:local="*">
+
+ <fx:Script>
+ <![CDATA[
+
+ import mx.collections.ArrayCollection;
+ import mx.controls.Alert;
+ import mx.rpc.events.FaultEvent;
+ import mx.rpc.events.ResultEvent;
+
+ [Bindable] private var contacts:ArrayCollection;
+
+ private function resultHandler(event:ResultEvent):void
+ {
+ contacts = event.result as ArrayCollection
+ }
+
+ private function faultHandler(event:FaultEvent):void
+ {
+ Alert.show(event.fault.faultDetail);
+ }
+
+ public function openContact(contact:Contact):void
+ {
+ var children:Array = tn.getChildren();
+ for (var i:int = 0; i<children.length; i++)
+ {
+ if (ContactForm(children[i]).contact.id == contact.id)
+ {
+ tn.selectedChild = children[i];
+ return;
+ }
+ }
+
+ var form:ContactForm = new ContactForm();
+ tn.addChild(form);
+ form.contact = contact;
+ tn.selectedChild = form;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <s:RemoteObject id="ro" destination="contactService" fault="faultHandler(event)" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
+ <s:method name="findByName" result="resultHandler(event)"/>
+ </s:RemoteObject>
+ </fx:Declarations>
+
+ <s:controlBarContent>
+ <s:TextInput id="searchStr"/>
+ <s:Button label="Search" click="ro.findByName(searchStr.text)"/>
+ <mx:Button label="New Contact" click="openContact(new Contact())"/>
+ </s:controlBarContent>
+
+ <mx:HDividedBox top="8" left="8" right="8" bottom="8">
+ <mx:DataGrid id="dg" dataProvider="{contacts}" width="30%" height="100%"
+ doubleClickEnabled="{dg.selectedItem != null}"
+ doubleClick="openContact(dg.selectedItem as Contact)">
+ <mx:columns>
+ <mx:DataGridColumn dataField="firstName" headerText="First Name"/>
+ <mx:DataGridColumn dataField="lastName" headerText="Last Name"/>
+ </mx:columns>
+ </mx:DataGrid>
+ <mx:TabNavigator id="tn" width="70%" height="100%"/>
+ </mx:HDividedBox>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.actionScriptProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.actionScriptProperties
new file mode 100755
index 0000000..f517d40
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.actionScriptProperties
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<actionScriptProperties mainApplicationPath="insync06.mxml" projectUUID="cef66dd7-3cb6-46e2-976f-96991d0b8b89" version="6">
+ <compiler additionalCompilerArguments="-locale en_US" autoRSLOrdering="true" copyDependentFiles="true" fteInMXComponents="false" generateAccessible="true" htmlExpressInstall="true" htmlGenerate="true" htmlHistoryManagement="true" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="bin-debug" sourceFolderPath="src" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" verifyDigests="true" warn="true">
+ <compilerSourcePath/>
+ <libraryPath defaultLinkType="0">
+ <libraryPathEntry kind="4" path="">
+ <excludedEntries>
+ <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
+ </excludedEntries>
+ </libraryPathEntry>
+ <libraryPathEntry kind="1" linkType="1" path="libs"/>
+ </libraryPath>
+ <sourceAttachmentPath/>
+ </compiler>
+ <applications>
+ <application path="insync06.mxml"/>
+ </applications>
+ <modules/>
+ <buildCSSFiles/>
+</actionScriptProperties>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.flexProperties
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.flexProperties b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.flexProperties
new file mode 100755
index 0000000..afc8269
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.flexProperties
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+
+ 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.
+
+-->
+<flexProperties enableServiceManager="false" flexServerFeatures="0" flexServerType="0" toolCompile="true" useServerFlexSDK="false" version="2"/>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.project
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.project b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.project
new file mode 100755
index 0000000..cc0807c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/.project
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+<projectDescription>
+ <name>insync06</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.adobe.flexbuilder.project.flexbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.adobe.flexbuilder.project.flexnature</nature>
+ <nature>com.adobe.flexbuilder.project.actionscriptnature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/build.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/build.xml b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/build.xml
new file mode 100755
index 0000000..aa57813
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/build.xml
@@ -0,0 +1,76 @@
+<?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-spring.war/build.xml" default="main" basedir="../../../../../">
+
+ <property environment="env" />
+ <property file="${basedir}/build.properties"/>
+ <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
+ <property name="context.root" value="samples-spring" />
+ <property name="application.name" value="insync06" />
+ <property name="application.file" value="insync06" />
+ <property name="application.bin.dir" value="${samples-spring.war}/insync06" />
+ <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/insync06/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-spring.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"
+ output="${application.bin.dir}"/>
+
+ </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" />
+ </delete>
+ </target>
+
+</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.css b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.css
new file mode 100755
index 0000000..8716330
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/insync06/html-template/history/history.css
@@ -0,0 +1,22 @@
+/*
+ * 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.
+ */
+/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
+
+#ie_historyFrame { width: 0px; height: 0px; display:none }
+#firefox_anchorDiv { width: 0px; height: 0px; display:none }
+#safari_formDiv { width: 0px; height: 0px; display:none }
+#safari_rememberDiv { width: 0px; height: 0px; display:none }
[45/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/build.xml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/build.xml b/apps/samples-spring/WEB-INF/flex-src/companymgr/build.xml
deleted file mode 100755
index 83a822e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?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-spring.war/build.xml" default="main" basedir="../../../../../">
-
- <property environment="env" />
- <property file="${basedir}/build.properties"/>
- <property name="samples-spring.war" value="${basedir}/apps/samples-spring"/>
- <property name="context.root" value="samples-spring" />
- <property name="application.name" value="companymgr" />
- <property name="application.file" value="companymgr" />
- <property name="application.bin.dir" value="${samples-spring.war}/companymgr" />
- <property name="application.src.dir" value="${samples-spring.war}/WEB-INF/flex-src/companymgr/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-spring.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"
- output="${application.bin.dir}"/>
-
- </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" />
- </delete>
- </target>
-
-</project>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.css
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.css b/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.css
deleted file mode 100755
index 4a7f791..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.css
+++ /dev/null
@@ -1,22 +0,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.
- */
-/* This CSS stylesheet defines styles used by required elements in a flex application page that supports browser history */
-
-#ie_historyFrame { width: 0px; height: 0px; display:none }
-#firefox_anchorDiv { width: 0px; height: 0px; display:none }
-#safari_formDiv { width: 0px; height: 0px; display:none }
-#safari_rememberDiv { width: 0px; height: 0px; display:none }
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.js b/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.js
deleted file mode 100755
index 0f82450..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/history.js
+++ /dev/null
@@ -1,722 +0,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.
- */
-BrowserHistoryUtils = {
- addEvent: function(elm, evType, fn, useCapture) {
- useCapture = useCapture || false;
- if (elm.addEventListener) {
- elm.addEventListener(evType, fn, useCapture);
- return true;
- }
- else if (elm.attachEvent) {
- var r = elm.attachEvent('on' + evType, fn);
- return r;
- }
- else {
- elm['on' + evType] = fn;
- }
- }
-}
-
-BrowserHistory = (function() {
- // type of browser
- var browser = {
- ie: false,
- ie8: false,
- firefox: false,
- safari: false,
- opera: false,
- version: -1
- };
-
- // if setDefaultURL has been called, our first clue
- // that the SWF is ready and listening
- //var swfReady = false;
-
- // the URL we'll send to the SWF once it is ready
- //var pendingURL = '';
-
- // Default app state URL to use when no fragment ID present
- var defaultHash = '';
-
- // Last-known app state URL
- var currentHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHref = document.location.href;
-
- // Initial URL (used only by IE)
- var initialHash = document.location.hash;
-
- // History frame source URL prefix (used only by IE)
- var historyFrameSourcePrefix = 'history/historyFrame.html?';
-
- // History maintenance (used only by Safari)
- var currentHistoryLength = -1;
-
- var historyHash = [];
-
- var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
-
- var backStack = [];
- var forwardStack = [];
-
- var currentObjectId = null;
-
- //UserAgent detection
- var useragent = navigator.userAgent.toLowerCase();
-
- if (useragent.indexOf("opera") != -1) {
- browser.opera = true;
- } else if (useragent.indexOf("msie") != -1) {
- browser.ie = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
- if (browser.version == 8)
- {
- browser.ie = false;
- browser.ie8 = true;
- }
- } else if (useragent.indexOf("safari") != -1) {
- browser.safari = true;
- browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
- } else if (useragent.indexOf("gecko") != -1) {
- browser.firefox = true;
- }
-
- if (browser.ie == true && browser.version == 7) {
- window["_ie_firstload"] = false;
- }
-
- function hashChangeHandler()
- {
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
-
- // Accessor functions for obtaining specific elements of the page.
- function getHistoryFrame()
- {
- return document.getElementById('ie_historyFrame');
- }
-
- function getAnchorElement()
- {
- return document.getElementById('firefox_anchorDiv');
- }
-
- function getFormElement()
- {
- return document.getElementById('safari_formDiv');
- }
-
- function getRememberElement()
- {
- return document.getElementById("safari_remember_field");
- }
-
- // Get the Flash player object for performing ExternalInterface callbacks.
- // Updated for changes to SWFObject2.
- function getPlayer(id) {
- var i;
-
- if (id && document.getElementById(id)) {
- var r = document.getElementById(id);
- if (typeof r.SetVariable != "undefined") {
- return r;
- }
- else {
- var o = r.getElementsByTagName("object");
- var e = r.getElementsByTagName("embed");
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- return o[i];
- }
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- return e[i];
- }
- }
- }
- else {
- var o = document.getElementsByTagName("object");
- var e = document.getElementsByTagName("embed");
- for (i = 0; i < e.length; i++) {
- if (typeof e[i].browserURLChange != "undefined")
- {
- return e[i];
- }
- }
- for (i = 0; i < o.length; i++) {
- if (typeof o[i].browserURLChange != "undefined")
- {
- return o[i];
- }
- }
- }
- return undefined;
- }
-
- function getPlayers() {
- var i;
- var players = [];
- if (players.length == 0) {
- var tmp = document.getElementsByTagName('object');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- if (players.length == 0 || players[0].object == null) {
- var tmp = document.getElementsByTagName('embed');
- for (i = 0; i < tmp.length; i++)
- {
- if (typeof tmp[i].browserURLChange != "undefined")
- players.push(tmp[i]);
- }
- }
- return players;
- }
-
- function getIframeHash() {
- var doc = getHistoryFrame().contentWindow.document;
- var hash = String(doc.location.search);
- if (hash.length == 1 && hash.charAt(0) == "?") {
- hash = "";
- }
- else if (hash.length >= 2 && hash.charAt(0) == "?") {
- hash = hash.substring(1);
- }
- return hash;
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function getHash() {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- var idx = document.location.href.indexOf('#');
- return (idx >= 0) ? document.location.href.substr(idx+1) : '';
- }
-
- /* Get the current location hash excluding the '#' symbol. */
- function setHash(hash) {
- // It would be nice if we could use document.location.hash here,
- // but it's faulty sometimes.
- if (hash == '') hash = '#'
- document.location.hash = hash;
- }
-
- function createState(baseUrl, newUrl, flexAppUrl) {
- return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
- }
-
- /* Add a history entry to the browser.
- * baseUrl: the portion of the location prior to the '#'
- * newUrl: the entire new URL, including '#' and following fragment
- * flexAppUrl: the portion of the location following the '#' only
- */
- function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
-
- //delete all the history entries
- forwardStack = [];
-
- if (browser.ie) {
- //Check to see if we are being asked to do a navigate for the first
- //history entry, and if so ignore, because it's coming from the creation
- //of the history iframe
- if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
- currentHref = initialHref;
- return;
- }
- if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
- newUrl = baseUrl + '#' + defaultHash;
- flexAppUrl = defaultHash;
- } else {
- // for IE, tell the history frame to go somewhere without a '#'
- // in order to get this entry into the browser history.
- getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
- }
- setHash(flexAppUrl);
- } else {
-
- //ADR
- if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
- initialState = createState(baseUrl, newUrl, flexAppUrl);
- } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
- backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
- }
-
- if (browser.safari) {
- // for Safari, submit a form whose action points to the desired URL
- if (browser.version <= 419.3) {
- var file = window.location.pathname.toString();
- file = file.substring(file.lastIndexOf("/")+1);
- getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
- //get the current elements and add them to the form
- var qs = window.location.search.substring(1);
- var qs_arr = qs.split("&");
- for (var i = 0; i < qs_arr.length; i++) {
- var tmp = qs_arr[i].split("=");
- var elem = document.createElement("input");
- elem.type = "hidden";
- elem.name = tmp[0];
- elem.value = tmp[1];
- document.forms.historyForm.appendChild(elem);
- }
- document.forms.historyForm.submit();
- } else {
- top.location.hash = flexAppUrl;
- }
- // We also have to maintain the history by hand for Safari
- historyHash[history.length] = flexAppUrl;
- _storeStates();
- } else {
- // Otherwise, write an anchor into the page and tell the browser to go there
- addAnchor(flexAppUrl);
- setHash(flexAppUrl);
- }
- }
- backStack.push(createState(baseUrl, newUrl, flexAppUrl));
- }
-
- function _storeStates() {
- if (browser.safari) {
- getRememberElement().value = historyHash.join(",");
- }
- }
-
- function handleBackButton() {
- //The "current" page is always at the top of the history stack.
- var current = backStack.pop();
- if (!current) { return; }
- var last = backStack[backStack.length - 1];
- if (!last && backStack.length == 0){
- last = initialState;
- }
- forwardStack.push(current);
- }
-
- function handleForwardButton() {
- //summary: private method. Do not call this directly.
-
- var last = forwardStack.pop();
- if (!last) { return; }
- backStack.push(last);
- }
-
- function handleArbitraryUrl() {
- //delete all the history entries
- forwardStack = [];
- }
-
- /* Called periodically to poll to see if we need to detect navigation that has occurred */
- function checkForUrlChange() {
-
- if (browser.ie) {
- if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
- //This occurs when the user has navigated to a specific URL
- //within the app, and didn't use browser back/forward
- //IE seems to have a bug where it stops updating the URL it
- //shows the end-user at this point, but programatically it
- //appears to be correct. Do a full app reload to get around
- //this issue.
- if (browser.version < 7) {
- currentHref = document.location.href;
- document.location.reload();
- } else {
- if (getHash() != getIframeHash()) {
- // this.iframe.src = this.blankURL + hash;
- var sourceToSet = historyFrameSourcePrefix + getHash();
- getHistoryFrame().src = sourceToSet;
- currentHref = document.location.href;
- }
- }
- }
- }
-
- if (browser.safari) {
- // For Safari, we have to check to see if history.length changed.
- if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
- //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
- var flexAppUrl = getHash();
- if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
- {
- // If it did change and we're running Safari 3.x or earlier,
- // then we have to look the old state up in our hand-maintained
- // array since document.location.hash won't have changed,
- // then call back into BrowserManager.
- currentHistoryLength = history.length;
- flexAppUrl = historyHash[currentHistoryLength];
- }
-
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- _storeStates();
- }
- }
- if (browser.firefox) {
- if (currentHref != document.location.href) {
- var bsl = backStack.length;
-
- var urlActions = {
- back: false,
- forward: false,
- set: false
- }
-
- if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
- urlActions.back = true;
- // FIXME: could this ever be a forward button?
- // we can't clear it because we still need to check for forwards. Ugg.
- // clearInterval(this.locationTimer);
- handleBackButton();
- }
-
- // first check to see if we could have gone forward. We always halt on
- // a no-hash item.
- if (forwardStack.length > 0) {
- if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
- urlActions.forward = true;
- handleForwardButton();
- }
- }
-
- // ok, that didn't work, try someplace back in the history stack
- if ((bsl >= 2) && (backStack[bsl - 2])) {
- if (backStack[bsl - 2].flexAppUrl == getHash()) {
- urlActions.back = true;
- handleBackButton();
- }
- }
-
- if (!urlActions.back && !urlActions.forward) {
- var foundInStacks = {
- back: -1,
- forward: -1
- }
-
- for (var i = 0; i < backStack.length; i++) {
- if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.back = i;
- }
- }
- for (var i = 0; i < forwardStack.length; i++) {
- if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
- arbitraryUrl = true;
- foundInStacks.forward = i;
- }
- }
- handleArbitraryUrl();
- }
-
- // Firefox changed; do a callback into BrowserManager to tell it.
- currentHref = document.location.href;
- var flexAppUrl = getHash();
- //ADR: to fix multiple
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- pl[i].browserURLChange(flexAppUrl);
- }
- } else {
- getPlayer().browserURLChange(flexAppUrl);
- }
- }
- }
- //setTimeout(checkForUrlChange, 50);
- }
-
- /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
- function addAnchor(flexAppUrl)
- {
- if (document.getElementsByName(flexAppUrl).length == 0) {
- getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
- }
- }
-
- var _initialize = function () {
- if (browser.ie)
- {
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
- }
- }
- historyFrameSourcePrefix = iframe_location + "?";
- var src = historyFrameSourcePrefix;
-
- var iframe = document.createElement("iframe");
- iframe.id = 'ie_historyFrame';
- iframe.name = 'ie_historyFrame';
- iframe.src = 'javascript:false;';
-
- try {
- document.body.appendChild(iframe);
- } catch(e) {
- setTimeout(function() {
- document.body.appendChild(iframe);
- }, 0);
- }
- }
-
- if (browser.safari)
- {
- var rememberDiv = document.createElement("div");
- rememberDiv.id = 'safari_rememberDiv';
- document.body.appendChild(rememberDiv);
- rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
-
- var formDiv = document.createElement("div");
- formDiv.id = 'safari_formDiv';
- document.body.appendChild(formDiv);
-
- var reloader_content = document.createElement('div');
- reloader_content.id = 'safarireloader';
- var scripts = document.getElementsByTagName('script');
- for (var i = 0, s; s = scripts[i]; i++) {
- if (s.src.indexOf("history.js") > -1) {
- html = (new String(s.src)).replace(".js", ".html");
- }
- }
- reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
- document.body.appendChild(reloader_content);
- reloader_content.style.position = 'absolute';
- reloader_content.style.left = reloader_content.style.top = '-9999px';
- iframe = reloader_content.getElementsByTagName('iframe')[0];
-
- if (document.getElementById("safari_remember_field").value != "" ) {
- historyHash = document.getElementById("safari_remember_field").value.split(",");
- }
-
- }
-
- if (browser.firefox || browser.ie8)
- {
- var anchorDiv = document.createElement("div");
- anchorDiv.id = 'firefox_anchorDiv';
- document.body.appendChild(anchorDiv);
- }
-
- if (browser.ie8)
- document.body.onhashchange = hashChangeHandler;
- //setTimeout(checkForUrlChange, 50);
- }
-
- return {
- historyHash: historyHash,
- backStack: function() { return backStack; },
- forwardStack: function() { return forwardStack },
- getPlayer: getPlayer,
- initialize: function(src) {
- _initialize(src);
- },
- setURL: function(url) {
- document.location.href = url;
- },
- getURL: function() {
- return document.location.href;
- },
- getTitle: function() {
- return document.title;
- },
- setTitle: function(title) {
- try {
- backStack[backStack.length - 1].title = title;
- } catch(e) { }
- //if on safari, set the title to be the empty string.
- if (browser.safari) {
- if (title == "") {
- try {
- var tmp = window.location.href.toString();
- title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
- } catch(e) {
- title = "";
- }
- }
- }
- document.title = title;
- },
- setDefaultURL: function(def)
- {
- defaultHash = def;
- def = getHash();
- //trailing ? is important else an extra frame gets added to the history
- //when navigating back to the first page. Alternatively could check
- //in history frame navigation to compare # and ?.
- if (browser.ie)
- {
- window['_ie_firstload'] = true;
- var sourceToSet = historyFrameSourcePrefix + def;
- var func = function() {
- getHistoryFrame().src = sourceToSet;
- window.location.replace("#" + def);
- setInterval(checkForUrlChange, 50);
- }
- try {
- func();
- } catch(e) {
- window.setTimeout(function() { func(); }, 0);
- }
- }
-
- if (browser.safari)
- {
- currentHistoryLength = history.length;
- if (historyHash.length == 0) {
- historyHash[currentHistoryLength] = def;
- var newloc = "#" + def;
- window.location.replace(newloc);
- } else {
- //alert(historyHash[historyHash.length-1]);
- }
- //setHash(def);
- setInterval(checkForUrlChange, 50);
- }
-
-
- if (browser.firefox || browser.opera)
- {
- var reg = new RegExp("#" + def + "$");
- if (window.location.toString().match(reg)) {
- } else {
- var newloc ="#" + def;
- window.location.replace(newloc);
- }
- setInterval(checkForUrlChange, 50);
- //setHash(def);
- }
-
- },
-
- /* Set the current browser URL; called from inside BrowserManager to propagate
- * the application state out to the container.
- */
- setBrowserURL: function(flexAppUrl, objectId) {
- if (browser.ie && typeof objectId != "undefined") {
- currentObjectId = objectId;
- }
- //fromIframe = fromIframe || false;
- //fromFlex = fromFlex || false;
- //alert("setBrowserURL: " + flexAppUrl);
- //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
-
- var pos = document.location.href.indexOf('#');
- var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
- var newUrl = baseUrl + '#' + flexAppUrl;
-
- if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
- currentHref = newUrl;
- addHistoryEntry(baseUrl, newUrl, flexAppUrl);
- currentHistoryLength = history.length;
- }
- },
-
- browserURLChange: function(flexAppUrl) {
- var objectId = null;
- if (browser.ie && currentObjectId != null) {
- objectId = currentObjectId;
- }
- pendingURL = '';
-
- if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
- var pl = getPlayers();
- for (var i = 0; i < pl.length; i++) {
- try {
- pl[i].browserURLChange(flexAppUrl);
- } catch(e) { }
- }
- } else {
- try {
- getPlayer(objectId).browserURLChange(flexAppUrl);
- } catch(e) { }
- }
-
- currentObjectId = null;
- },
- getUserAgent: function() {
- return navigator.userAgent;
- },
- getPlatform: function() {
- return navigator.platform;
- }
-
- }
-
-})();
-
-// Initialization
-
-// Automated unit testing and other diagnostics
-
-function setURL(url)
-{
- document.location.href = url;
-}
-
-function backButton()
-{
- history.back();
-}
-
-function forwardButton()
-{
- history.forward();
-}
-
-function goForwardOrBackInHistory(step)
-{
- history.go(step);
-}
-
-//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
-(function(i) {
- var u =navigator.userAgent;var e=/*@cc_on!@*/false;
- var st = setTimeout;
- if(/webkit/i.test(u)){
- st(function(){
- var dr=document.readyState;
- if(dr=="loaded"||dr=="complete"){i()}
- else{st(arguments.callee,10);}},10);
- } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
- document.addEventListener("DOMContentLoaded",i,false);
- } else if(e){
- (function(){
- var t=document.createElement('doc:rdy');
- try{t.doScroll('left');
- i();t=null;
- }catch(e){st(arguments.callee,0);}})();
- } else{
- window.onload=i;
- }
-})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/historyFrame.html b/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/historyFrame.html
deleted file mode 100755
index 63bdd3e..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/history/historyFrame.html
+++ /dev/null
@@ -1,45 +0,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.
--->
-<html>
- <head>
- <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
- <META HTTP-EQUIV="Expires" CONTENT="-1">
- </head>
- <body>
- <script>
- function processUrl()
- {
-
- var pos = url.indexOf("?");
- url = pos != -1 ? url.substr(pos + 1) : "";
- if (!parent._ie_firstload) {
- parent.BrowserHistory.setBrowserURL(url);
- try {
- parent.BrowserHistory.browserURLChange(url);
- } catch(e) { }
- } else {
- parent._ie_firstload = false;
- }
- }
-
- var url = document.location.href;
- processUrl();
- document.write(encodeURIComponent(url));
- </script>
- Hidden frame for Browser History support.
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/index.template.html b/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/index.template.html
deleted file mode 100755
index e3e9c81..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/index.template.html
+++ /dev/null
@@ -1,121 +0,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.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<!-- saved from url=(0014)about:internet -->
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- <!--
- Smart developers always View Source.
-
- This application was built using Adobe Flex, an open source framework
- for building rich Internet applications that get delivered via the
- Flash Player or to desktops via Adobe AIR.
-
- Learn more about Flex at http://flex.org
- // -->
- <head>
- <title>${title}</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
- the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
- the percentage of the height of its parent container, which has to be set explicitly. Initially,
- don't display flashContent div so it won't show if JavaScript disabled.
- -->
- <style type="text/css" media="screen">
- html, body { height:100%; }
- body { margin:0; padding:0; overflow:auto; text-align:center;
- background-color: ${bgcolor}; }
- #flashContent { display:none; }
- </style>
-
- <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
- <!-- BEGIN Browser History required section ${useBrowserHistory}>
- <link rel="stylesheet" type="text/css" href="history/history.css" />
- <script type="text/javascript" src="history/history.js"></script>
- <!${useBrowserHistory} END Browser History required section -->
-
- <script type="text/javascript" src="swfobject.js"></script>
- <script type="text/javascript">
- <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
- var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
- <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
- var xiSwfUrlStr = "${expressInstallSwf}";
- var flashvars = {};
- var params = {};
- params.quality = "high";
- params.bgcolor = "${bgcolor}";
- params.allowscriptaccess = "sameDomain";
- params.allowfullscreen = "true";
- var attributes = {};
- attributes.id = "${application}";
- attributes.name = "${application}";
- attributes.align = "middle";
- swfobject.embedSWF(
- "${swf}.swf", "flashContent",
- "${width}", "${height}",
- swfVersionStr, xiSwfUrlStr,
- flashvars, params, attributes);
- <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
- swfobject.createCSS("#flashContent", "display:block;text-align:left;");
- </script>
- </head>
- <body>
- <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
- JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
- when JavaScript is disabled.
- -->
- <div id="flashContent">
- <p>
- To view this page ensure that Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is installed.
- </p>
- <script type="text/javascript">
- var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
- document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
- + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
- </script>
- </div>
-
- <noscript>
- <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
- <param name="movie" value="${swf}.swf" />
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--[if !IE]>-->
- <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
- <param name="quality" value="high" />
- <param name="bgcolor" value="${bgcolor}" />
- <param name="allowScriptAccess" value="sameDomain" />
- <param name="allowFullScreen" value="true" />
- <!--<![endif]-->
- <!--[if gte IE 6]>-->
- <p>
- Either scripts and active content are not permitted to run or Adobe Flash Player version
- ${version_major}.${version_minor}.${version_revision} or greater is not installed.
- </p>
- <!--<![endif]-->
- <a href="http://www.adobe.com/go/getflashplayer">
- <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
- </a>
- <!--[if !IE]>-->
- </object>
- <!--<![endif]-->
- </object>
- </noscript>
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/swfobject.js b/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/swfobject.js
deleted file mode 100755
index 07730fa..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/html-template/swfobject.js
+++ /dev/null
@@ -1,793 +0,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.
- */
-/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
- is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
-*/
-
-var swfobject = function() {
-
- var UNDEF = "undefined",
- OBJECT = "object",
- SHOCKWAVE_FLASH = "Shockwave Flash",
- SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
- FLASH_MIME_TYPE = "application/x-shockwave-flash",
- EXPRESS_INSTALL_ID = "SWFObjectExprInst",
- ON_READY_STATE_CHANGE = "onreadystatechange",
-
- win = window,
- doc = document,
- nav = navigator,
-
- plugin = false,
- domLoadFnArr = [main],
- regObjArr = [],
- objIdArr = [],
- listenersArr = [],
- storedAltContent,
- storedAltContentId,
- storedCallbackFn,
- storedCallbackObj,
- isDomLoaded = false,
- isExpressInstallActive = false,
- dynamicStylesheet,
- dynamicStylesheetMedia,
- autoHideShow = true,
-
- /* Centralized function for browser feature detection
- - User agent string detection is only used when no good alternative is possible
- - Is executed directly for optimal performance
- */
- ua = function() {
- var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
- u = nav.userAgent.toLowerCase(),
- p = nav.platform.toLowerCase(),
- windows = p ? /win/.test(p) : /win/.test(u),
- mac = p ? /mac/.test(p) : /mac/.test(u),
- webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
- ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
- playerVersion = [0,0,0],
- d = null;
- if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
- d = nav.plugins[SHOCKWAVE_FLASH].description;
- if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
- plugin = true;
- ie = false; // cascaded feature detection for Internet Explorer
- d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
- playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
- playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
- playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
- }
- }
- else if (typeof win.ActiveXObject != UNDEF) {
- try {
- var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
- if (a) { // a will return null when ActiveX is disabled
- d = a.GetVariable("$version");
- if (d) {
- ie = true; // cascaded feature detection for Internet Explorer
- d = d.split(" ")[1].split(",");
- playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- }
- catch(e) {}
- }
- return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
- }(),
-
- /* Cross-browser onDomLoad
- - Will fire an event as soon as the DOM of a web page is loaded
- - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- - Regular onload serves as fallback
- */
- onDomLoad = function() {
- if (!ua.w3) { return; }
- if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
- callDomLoadFunctions();
- }
- if (!isDomLoaded) {
- if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
- }
- if (ua.ie && ua.win) {
- doc.attachEvent(ON_READY_STATE_CHANGE, function() {
- if (doc.readyState == "complete") {
- doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
- callDomLoadFunctions();
- }
- });
- if (win == top) { // if not inside an iframe
- (function(){
- if (isDomLoaded) { return; }
- try {
- doc.documentElement.doScroll("left");
- }
- catch(e) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- }
- if (ua.wk) {
- (function(){
- if (isDomLoaded) { return; }
- if (!/loaded|complete/.test(doc.readyState)) {
- setTimeout(arguments.callee, 0);
- return;
- }
- callDomLoadFunctions();
- })();
- }
- addLoadEvent(callDomLoadFunctions);
- }
- }();
-
- function callDomLoadFunctions() {
- if (isDomLoaded) { return; }
- try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
- var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
- t.parentNode.removeChild(t);
- }
- catch (e) { return; }
- isDomLoaded = true;
- var dl = domLoadFnArr.length;
- for (var i = 0; i < dl; i++) {
- domLoadFnArr[i]();
- }
- }
-
- function addDomLoadEvent(fn) {
- if (isDomLoaded) {
- fn();
- }
- else {
- domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
- }
- }
-
- /* Cross-browser onload
- - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- - Will fire an event as soon as a web page including all of its assets are loaded
- */
- function addLoadEvent(fn) {
- if (typeof win.addEventListener != UNDEF) {
- win.addEventListener("load", fn, false);
- }
- else if (typeof doc.addEventListener != UNDEF) {
- doc.addEventListener("load", fn, false);
- }
- else if (typeof win.attachEvent != UNDEF) {
- addListener(win, "onload", fn);
- }
- else if (typeof win.onload == "function") {
- var fnOld = win.onload;
- win.onload = function() {
- fnOld();
- fn();
- };
- }
- else {
- win.onload = fn;
- }
- }
-
- /* Main function
- - Will preferably execute onDomLoad, otherwise onload (as a fallback)
- */
- function main() {
- if (plugin) {
- testPlayerVersion();
- }
- else {
- matchVersions();
- }
- }
-
- /* Detect the Flash Player version for non-Internet Explorer browsers
- - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
- a. Both release and build numbers can be detected
- b. Avoid wrong descriptions by corrupt installers provided by Adobe
- c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
- */
- function testPlayerVersion() {
- var b = doc.getElementsByTagName("body")[0];
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- var t = b.appendChild(o);
- if (t) {
- var counter = 0;
- (function(){
- if (typeof t.GetVariable != UNDEF) {
- var d = t.GetVariable("$version");
- if (d) {
- d = d.split(" ")[1].split(",");
- ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
- }
- }
- else if (counter < 10) {
- counter++;
- setTimeout(arguments.callee, 10);
- return;
- }
- b.removeChild(o);
- t = null;
- matchVersions();
- })();
- }
- else {
- matchVersions();
- }
- }
-
- /* Perform Flash Player and SWF version matching; static publishing only
- */
- function matchVersions() {
- var rl = regObjArr.length;
- if (rl > 0) {
- for (var i = 0; i < rl; i++) { // for each registered object element
- var id = regObjArr[i].id;
- var cb = regObjArr[i].callbackFn;
- var cbObj = {success:false, id:id};
- if (ua.pv[0] > 0) {
- var obj = getElementById(id);
- if (obj) {
- if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
- setVisibility(id, true);
- if (cb) {
- cbObj.success = true;
- cbObj.ref = getObjectById(id);
- cb(cbObj);
- }
- }
- else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
- var att = {};
- att.data = regObjArr[i].expressInstall;
- att.width = obj.getAttribute("width") || "0";
- att.height = obj.getAttribute("height") || "0";
- if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
- if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
- // parse HTML object param element's name-value pairs
- var par = {};
- var p = obj.getElementsByTagName("param");
- var pl = p.length;
- for (var j = 0; j < pl; j++) {
- if (p[j].getAttribute("name").toLowerCase() != "movie") {
- par[p[j].getAttribute("name")] = p[j].getAttribute("value");
- }
- }
- showExpressInstall(att, par, id, cb);
- }
- else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
- displayAltContent(obj);
- if (cb) { cb(cbObj); }
- }
- }
- }
- else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
- setVisibility(id, true);
- if (cb) {
- var o = getObjectById(id); // test whether there is an HTML object element or not
- if (o && typeof o.SetVariable != UNDEF) {
- cbObj.success = true;
- cbObj.ref = o;
- }
- cb(cbObj);
- }
- }
- }
- }
- }
-
- function getObjectById(objectIdStr) {
- var r = null;
- var o = getElementById(objectIdStr);
- if (o && o.nodeName == "OBJECT") {
- if (typeof o.SetVariable != UNDEF) {
- r = o;
- }
- else {
- var n = o.getElementsByTagName(OBJECT)[0];
- if (n) {
- r = n;
- }
- }
- }
- return r;
- }
-
- /* Requirements for Adobe Express Install
- - only one instance can be active at a time
- - fp 6.0.65 or higher
- - Win/Mac OS only
- - no Webkit engines older than version 312
- */
- function canExpressInstall() {
- return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
- }
-
- /* Show the Adobe Express Install dialog
- - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
- */
- function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
- isExpressInstallActive = true;
- storedCallbackFn = callbackFn || null;
- storedCallbackObj = {success:false, id:replaceElemIdStr};
- var obj = getElementById(replaceElemIdStr);
- if (obj) {
- if (obj.nodeName == "OBJECT") { // static publishing
- storedAltContent = abstractAltContent(obj);
- storedAltContentId = null;
- }
- else { // dynamic publishing
- storedAltContent = obj;
- storedAltContentId = replaceElemIdStr;
- }
- att.id = EXPRESS_INSTALL_ID;
- if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
- if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
- doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
- var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
- fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + fv;
- }
- else {
- par.flashvars = fv;
- }
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- if (ua.ie && ua.win && obj.readyState != 4) {
- var newObj = createElement("div");
- replaceElemIdStr += "SWFObjectNew";
- newObj.setAttribute("id", replaceElemIdStr);
- obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- createSWF(att, par, replaceElemIdStr);
- }
- }
-
- /* Functions to abstract and display alternative content
- */
- function displayAltContent(obj) {
- if (ua.ie && ua.win && obj.readyState != 4) {
- // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
- // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
- var el = createElement("div");
- obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
- el.parentNode.replaceChild(abstractAltContent(obj), el);
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- obj.parentNode.removeChild(obj);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.replaceChild(abstractAltContent(obj), obj);
- }
- }
-
- function abstractAltContent(obj) {
- var ac = createElement("div");
- if (ua.win && ua.ie) {
- ac.innerHTML = obj.innerHTML;
- }
- else {
- var nestedObj = obj.getElementsByTagName(OBJECT)[0];
- if (nestedObj) {
- var c = nestedObj.childNodes;
- if (c) {
- var cl = c.length;
- for (var i = 0; i < cl; i++) {
- if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
- ac.appendChild(c[i].cloneNode(true));
- }
- }
- }
- }
- }
- return ac;
- }
-
- /* Cross-browser dynamic SWF creation
- */
- function createSWF(attObj, parObj, id) {
- var r, el = getElementById(id);
- if (ua.wk && ua.wk < 312) { return r; }
- if (el) {
- if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
- attObj.id = id;
- }
- if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
- var att = "";
- for (var i in attObj) {
- if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
- if (i.toLowerCase() == "data") {
- parObj.movie = attObj[i];
- }
- else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- att += ' class="' + attObj[i] + '"';
- }
- else if (i.toLowerCase() != "classid") {
- att += ' ' + i + '="' + attObj[i] + '"';
- }
- }
- }
- var par = "";
- for (var j in parObj) {
- if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
- par += '<param name="' + j + '" value="' + parObj[j] + '" />';
- }
- }
- el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
- objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
- r = getElementById(attObj.id);
- }
- else { // well-behaving browsers
- var o = createElement(OBJECT);
- o.setAttribute("type", FLASH_MIME_TYPE);
- for (var m in attObj) {
- if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
- if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
- o.setAttribute("class", attObj[m]);
- }
- else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
- o.setAttribute(m, attObj[m]);
- }
- }
- }
- for (var n in parObj) {
- if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
- createObjParam(o, n, parObj[n]);
- }
- }
- el.parentNode.replaceChild(o, el);
- r = o;
- }
- }
- return r;
- }
-
- function createObjParam(el, pName, pValue) {
- var p = createElement("param");
- p.setAttribute("name", pName);
- p.setAttribute("value", pValue);
- el.appendChild(p);
- }
-
- /* Cross-browser SWF removal
- - Especially needed to safely and completely remove a SWF in Internet Explorer
- */
- function removeSWF(id) {
- var obj = getElementById(id);
- if (obj && obj.nodeName == "OBJECT") {
- if (ua.ie && ua.win) {
- obj.style.display = "none";
- (function(){
- if (obj.readyState == 4) {
- removeObjectInIE(id);
- }
- else {
- setTimeout(arguments.callee, 10);
- }
- })();
- }
- else {
- obj.parentNode.removeChild(obj);
- }
- }
- }
-
- function removeObjectInIE(id) {
- var obj = getElementById(id);
- if (obj) {
- for (var i in obj) {
- if (typeof obj[i] == "function") {
- obj[i] = null;
- }
- }
- obj.parentNode.removeChild(obj);
- }
- }
-
- /* Functions to optimize JavaScript compression
- */
- function getElementById(id) {
- var el = null;
- try {
- el = doc.getElementById(id);
- }
- catch (e) {}
- return el;
- }
-
- function createElement(el) {
- return doc.createElement(el);
- }
-
- /* Updated attachEvent function for Internet Explorer
- - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
- */
- function addListener(target, eventType, fn) {
- target.attachEvent(eventType, fn);
- listenersArr[listenersArr.length] = [target, eventType, fn];
- }
-
- /* Flash Player and SWF content version matching
- */
- function hasPlayerVersion(rv) {
- var pv = ua.pv, v = rv.split(".");
- v[0] = parseInt(v[0], 10);
- v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
- v[2] = parseInt(v[2], 10) || 0;
- return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
- }
-
- /* Cross-browser dynamic CSS creation
- - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
- */
- function createCSS(sel, decl, media, newStyle) {
- if (ua.ie && ua.mac) { return; }
- var h = doc.getElementsByTagName("head")[0];
- if (!h) { return; } // to also support badly authored HTML pages that lack a head element
- var m = (media && typeof media == "string") ? media : "screen";
- if (newStyle) {
- dynamicStylesheet = null;
- dynamicStylesheetMedia = null;
- }
- if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
- // create dynamic stylesheet + get a global reference to it
- var s = createElement("style");
- s.setAttribute("type", "text/css");
- s.setAttribute("media", m);
- dynamicStylesheet = h.appendChild(s);
- if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
- dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
- }
- dynamicStylesheetMedia = m;
- }
- // add style rule
- if (ua.ie && ua.win) {
- if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
- dynamicStylesheet.addRule(sel, decl);
- }
- }
- else {
- if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
- dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
- }
- }
- }
-
- function setVisibility(id, isVisible) {
- if (!autoHideShow) { return; }
- var v = isVisible ? "visible" : "hidden";
- if (isDomLoaded && getElementById(id)) {
- getElementById(id).style.visibility = v;
- }
- else {
- createCSS("#" + id, "visibility:" + v);
- }
- }
-
- /* Filter to avoid XSS attacks
- */
- function urlEncodeIfNecessary(s) {
- var regex = /[\\\"<>\.;]/;
- var hasBadChars = regex.exec(s) != null;
- return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
- }
-
- /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
- */
- var cleanup = function() {
- if (ua.ie && ua.win) {
- window.attachEvent("onunload", function() {
- // remove listeners to avoid memory leaks
- var ll = listenersArr.length;
- for (var i = 0; i < ll; i++) {
- listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
- }
- // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
- var il = objIdArr.length;
- for (var j = 0; j < il; j++) {
- removeSWF(objIdArr[j]);
- }
- // cleanup library's main closures to avoid memory leaks
- for (var k in ua) {
- ua[k] = null;
- }
- ua = null;
- for (var l in swfobject) {
- swfobject[l] = null;
- }
- swfobject = null;
- });
- }
- }();
-
- return {
- /* Public API
- - Reference: http://code.google.com/p/swfobject/wiki/documentation
- */
- registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
- if (ua.w3 && objectIdStr && swfVersionStr) {
- var regObj = {};
- regObj.id = objectIdStr;
- regObj.swfVersion = swfVersionStr;
- regObj.expressInstall = xiSwfUrlStr;
- regObj.callbackFn = callbackFn;
- regObjArr[regObjArr.length] = regObj;
- setVisibility(objectIdStr, false);
- }
- else if (callbackFn) {
- callbackFn({success:false, id:objectIdStr});
- }
- },
-
- getObjectById: function(objectIdStr) {
- if (ua.w3) {
- return getObjectById(objectIdStr);
- }
- },
-
- embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
- var callbackObj = {success:false, id:replaceElemIdStr};
- if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
- setVisibility(replaceElemIdStr, false);
- addDomLoadEvent(function() {
- widthStr += ""; // auto-convert to string
- heightStr += "";
- var att = {};
- if (attObj && typeof attObj === OBJECT) {
- for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
- att[i] = attObj[i];
- }
- }
- att.data = swfUrlStr;
- att.width = widthStr;
- att.height = heightStr;
- var par = {};
- if (parObj && typeof parObj === OBJECT) {
- for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
- par[j] = parObj[j];
- }
- }
- if (flashvarsObj && typeof flashvarsObj === OBJECT) {
- for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
- if (typeof par.flashvars != UNDEF) {
- par.flashvars += "&" + k + "=" + flashvarsObj[k];
- }
- else {
- par.flashvars = k + "=" + flashvarsObj[k];
- }
- }
- }
- if (hasPlayerVersion(swfVersionStr)) { // create SWF
- var obj = createSWF(att, par, replaceElemIdStr);
- if (att.id == replaceElemIdStr) {
- setVisibility(replaceElemIdStr, true);
- }
- callbackObj.success = true;
- callbackObj.ref = obj;
- }
- else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
- att.data = xiSwfUrlStr;
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- return;
- }
- else { // show alternative content
- setVisibility(replaceElemIdStr, true);
- }
- if (callbackFn) { callbackFn(callbackObj); }
- });
- }
- else if (callbackFn) { callbackFn(callbackObj); }
- },
-
- switchOffAutoHideShow: function() {
- autoHideShow = false;
- },
-
- ua: ua,
-
- getFlashPlayerVersion: function() {
- return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
- },
-
- hasFlashPlayerVersion: hasPlayerVersion,
-
- createSWF: function(attObj, parObj, replaceElemIdStr) {
- if (ua.w3) {
- return createSWF(attObj, parObj, replaceElemIdStr);
- }
- else {
- return undefined;
- }
- },
-
- showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
- if (ua.w3 && canExpressInstall()) {
- showExpressInstall(att, par, replaceElemIdStr, callbackFn);
- }
- },
-
- removeSWF: function(objElemIdStr) {
- if (ua.w3) {
- removeSWF(objElemIdStr);
- }
- },
-
- createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
- if (ua.w3) {
- createCSS(selStr, declStr, mediaStr, newStyleBoolean);
- }
- },
-
- addDomLoadEvent: addDomLoadEvent,
-
- addLoadEvent: addLoadEvent,
-
- getQueryParamValue: function(param) {
- var q = doc.location.search || doc.location.hash;
- if (q) {
- if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
- if (param == null) {
- return urlEncodeIfNecessary(q);
- }
- var pairs = q.split("&");
- for (var i = 0; i < pairs.length; i++) {
- if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
- return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
- }
- }
- }
- return "";
- },
-
- // For internal usage only
- expressInstallCallback: function() {
- if (isExpressInstallActive) {
- var obj = getElementById(EXPRESS_INSTALL_ID);
- if (obj && storedAltContent) {
- obj.parentNode.replaceChild(storedAltContent, obj);
- if (storedAltContentId) {
- setVisibility(storedAltContentId, true);
- if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
- }
- if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
- }
- isExpressInstallActive = false;
- }
- }
- };
-}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/src/BindableComboBox.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/BindableComboBox.as b/apps/samples-spring/WEB-INF/flex-src/companymgr/src/BindableComboBox.as
deleted file mode 100755
index 6749a38..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/BindableComboBox.as
+++ /dev/null
@@ -1,73 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- import flash.events.Event;
-
- import mx.collections.IList;
- import mx.events.CollectionEvent;
-
- import spark.components.ComboBox;
-
- public class BindableComboBox extends ComboBox
- {
- private var _value:Object;
-
- public var valueField:String = "data";
-
- public function set value(value:Object):void
- {
- _value = value;
- selectIndex();
- }
-
- public function get value():Object
- {
- return selectedItem[valueField];
- }
-
- override public function set dataProvider(dataProvider:IList):void
- {
- super.dataProvider = dataProvider;
- dataProvider.addEventListener(CollectionEvent.COLLECTION_CHANGE,
- function(event:Event):void
- {
- selectIndex();
- });
- selectIndex();
- }
-
- private function selectIndex():void
- {
- if (!_value || !dataProvider)
- {
- return;
- }
- for (var i:int = 0; i < dataProvider.length; i++)
- {
- if (_value == dataProvider[i][valueField])
- {
- selectedIndex = i;
- return;
- }
- }
- }
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Company.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Company.as b/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Company.as
deleted file mode 100755
index 234f2be..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Company.as
+++ /dev/null
@@ -1,34 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- [Bindable]
- [RemoteClass(alias="org.springframework.flex.samples.company.Company")]
- public class Company
- {
- public var id:int = -1;
- public var name:String;
- public var address:String;
- public var city:String;
- public var state:String;
- public var zip:String;
- public var phone:String;
- public var industry:Industry;
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyEvent.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyEvent.as b/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyEvent.as
deleted file mode 100755
index c1157ae..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyEvent.as
+++ /dev/null
@@ -1,37 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- import flash.events.Event;
-
- public class CompanyEvent extends Event
- {
- public static const CREATED:String = "companyCreated";
- public static const UPDATED:String = "companyUpdated";
- public static const DELETED:String = "companyDeleted";
-
- public var company:Company;
-
- public function CompanyEvent(type:String, company:Company, bubbles:Boolean = true, cancelable:Boolean = false)
- {
- this.company = company;
- super(type, bubbles, cancelable);
- }
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyForm.mxml
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyForm.mxml b/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyForm.mxml
deleted file mode 100755
index e3b4bb8..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/CompanyForm.mxml
+++ /dev/null
@@ -1,156 +0,0 @@
-<?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:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%"
- label="{company.id>-1?company.name:'New Company'}" xmlns:local="*">
-
- <fx:Metadata>
- [Event(name="companyCreated", type="CompanyEvent")]
- [Event(name="companyUpdated", type="CompanyEvent")]
- [Event(name="companyDeleted", type="CompanyEvent")]
- </fx:Metadata>
-
- <fx:Script>
- <![CDATA[
-
- import mx.collections.ArrayCollection;
- import mx.controls.Alert;
- import mx.rpc.Fault;
- import mx.rpc.events.FaultEvent;
- import mx.rpc.events.ResultEvent;
-
- [Bindable] public var company:Company;
- [Bindable] public var industries:ArrayCollection;
-
- private function save():void
- {
- company.name = companyName.text;
- company.address = address.text;
- company.city = city.text;
- company.state = state.text;
- company.zip = zip.text;
- company.phone = phone.text;
- company.industry = industry.selectedItem as Industry;
- if (company.industry == null)
- {
- Alert.show("Please enter/choose an industry from the dropdown for the operation to be successful.", "Save Company");
- }
- else
- {
- if (company.id == -1)
- {
- ro.create(company);
- }
- else
- {
- ro.update(company);
- }
- }
- }
- private function deleteItem():void
- {
- ro.remove(company);
- }
-
- private function closeItem():void
- {
- parent.removeChild(this);
- }
-
- private function create_resultHandler(event:ResultEvent):void
- {
- company.id = event.result.id;
- dispatchEvent(new CompanyEvent(CompanyEvent.CREATED, company));
- }
-
- private function update_resultHandler(event:ResultEvent):void
- {
- dispatchEvent(new CompanyEvent(CompanyEvent.UPDATED, company));
- }
-
- private function remove_resultHandler(event:ResultEvent):void
- {
- dispatchEvent(new CompanyEvent(CompanyEvent.DELETED, company));
- }
-
- private function remove_faultHandler(event:FaultEvent):void
- {
- if (event.fault.faultCode == "Server.ResourceUnavailable")
- {
- Alert.show("This is not allowed, as the 'remove(Company company)' method in the CompanyDAO class is excluded from remoting. To allow deletion, change the annotation on method to @RemotingInclude and try again.",
- "Delete Company");
- }
- else
- {
- Alert.show(event.fault.faultDetail);
- }
- }
-
- private function faultHandler(event:FaultEvent):void
- {
- Alert.show(event.fault.faultDetail);
- }
-
- ]]>
- </fx:Script>
-
- <fx:Declarations>
- <s:RemoteObject id="ro" destination="companyService" endpoint="{'http://{server.name}:{server.port}/samples-spring/messagebroker/amf'}">
- <s:method name="create" result="create_resultHandler(event)"/>
- <s:method name="update" result="update_resultHandler(event)"/>
- <s:method name="remove" result="remove_resultHandler(event)" fault="remove_faultHandler(event)"/>
- </s:RemoteObject>
- </fx:Declarations>
-
- <mx:Form>
- <mx:FormItem label="Id">
- <s:TextInput text="{company.id}" enabled="false"/>
- </mx:FormItem>
- <mx:FormItem label="Name">
- <s:TextInput id="companyName" text="{company.name}"/>
- </mx:FormItem>
- <mx:FormItem label="Industry">
- <local:BindableComboBox id="industry" dataProvider="{industries}" labelField="name" valueField="id" value="{company.industry.id}"/>
- </mx:FormItem>
- <mx:FormItem label="Address">
- <s:TextInput id="address" text="{company.address}"/>
- </mx:FormItem>
- <mx:FormItem label="City">
- <s:TextInput id="city" text="{company.city}"/>
- </mx:FormItem>
- <mx:FormItem label="State">
- <s:TextInput id="state" text="{company.state}"/>
- </mx:FormItem>
- <mx:FormItem label="Zip">
- <s:TextInput id="zip" text="{company.zip}"/>
- </mx:FormItem>
- <mx:FormItem label="Phone">
- <s:TextInput id="phone" text="{company.phone}"/>
- </mx:FormItem>
- </mx:Form>
-
- <s:HGroup left="8" bottom="8">
- <s:Button label="Close" click="closeItem()"/>
- <s:Button label="Save" click="save()"/>
- <s:Button label="Delete" click="deleteItem()"/>
- </s:HGroup>
-
-</mx:Canvas>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Industry.as
----------------------------------------------------------------------
diff --git a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Industry.as b/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Industry.as
deleted file mode 100755
index a126d4c..0000000
--- a/apps/samples-spring/WEB-INF/flex-src/companymgr/src/Industry.as
+++ /dev/null
@@ -1,28 +0,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.
-//
-////////////////////////////////////////////////////////////////////////////////
-package
-{
- [Bindable]
- [RemoteClass(alias="org.springframework.flex.samples.industry.Industry")]
- public class Industry
- {
- public var id:int;
- public var name:String;
- }
-}
\ No newline at end of file
[06/51] [partial] flex-blazeds git commit: - Moved old stuff to an
"attic" directory - Changed the directory structure to comply to a default
maven directory structure
Posted by cd...@apache.org.
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.js b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.js
new file mode 100755
index 0000000..9e3fd2c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/history.js
@@ -0,0 +1,722 @@
+/*
+ * 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.
+ */
+BrowserHistoryUtils = {
+ addEvent: function(elm, evType, fn, useCapture) {
+ useCapture = useCapture || false;
+ if (elm.addEventListener) {
+ elm.addEventListener(evType, fn, useCapture);
+ return true;
+ }
+ else if (elm.attachEvent) {
+ var r = elm.attachEvent('on' + evType, fn);
+ return r;
+ }
+ else {
+ elm['on' + evType] = fn;
+ }
+ }
+}
+
+BrowserHistory = (function() {
+ // type of browser
+ var browser = {
+ ie: false,
+ ie8: false,
+ firefox: false,
+ safari: false,
+ opera: false,
+ version: -1
+ };
+
+ // if setDefaultURL has been called, our first clue
+ // that the SWF is ready and listening
+ //var swfReady = false;
+
+ // the URL we'll send to the SWF once it is ready
+ //var pendingURL = '';
+
+ // Default app state URL to use when no fragment ID present
+ var defaultHash = '';
+
+ // Last-known app state URL
+ var currentHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHref = document.location.href;
+
+ // Initial URL (used only by IE)
+ var initialHash = document.location.hash;
+
+ // History frame source URL prefix (used only by IE)
+ var historyFrameSourcePrefix = 'history/historyFrame.html?';
+
+ // History maintenance (used only by Safari)
+ var currentHistoryLength = -1;
+
+ var historyHash = [];
+
+ var initialState = createState(initialHref, initialHref + '#' + initialHash, initialHash);
+
+ var backStack = [];
+ var forwardStack = [];
+
+ var currentObjectId = null;
+
+ //UserAgent detection
+ var useragent = navigator.userAgent.toLowerCase();
+
+ if (useragent.indexOf("opera") != -1) {
+ browser.opera = true;
+ } else if (useragent.indexOf("msie") != -1) {
+ browser.ie = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('msie') + 4));
+ if (browser.version == 8)
+ {
+ browser.ie = false;
+ browser.ie8 = true;
+ }
+ } else if (useragent.indexOf("safari") != -1) {
+ browser.safari = true;
+ browser.version = parseFloat(useragent.substring(useragent.indexOf('safari') + 7));
+ } else if (useragent.indexOf("gecko") != -1) {
+ browser.firefox = true;
+ }
+
+ if (browser.ie == true && browser.version == 7) {
+ window["_ie_firstload"] = false;
+ }
+
+ function hashChangeHandler()
+ {
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+
+ // Accessor functions for obtaining specific elements of the page.
+ function getHistoryFrame()
+ {
+ return document.getElementById('ie_historyFrame');
+ }
+
+ function getAnchorElement()
+ {
+ return document.getElementById('firefox_anchorDiv');
+ }
+
+ function getFormElement()
+ {
+ return document.getElementById('safari_formDiv');
+ }
+
+ function getRememberElement()
+ {
+ return document.getElementById("safari_remember_field");
+ }
+
+ // Get the Flash player object for performing ExternalInterface callbacks.
+ // Updated for changes to SWFObject2.
+ function getPlayer(id) {
+ var i;
+
+ if (id && document.getElementById(id)) {
+ var r = document.getElementById(id);
+ if (typeof r.SetVariable != "undefined") {
+ return r;
+ }
+ else {
+ var o = r.getElementsByTagName("object");
+ var e = r.getElementsByTagName("embed");
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ return o[i];
+ }
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ return e[i];
+ }
+ }
+ }
+ else {
+ var o = document.getElementsByTagName("object");
+ var e = document.getElementsByTagName("embed");
+ for (i = 0; i < e.length; i++) {
+ if (typeof e[i].browserURLChange != "undefined")
+ {
+ return e[i];
+ }
+ }
+ for (i = 0; i < o.length; i++) {
+ if (typeof o[i].browserURLChange != "undefined")
+ {
+ return o[i];
+ }
+ }
+ }
+ return undefined;
+ }
+
+ function getPlayers() {
+ var i;
+ var players = [];
+ if (players.length == 0) {
+ var tmp = document.getElementsByTagName('object');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ if (players.length == 0 || players[0].object == null) {
+ var tmp = document.getElementsByTagName('embed');
+ for (i = 0; i < tmp.length; i++)
+ {
+ if (typeof tmp[i].browserURLChange != "undefined")
+ players.push(tmp[i]);
+ }
+ }
+ return players;
+ }
+
+ function getIframeHash() {
+ var doc = getHistoryFrame().contentWindow.document;
+ var hash = String(doc.location.search);
+ if (hash.length == 1 && hash.charAt(0) == "?") {
+ hash = "";
+ }
+ else if (hash.length >= 2 && hash.charAt(0) == "?") {
+ hash = hash.substring(1);
+ }
+ return hash;
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function getHash() {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ var idx = document.location.href.indexOf('#');
+ return (idx >= 0) ? document.location.href.substr(idx+1) : '';
+ }
+
+ /* Get the current location hash excluding the '#' symbol. */
+ function setHash(hash) {
+ // It would be nice if we could use document.location.hash here,
+ // but it's faulty sometimes.
+ if (hash == '') hash = '#'
+ document.location.hash = hash;
+ }
+
+ function createState(baseUrl, newUrl, flexAppUrl) {
+ return { 'baseUrl': baseUrl, 'newUrl': newUrl, 'flexAppUrl': flexAppUrl, 'title': null };
+ }
+
+ /* Add a history entry to the browser.
+ * baseUrl: the portion of the location prior to the '#'
+ * newUrl: the entire new URL, including '#' and following fragment
+ * flexAppUrl: the portion of the location following the '#' only
+ */
+ function addHistoryEntry(baseUrl, newUrl, flexAppUrl) {
+
+ //delete all the history entries
+ forwardStack = [];
+
+ if (browser.ie) {
+ //Check to see if we are being asked to do a navigate for the first
+ //history entry, and if so ignore, because it's coming from the creation
+ //of the history iframe
+ if (flexAppUrl == defaultHash && document.location.href == initialHref && window['_ie_firstload']) {
+ currentHref = initialHref;
+ return;
+ }
+ if ((!flexAppUrl || flexAppUrl == defaultHash) && window['_ie_firstload']) {
+ newUrl = baseUrl + '#' + defaultHash;
+ flexAppUrl = defaultHash;
+ } else {
+ // for IE, tell the history frame to go somewhere without a '#'
+ // in order to get this entry into the browser history.
+ getHistoryFrame().src = historyFrameSourcePrefix + flexAppUrl;
+ }
+ setHash(flexAppUrl);
+ } else {
+
+ //ADR
+ if (backStack.length == 0 && initialState.flexAppUrl == flexAppUrl) {
+ initialState = createState(baseUrl, newUrl, flexAppUrl);
+ } else if(backStack.length > 0 && backStack[backStack.length - 1].flexAppUrl == flexAppUrl) {
+ backStack[backStack.length - 1] = createState(baseUrl, newUrl, flexAppUrl);
+ }
+
+ if (browser.safari) {
+ // for Safari, submit a form whose action points to the desired URL
+ if (browser.version <= 419.3) {
+ var file = window.location.pathname.toString();
+ file = file.substring(file.lastIndexOf("/")+1);
+ getFormElement().innerHTML = '<form name="historyForm" action="'+file+'#' + flexAppUrl + '" method="GET"></form>';
+ //get the current elements and add them to the form
+ var qs = window.location.search.substring(1);
+ var qs_arr = qs.split("&");
+ for (var i = 0; i < qs_arr.length; i++) {
+ var tmp = qs_arr[i].split("=");
+ var elem = document.createElement("input");
+ elem.type = "hidden";
+ elem.name = tmp[0];
+ elem.value = tmp[1];
+ document.forms.historyForm.appendChild(elem);
+ }
+ document.forms.historyForm.submit();
+ } else {
+ top.location.hash = flexAppUrl;
+ }
+ // We also have to maintain the history by hand for Safari
+ historyHash[history.length] = flexAppUrl;
+ _storeStates();
+ } else {
+ // Otherwise, write an anchor into the page and tell the browser to go there
+ addAnchor(flexAppUrl);
+ setHash(flexAppUrl);
+ }
+ }
+ backStack.push(createState(baseUrl, newUrl, flexAppUrl));
+ }
+
+ function _storeStates() {
+ if (browser.safari) {
+ getRememberElement().value = historyHash.join(",");
+ }
+ }
+
+ function handleBackButton() {
+ //The "current" page is always at the top of the history stack.
+ var current = backStack.pop();
+ if (!current) { return; }
+ var last = backStack[backStack.length - 1];
+ if (!last && backStack.length == 0){
+ last = initialState;
+ }
+ forwardStack.push(current);
+ }
+
+ function handleForwardButton() {
+ //summary: private method. Do not call this directly.
+
+ var last = forwardStack.pop();
+ if (!last) { return; }
+ backStack.push(last);
+ }
+
+ function handleArbitraryUrl() {
+ //delete all the history entries
+ forwardStack = [];
+ }
+
+ /* Called periodically to poll to see if we need to detect navigation that has occurred */
+ function checkForUrlChange() {
+
+ if (browser.ie) {
+ if (currentHref != document.location.href && currentHref + '#' != document.location.href) {
+ //This occurs when the user has navigated to a specific URL
+ //within the app, and didn't use browser back/forward
+ //IE seems to have a bug where it stops updating the URL it
+ //shows the end-user at this point, but programatically it
+ //appears to be correct. Do a full app reload to get around
+ //this issue.
+ if (browser.version < 7) {
+ currentHref = document.location.href;
+ document.location.reload();
+ } else {
+ if (getHash() != getIframeHash()) {
+ // this.iframe.src = this.blankURL + hash;
+ var sourceToSet = historyFrameSourcePrefix + getHash();
+ getHistoryFrame().src = sourceToSet;
+ currentHref = document.location.href;
+ }
+ }
+ }
+ }
+
+ if (browser.safari) {
+ // For Safari, we have to check to see if history.length changed.
+ if (currentHistoryLength >= 0 && history.length != currentHistoryLength) {
+ //alert("did change: " + history.length + ", " + historyHash.length + "|" + historyHash[history.length] + "|>" + historyHash.join("|"));
+ var flexAppUrl = getHash();
+ if (browser.version < 528.16 /* Anything earlier than Safari 4.0 */)
+ {
+ // If it did change and we're running Safari 3.x or earlier,
+ // then we have to look the old state up in our hand-maintained
+ // array since document.location.hash won't have changed,
+ // then call back into BrowserManager.
+ currentHistoryLength = history.length;
+ flexAppUrl = historyHash[currentHistoryLength];
+ }
+
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ _storeStates();
+ }
+ }
+ if (browser.firefox) {
+ if (currentHref != document.location.href) {
+ var bsl = backStack.length;
+
+ var urlActions = {
+ back: false,
+ forward: false,
+ set: false
+ }
+
+ if ((window.location.hash == initialHash || window.location.href == initialHref) && (bsl == 1)) {
+ urlActions.back = true;
+ // FIXME: could this ever be a forward button?
+ // we can't clear it because we still need to check for forwards. Ugg.
+ // clearInterval(this.locationTimer);
+ handleBackButton();
+ }
+
+ // first check to see if we could have gone forward. We always halt on
+ // a no-hash item.
+ if (forwardStack.length > 0) {
+ if (forwardStack[forwardStack.length-1].flexAppUrl == getHash()) {
+ urlActions.forward = true;
+ handleForwardButton();
+ }
+ }
+
+ // ok, that didn't work, try someplace back in the history stack
+ if ((bsl >= 2) && (backStack[bsl - 2])) {
+ if (backStack[bsl - 2].flexAppUrl == getHash()) {
+ urlActions.back = true;
+ handleBackButton();
+ }
+ }
+
+ if (!urlActions.back && !urlActions.forward) {
+ var foundInStacks = {
+ back: -1,
+ forward: -1
+ }
+
+ for (var i = 0; i < backStack.length; i++) {
+ if (backStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.back = i;
+ }
+ }
+ for (var i = 0; i < forwardStack.length; i++) {
+ if (forwardStack[i].flexAppUrl == getHash() && i != (bsl - 2)) {
+ arbitraryUrl = true;
+ foundInStacks.forward = i;
+ }
+ }
+ handleArbitraryUrl();
+ }
+
+ // Firefox changed; do a callback into BrowserManager to tell it.
+ currentHref = document.location.href;
+ var flexAppUrl = getHash();
+ //ADR: to fix multiple
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ pl[i].browserURLChange(flexAppUrl);
+ }
+ } else {
+ getPlayer().browserURLChange(flexAppUrl);
+ }
+ }
+ }
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ /* Write an anchor into the page to legitimize it as a URL for Firefox et al. */
+ function addAnchor(flexAppUrl)
+ {
+ if (document.getElementsByName(flexAppUrl).length == 0) {
+ getAnchorElement().innerHTML += "<a name='" + flexAppUrl + "'>" + flexAppUrl + "</a>";
+ }
+ }
+
+ var _initialize = function () {
+ if (browser.ie)
+ {
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ var iframe_location = (new String(s.src)).replace("history.js", "historyFrame.html");
+ }
+ }
+ historyFrameSourcePrefix = iframe_location + "?";
+ var src = historyFrameSourcePrefix;
+
+ var iframe = document.createElement("iframe");
+ iframe.id = 'ie_historyFrame';
+ iframe.name = 'ie_historyFrame';
+ iframe.src = 'javascript:false;';
+
+ try {
+ document.body.appendChild(iframe);
+ } catch(e) {
+ setTimeout(function() {
+ document.body.appendChild(iframe);
+ }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ var rememberDiv = document.createElement("div");
+ rememberDiv.id = 'safari_rememberDiv';
+ document.body.appendChild(rememberDiv);
+ rememberDiv.innerHTML = '<input type="text" id="safari_remember_field" style="width: 500px;">';
+
+ var formDiv = document.createElement("div");
+ formDiv.id = 'safari_formDiv';
+ document.body.appendChild(formDiv);
+
+ var reloader_content = document.createElement('div');
+ reloader_content.id = 'safarireloader';
+ var scripts = document.getElementsByTagName('script');
+ for (var i = 0, s; s = scripts[i]; i++) {
+ if (s.src.indexOf("history.js") > -1) {
+ html = (new String(s.src)).replace(".js", ".html");
+ }
+ }
+ reloader_content.innerHTML = '<iframe id="safarireloader-iframe" src="about:blank" frameborder="no" scrolling="no"></iframe>';
+ document.body.appendChild(reloader_content);
+ reloader_content.style.position = 'absolute';
+ reloader_content.style.left = reloader_content.style.top = '-9999px';
+ iframe = reloader_content.getElementsByTagName('iframe')[0];
+
+ if (document.getElementById("safari_remember_field").value != "" ) {
+ historyHash = document.getElementById("safari_remember_field").value.split(",");
+ }
+
+ }
+
+ if (browser.firefox || browser.ie8)
+ {
+ var anchorDiv = document.createElement("div");
+ anchorDiv.id = 'firefox_anchorDiv';
+ document.body.appendChild(anchorDiv);
+ }
+
+ if (browser.ie8)
+ document.body.onhashchange = hashChangeHandler;
+ //setTimeout(checkForUrlChange, 50);
+ }
+
+ return {
+ historyHash: historyHash,
+ backStack: function() { return backStack; },
+ forwardStack: function() { return forwardStack },
+ getPlayer: getPlayer,
+ initialize: function(src) {
+ _initialize(src);
+ },
+ setURL: function(url) {
+ document.location.href = url;
+ },
+ getURL: function() {
+ return document.location.href;
+ },
+ getTitle: function() {
+ return document.title;
+ },
+ setTitle: function(title) {
+ try {
+ backStack[backStack.length - 1].title = title;
+ } catch(e) { }
+ //if on safari, set the title to be the empty string.
+ if (browser.safari) {
+ if (title == "") {
+ try {
+ var tmp = window.location.href.toString();
+ title = tmp.substring((tmp.lastIndexOf("/")+1), tmp.lastIndexOf("#"));
+ } catch(e) {
+ title = "";
+ }
+ }
+ }
+ document.title = title;
+ },
+ setDefaultURL: function(def)
+ {
+ defaultHash = def;
+ def = getHash();
+ //trailing ? is important else an extra frame gets added to the history
+ //when navigating back to the first page. Alternatively could check
+ //in history frame navigation to compare # and ?.
+ if (browser.ie)
+ {
+ window['_ie_firstload'] = true;
+ var sourceToSet = historyFrameSourcePrefix + def;
+ var func = function() {
+ getHistoryFrame().src = sourceToSet;
+ window.location.replace("#" + def);
+ setInterval(checkForUrlChange, 50);
+ }
+ try {
+ func();
+ } catch(e) {
+ window.setTimeout(function() { func(); }, 0);
+ }
+ }
+
+ if (browser.safari)
+ {
+ currentHistoryLength = history.length;
+ if (historyHash.length == 0) {
+ historyHash[currentHistoryLength] = def;
+ var newloc = "#" + def;
+ window.location.replace(newloc);
+ } else {
+ //alert(historyHash[historyHash.length-1]);
+ }
+ //setHash(def);
+ setInterval(checkForUrlChange, 50);
+ }
+
+
+ if (browser.firefox || browser.opera)
+ {
+ var reg = new RegExp("#" + def + "$");
+ if (window.location.toString().match(reg)) {
+ } else {
+ var newloc ="#" + def;
+ window.location.replace(newloc);
+ }
+ setInterval(checkForUrlChange, 50);
+ //setHash(def);
+ }
+
+ },
+
+ /* Set the current browser URL; called from inside BrowserManager to propagate
+ * the application state out to the container.
+ */
+ setBrowserURL: function(flexAppUrl, objectId) {
+ if (browser.ie && typeof objectId != "undefined") {
+ currentObjectId = objectId;
+ }
+ //fromIframe = fromIframe || false;
+ //fromFlex = fromFlex || false;
+ //alert("setBrowserURL: " + flexAppUrl);
+ //flexAppUrl = (flexAppUrl == "") ? defaultHash : flexAppUrl ;
+
+ var pos = document.location.href.indexOf('#');
+ var baseUrl = pos != -1 ? document.location.href.substr(0, pos) : document.location.href;
+ var newUrl = baseUrl + '#' + flexAppUrl;
+
+ if (document.location.href != newUrl && document.location.href + '#' != newUrl) {
+ currentHref = newUrl;
+ addHistoryEntry(baseUrl, newUrl, flexAppUrl);
+ currentHistoryLength = history.length;
+ }
+ },
+
+ browserURLChange: function(flexAppUrl) {
+ var objectId = null;
+ if (browser.ie && currentObjectId != null) {
+ objectId = currentObjectId;
+ }
+ pendingURL = '';
+
+ if (typeof BrowserHistory_multiple != "undefined" && BrowserHistory_multiple == true) {
+ var pl = getPlayers();
+ for (var i = 0; i < pl.length; i++) {
+ try {
+ pl[i].browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+ } else {
+ try {
+ getPlayer(objectId).browserURLChange(flexAppUrl);
+ } catch(e) { }
+ }
+
+ currentObjectId = null;
+ },
+ getUserAgent: function() {
+ return navigator.userAgent;
+ },
+ getPlatform: function() {
+ return navigator.platform;
+ }
+
+ }
+
+})();
+
+// Initialization
+
+// Automated unit testing and other diagnostics
+
+function setURL(url)
+{
+ document.location.href = url;
+}
+
+function backButton()
+{
+ history.back();
+}
+
+function forwardButton()
+{
+ history.forward();
+}
+
+function goForwardOrBackInHistory(step)
+{
+ history.go(step);
+}
+
+//BrowserHistoryUtils.addEvent(window, "load", function() { BrowserHistory.initialize(); });
+(function(i) {
+ var u =navigator.userAgent;var e=/*@cc_on!@*/false;
+ var st = setTimeout;
+ if(/webkit/i.test(u)){
+ st(function(){
+ var dr=document.readyState;
+ if(dr=="loaded"||dr=="complete"){i()}
+ else{st(arguments.callee,10);}},10);
+ } else if((/mozilla/i.test(u)&&!/(compati)/.test(u)) || (/opera/i.test(u))){
+ document.addEventListener("DOMContentLoaded",i,false);
+ } else if(e){
+ (function(){
+ var t=document.createElement('doc:rdy');
+ try{t.doScroll('left');
+ i();t=null;
+ }catch(e){st(arguments.callee,0);}})();
+ } else{
+ window.onload=i;
+ }
+})( function() {BrowserHistory.initialize();} );
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/historyFrame.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/historyFrame.html b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/historyFrame.html
new file mode 100755
index 0000000..c8af338
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/history/historyFrame.html
@@ -0,0 +1,45 @@
+<!--
+ 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.
+-->
+<html>
+ <head>
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <META HTTP-EQUIV="Expires" CONTENT="-1">
+ </head>
+ <body>
+ <script>
+ function processUrl()
+ {
+
+ var pos = url.indexOf("?");
+ url = pos != -1 ? url.substr(pos + 1) : "";
+ if (!parent._ie_firstload) {
+ parent.BrowserHistory.setBrowserURL(url);
+ try {
+ parent.BrowserHistory.browserURLChange(url);
+ } catch(e) { }
+ } else {
+ parent._ie_firstload = false;
+ }
+ }
+
+ var url = document.location.href;
+ processUrl();
+ document.write(encodeURIComponent(url));
+ </script>
+ Hidden frame for Browser History support.
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/index.template.html
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/index.template.html b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/index.template.html
new file mode 100755
index 0000000..2146ca8
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/index.template.html
@@ -0,0 +1,121 @@
+<!--
+ 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">
+<!-- saved from url=(0014)about:internet -->
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+ <!--
+ Smart developers always View Source.
+
+ This application was built using Adobe Flex, an open source framework
+ for building rich Internet applications that get delivered via the
+ Flash Player or to desktops via Adobe AIR.
+
+ Learn more about Flex at http://flex.org
+ // -->
+ <head>
+ <title>${title}</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <!-- Include CSS to eliminate any default margins/padding and set the height of the html element and
+ the body element to 100%, because Firefox, or any Gecko based browser, interprets percentage as
+ the percentage of the height of its parent container, which has to be set explicitly. Initially,
+ don't display flashContent div so it won't show if JavaScript disabled.
+ -->
+ <style type="text/css" media="screen">
+ html, body { height:100%; }
+ body { margin:0; padding:0; overflow:auto; text-align:center;
+ background-color: ${bgcolor}; }
+ #flashContent { display:none; }
+ </style>
+
+ <!-- Enable Browser History by replacing useBrowserHistory tokens with two hyphens -->
+ <!-- BEGIN Browser History required section ${useBrowserHistory}>
+ <link rel="stylesheet" type="text/css" href="history/history.css" />
+ <script type="text/javascript" src="history/history.js"></script>
+ <!${useBrowserHistory} END Browser History required section -->
+
+ <script type="text/javascript" src="swfobject.js"></script>
+ <script type="text/javascript">
+ <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
+ var swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+ <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
+ var xiSwfUrlStr = "${expressInstallSwf}";
+ var flashvars = {};
+ var params = {};
+ params.quality = "high";
+ params.bgcolor = "${bgcolor}";
+ params.allowscriptaccess = "sameDomain";
+ params.allowfullscreen = "true";
+ var attributes = {};
+ attributes.id = "${application}";
+ attributes.name = "${application}";
+ attributes.align = "middle";
+ swfobject.embedSWF(
+ "${swf}.swf", "flashContent",
+ "${width}", "${height}",
+ swfVersionStr, xiSwfUrlStr,
+ flashvars, params, attributes);
+ <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
+ swfobject.createCSS("#flashContent", "display:block;text-align:left;");
+ </script>
+ </head>
+ <body>
+ <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
+ JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
+ when JavaScript is disabled.
+ -->
+ <div id="flashContent">
+ <p>
+ To view this page ensure that Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is installed.
+ </p>
+ <script type="text/javascript">
+ var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
+ document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
+ + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
+ </script>
+ </div>
+
+ <noscript>
+ <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="${width}" height="${height}" id="${application}">
+ <param name="movie" value="${swf}.swf" />
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--[if !IE]>-->
+ <object type="application/x-shockwave-flash" data="${swf}.swf" width="${width}" height="${height}">
+ <param name="quality" value="high" />
+ <param name="bgcolor" value="${bgcolor}" />
+ <param name="allowScriptAccess" value="sameDomain" />
+ <param name="allowFullScreen" value="true" />
+ <!--<![endif]-->
+ <!--[if gte IE 6]>-->
+ <p>
+ Either scripts and active content are not permitted to run or Adobe Flash Player version
+ ${version_major}.${version_minor}.${version_revision} or greater is not installed.
+ </p>
+ <!--<![endif]-->
+ <a href="http://www.adobe.com/go/getflashplayer">
+ <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
+ </a>
+ <!--[if !IE]>-->
+ </object>
+ <!--<![endif]-->
+ </object>
+ </noscript>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/swfobject.js
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/swfobject.js b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/swfobject.js
new file mode 100755
index 0000000..c862aae
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/html-template/swfobject.js
@@ -0,0 +1,793 @@
+/*
+ * 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.
+ */
+/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
+*/
+
+var swfobject = function() {
+
+ var UNDEF = "undefined",
+ OBJECT = "object",
+ SHOCKWAVE_FLASH = "Shockwave Flash",
+ SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
+ FLASH_MIME_TYPE = "application/x-shockwave-flash",
+ EXPRESS_INSTALL_ID = "SWFObjectExprInst",
+ ON_READY_STATE_CHANGE = "onreadystatechange",
+
+ win = window,
+ doc = document,
+ nav = navigator,
+
+ plugin = false,
+ domLoadFnArr = [main],
+ regObjArr = [],
+ objIdArr = [],
+ listenersArr = [],
+ storedAltContent,
+ storedAltContentId,
+ storedCallbackFn,
+ storedCallbackObj,
+ isDomLoaded = false,
+ isExpressInstallActive = false,
+ dynamicStylesheet,
+ dynamicStylesheetMedia,
+ autoHideShow = true,
+
+ /* Centralized function for browser feature detection
+ - User agent string detection is only used when no good alternative is possible
+ - Is executed directly for optimal performance
+ */
+ ua = function() {
+ var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
+ u = nav.userAgent.toLowerCase(),
+ p = nav.platform.toLowerCase(),
+ windows = p ? /win/.test(p) : /win/.test(u),
+ mac = p ? /mac/.test(p) : /mac/.test(u),
+ webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
+ ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
+ playerVersion = [0,0,0],
+ d = null;
+ if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
+ d = nav.plugins[SHOCKWAVE_FLASH].description;
+ if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
+ plugin = true;
+ ie = false; // cascaded feature detection for Internet Explorer
+ d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
+ playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
+ playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
+ playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
+ }
+ }
+ else if (typeof win.ActiveXObject != UNDEF) {
+ try {
+ var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
+ if (a) { // a will return null when ActiveX is disabled
+ d = a.GetVariable("$version");
+ if (d) {
+ ie = true; // cascaded feature detection for Internet Explorer
+ d = d.split(" ")[1].split(",");
+ playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ }
+ catch(e) {}
+ }
+ return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
+ }(),
+
+ /* Cross-browser onDomLoad
+ - Will fire an event as soon as the DOM of a web page is loaded
+ - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
+ - Regular onload serves as fallback
+ */
+ onDomLoad = function() {
+ if (!ua.w3) { return; }
+ if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
+ callDomLoadFunctions();
+ }
+ if (!isDomLoaded) {
+ if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
+ }
+ if (ua.ie && ua.win) {
+ doc.attachEvent(ON_READY_STATE_CHANGE, function() {
+ if (doc.readyState == "complete") {
+ doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
+ callDomLoadFunctions();
+ }
+ });
+ if (win == top) { // if not inside an iframe
+ (function(){
+ if (isDomLoaded) { return; }
+ try {
+ doc.documentElement.doScroll("left");
+ }
+ catch(e) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ }
+ if (ua.wk) {
+ (function(){
+ if (isDomLoaded) { return; }
+ if (!/loaded|complete/.test(doc.readyState)) {
+ setTimeout(arguments.callee, 0);
+ return;
+ }
+ callDomLoadFunctions();
+ })();
+ }
+ addLoadEvent(callDomLoadFunctions);
+ }
+ }();
+
+ function callDomLoadFunctions() {
+ if (isDomLoaded) { return; }
+ try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
+ var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
+ t.parentNode.removeChild(t);
+ }
+ catch (e) { return; }
+ isDomLoaded = true;
+ var dl = domLoadFnArr.length;
+ for (var i = 0; i < dl; i++) {
+ domLoadFnArr[i]();
+ }
+ }
+
+ function addDomLoadEvent(fn) {
+ if (isDomLoaded) {
+ fn();
+ }
+ else {
+ domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
+ }
+ }
+
+ /* Cross-browser onload
+ - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
+ - Will fire an event as soon as a web page including all of its assets are loaded
+ */
+ function addLoadEvent(fn) {
+ if (typeof win.addEventListener != UNDEF) {
+ win.addEventListener("load", fn, false);
+ }
+ else if (typeof doc.addEventListener != UNDEF) {
+ doc.addEventListener("load", fn, false);
+ }
+ else if (typeof win.attachEvent != UNDEF) {
+ addListener(win, "onload", fn);
+ }
+ else if (typeof win.onload == "function") {
+ var fnOld = win.onload;
+ win.onload = function() {
+ fnOld();
+ fn();
+ };
+ }
+ else {
+ win.onload = fn;
+ }
+ }
+
+ /* Main function
+ - Will preferably execute onDomLoad, otherwise onload (as a fallback)
+ */
+ function main() {
+ if (plugin) {
+ testPlayerVersion();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Detect the Flash Player version for non-Internet Explorer browsers
+ - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
+ a. Both release and build numbers can be detected
+ b. Avoid wrong descriptions by corrupt installers provided by Adobe
+ c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
+ - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
+ */
+ function testPlayerVersion() {
+ var b = doc.getElementsByTagName("body")[0];
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ var t = b.appendChild(o);
+ if (t) {
+ var counter = 0;
+ (function(){
+ if (typeof t.GetVariable != UNDEF) {
+ var d = t.GetVariable("$version");
+ if (d) {
+ d = d.split(" ")[1].split(",");
+ ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
+ }
+ }
+ else if (counter < 10) {
+ counter++;
+ setTimeout(arguments.callee, 10);
+ return;
+ }
+ b.removeChild(o);
+ t = null;
+ matchVersions();
+ })();
+ }
+ else {
+ matchVersions();
+ }
+ }
+
+ /* Perform Flash Player and SWF version matching; static publishing only
+ */
+ function matchVersions() {
+ var rl = regObjArr.length;
+ if (rl > 0) {
+ for (var i = 0; i < rl; i++) { // for each registered object element
+ var id = regObjArr[i].id;
+ var cb = regObjArr[i].callbackFn;
+ var cbObj = {success:false, id:id};
+ if (ua.pv[0] > 0) {
+ var obj = getElementById(id);
+ if (obj) {
+ if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
+ setVisibility(id, true);
+ if (cb) {
+ cbObj.success = true;
+ cbObj.ref = getObjectById(id);
+ cb(cbObj);
+ }
+ }
+ else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
+ var att = {};
+ att.data = regObjArr[i].expressInstall;
+ att.width = obj.getAttribute("width") || "0";
+ att.height = obj.getAttribute("height") || "0";
+ if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
+ if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
+ // parse HTML object param element's name-value pairs
+ var par = {};
+ var p = obj.getElementsByTagName("param");
+ var pl = p.length;
+ for (var j = 0; j < pl; j++) {
+ if (p[j].getAttribute("name").toLowerCase() != "movie") {
+ par[p[j].getAttribute("name")] = p[j].getAttribute("value");
+ }
+ }
+ showExpressInstall(att, par, id, cb);
+ }
+ else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
+ displayAltContent(obj);
+ if (cb) { cb(cbObj); }
+ }
+ }
+ }
+ else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
+ setVisibility(id, true);
+ if (cb) {
+ var o = getObjectById(id); // test whether there is an HTML object element or not
+ if (o && typeof o.SetVariable != UNDEF) {
+ cbObj.success = true;
+ cbObj.ref = o;
+ }
+ cb(cbObj);
+ }
+ }
+ }
+ }
+ }
+
+ function getObjectById(objectIdStr) {
+ var r = null;
+ var o = getElementById(objectIdStr);
+ if (o && o.nodeName == "OBJECT") {
+ if (typeof o.SetVariable != UNDEF) {
+ r = o;
+ }
+ else {
+ var n = o.getElementsByTagName(OBJECT)[0];
+ if (n) {
+ r = n;
+ }
+ }
+ }
+ return r;
+ }
+
+ /* Requirements for Adobe Express Install
+ - only one instance can be active at a time
+ - fp 6.0.65 or higher
+ - Win/Mac OS only
+ - no Webkit engines older than version 312
+ */
+ function canExpressInstall() {
+ return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
+ }
+
+ /* Show the Adobe Express Install dialog
+ - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
+ */
+ function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
+ isExpressInstallActive = true;
+ storedCallbackFn = callbackFn || null;
+ storedCallbackObj = {success:false, id:replaceElemIdStr};
+ var obj = getElementById(replaceElemIdStr);
+ if (obj) {
+ if (obj.nodeName == "OBJECT") { // static publishing
+ storedAltContent = abstractAltContent(obj);
+ storedAltContentId = null;
+ }
+ else { // dynamic publishing
+ storedAltContent = obj;
+ storedAltContentId = replaceElemIdStr;
+ }
+ att.id = EXPRESS_INSTALL_ID;
+ if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
+ if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
+ doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
+ var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
+ fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + fv;
+ }
+ else {
+ par.flashvars = fv;
+ }
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ var newObj = createElement("div");
+ replaceElemIdStr += "SWFObjectNew";
+ newObj.setAttribute("id", replaceElemIdStr);
+ obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ createSWF(att, par, replaceElemIdStr);
+ }
+ }
+
+ /* Functions to abstract and display alternative content
+ */
+ function displayAltContent(obj) {
+ if (ua.ie && ua.win && obj.readyState != 4) {
+ // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
+ // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
+ var el = createElement("div");
+ obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
+ el.parentNode.replaceChild(abstractAltContent(obj), el);
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ obj.parentNode.removeChild(obj);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.replaceChild(abstractAltContent(obj), obj);
+ }
+ }
+
+ function abstractAltContent(obj) {
+ var ac = createElement("div");
+ if (ua.win && ua.ie) {
+ ac.innerHTML = obj.innerHTML;
+ }
+ else {
+ var nestedObj = obj.getElementsByTagName(OBJECT)[0];
+ if (nestedObj) {
+ var c = nestedObj.childNodes;
+ if (c) {
+ var cl = c.length;
+ for (var i = 0; i < cl; i++) {
+ if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
+ ac.appendChild(c[i].cloneNode(true));
+ }
+ }
+ }
+ }
+ }
+ return ac;
+ }
+
+ /* Cross-browser dynamic SWF creation
+ */
+ function createSWF(attObj, parObj, id) {
+ var r, el = getElementById(id);
+ if (ua.wk && ua.wk < 312) { return r; }
+ if (el) {
+ if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
+ attObj.id = id;
+ }
+ if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
+ var att = "";
+ for (var i in attObj) {
+ if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
+ if (i.toLowerCase() == "data") {
+ parObj.movie = attObj[i];
+ }
+ else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ att += ' class="' + attObj[i] + '"';
+ }
+ else if (i.toLowerCase() != "classid") {
+ att += ' ' + i + '="' + attObj[i] + '"';
+ }
+ }
+ }
+ var par = "";
+ for (var j in parObj) {
+ if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
+ par += '<param name="' + j + '" value="' + parObj[j] + '" />';
+ }
+ }
+ el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
+ objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
+ r = getElementById(attObj.id);
+ }
+ else { // well-behaving browsers
+ var o = createElement(OBJECT);
+ o.setAttribute("type", FLASH_MIME_TYPE);
+ for (var m in attObj) {
+ if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
+ if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
+ o.setAttribute("class", attObj[m]);
+ }
+ else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
+ o.setAttribute(m, attObj[m]);
+ }
+ }
+ }
+ for (var n in parObj) {
+ if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
+ createObjParam(o, n, parObj[n]);
+ }
+ }
+ el.parentNode.replaceChild(o, el);
+ r = o;
+ }
+ }
+ return r;
+ }
+
+ function createObjParam(el, pName, pValue) {
+ var p = createElement("param");
+ p.setAttribute("name", pName);
+ p.setAttribute("value", pValue);
+ el.appendChild(p);
+ }
+
+ /* Cross-browser SWF removal
+ - Especially needed to safely and completely remove a SWF in Internet Explorer
+ */
+ function removeSWF(id) {
+ var obj = getElementById(id);
+ if (obj && obj.nodeName == "OBJECT") {
+ if (ua.ie && ua.win) {
+ obj.style.display = "none";
+ (function(){
+ if (obj.readyState == 4) {
+ removeObjectInIE(id);
+ }
+ else {
+ setTimeout(arguments.callee, 10);
+ }
+ })();
+ }
+ else {
+ obj.parentNode.removeChild(obj);
+ }
+ }
+ }
+
+ function removeObjectInIE(id) {
+ var obj = getElementById(id);
+ if (obj) {
+ for (var i in obj) {
+ if (typeof obj[i] == "function") {
+ obj[i] = null;
+ }
+ }
+ obj.parentNode.removeChild(obj);
+ }
+ }
+
+ /* Functions to optimize JavaScript compression
+ */
+ function getElementById(id) {
+ var el = null;
+ try {
+ el = doc.getElementById(id);
+ }
+ catch (e) {}
+ return el;
+ }
+
+ function createElement(el) {
+ return doc.createElement(el);
+ }
+
+ /* Updated attachEvent function for Internet Explorer
+ - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
+ */
+ function addListener(target, eventType, fn) {
+ target.attachEvent(eventType, fn);
+ listenersArr[listenersArr.length] = [target, eventType, fn];
+ }
+
+ /* Flash Player and SWF content version matching
+ */
+ function hasPlayerVersion(rv) {
+ var pv = ua.pv, v = rv.split(".");
+ v[0] = parseInt(v[0], 10);
+ v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
+ v[2] = parseInt(v[2], 10) || 0;
+ return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
+ }
+
+ /* Cross-browser dynamic CSS creation
+ - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
+ */
+ function createCSS(sel, decl, media, newStyle) {
+ if (ua.ie && ua.mac) { return; }
+ var h = doc.getElementsByTagName("head")[0];
+ if (!h) { return; } // to also support badly authored HTML pages that lack a head element
+ var m = (media && typeof media == "string") ? media : "screen";
+ if (newStyle) {
+ dynamicStylesheet = null;
+ dynamicStylesheetMedia = null;
+ }
+ if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
+ // create dynamic stylesheet + get a global reference to it
+ var s = createElement("style");
+ s.setAttribute("type", "text/css");
+ s.setAttribute("media", m);
+ dynamicStylesheet = h.appendChild(s);
+ if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
+ dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
+ }
+ dynamicStylesheetMedia = m;
+ }
+ // add style rule
+ if (ua.ie && ua.win) {
+ if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
+ dynamicStylesheet.addRule(sel, decl);
+ }
+ }
+ else {
+ if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
+ dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
+ }
+ }
+ }
+
+ function setVisibility(id, isVisible) {
+ if (!autoHideShow) { return; }
+ var v = isVisible ? "visible" : "hidden";
+ if (isDomLoaded && getElementById(id)) {
+ getElementById(id).style.visibility = v;
+ }
+ else {
+ createCSS("#" + id, "visibility:" + v);
+ }
+ }
+
+ /* Filter to avoid XSS attacks
+ */
+ function urlEncodeIfNecessary(s) {
+ var regex = /[\\\"<>\.;]/;
+ var hasBadChars = regex.exec(s) != null;
+ return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
+ }
+
+ /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
+ */
+ var cleanup = function() {
+ if (ua.ie && ua.win) {
+ window.attachEvent("onunload", function() {
+ // remove listeners to avoid memory leaks
+ var ll = listenersArr.length;
+ for (var i = 0; i < ll; i++) {
+ listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
+ }
+ // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
+ var il = objIdArr.length;
+ for (var j = 0; j < il; j++) {
+ removeSWF(objIdArr[j]);
+ }
+ // cleanup library's main closures to avoid memory leaks
+ for (var k in ua) {
+ ua[k] = null;
+ }
+ ua = null;
+ for (var l in swfobject) {
+ swfobject[l] = null;
+ }
+ swfobject = null;
+ });
+ }
+ }();
+
+ return {
+ /* Public API
+ - Reference: http://code.google.com/p/swfobject/wiki/documentation
+ */
+ registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
+ if (ua.w3 && objectIdStr && swfVersionStr) {
+ var regObj = {};
+ regObj.id = objectIdStr;
+ regObj.swfVersion = swfVersionStr;
+ regObj.expressInstall = xiSwfUrlStr;
+ regObj.callbackFn = callbackFn;
+ regObjArr[regObjArr.length] = regObj;
+ setVisibility(objectIdStr, false);
+ }
+ else if (callbackFn) {
+ callbackFn({success:false, id:objectIdStr});
+ }
+ },
+
+ getObjectById: function(objectIdStr) {
+ if (ua.w3) {
+ return getObjectById(objectIdStr);
+ }
+ },
+
+ embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
+ var callbackObj = {success:false, id:replaceElemIdStr};
+ if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
+ setVisibility(replaceElemIdStr, false);
+ addDomLoadEvent(function() {
+ widthStr += ""; // auto-convert to string
+ heightStr += "";
+ var att = {};
+ if (attObj && typeof attObj === OBJECT) {
+ for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
+ att[i] = attObj[i];
+ }
+ }
+ att.data = swfUrlStr;
+ att.width = widthStr;
+ att.height = heightStr;
+ var par = {};
+ if (parObj && typeof parObj === OBJECT) {
+ for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
+ par[j] = parObj[j];
+ }
+ }
+ if (flashvarsObj && typeof flashvarsObj === OBJECT) {
+ for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
+ if (typeof par.flashvars != UNDEF) {
+ par.flashvars += "&" + k + "=" + flashvarsObj[k];
+ }
+ else {
+ par.flashvars = k + "=" + flashvarsObj[k];
+ }
+ }
+ }
+ if (hasPlayerVersion(swfVersionStr)) { // create SWF
+ var obj = createSWF(att, par, replaceElemIdStr);
+ if (att.id == replaceElemIdStr) {
+ setVisibility(replaceElemIdStr, true);
+ }
+ callbackObj.success = true;
+ callbackObj.ref = obj;
+ }
+ else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
+ att.data = xiSwfUrlStr;
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ return;
+ }
+ else { // show alternative content
+ setVisibility(replaceElemIdStr, true);
+ }
+ if (callbackFn) { callbackFn(callbackObj); }
+ });
+ }
+ else if (callbackFn) { callbackFn(callbackObj); }
+ },
+
+ switchOffAutoHideShow: function() {
+ autoHideShow = false;
+ },
+
+ ua: ua,
+
+ getFlashPlayerVersion: function() {
+ return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
+ },
+
+ hasFlashPlayerVersion: hasPlayerVersion,
+
+ createSWF: function(attObj, parObj, replaceElemIdStr) {
+ if (ua.w3) {
+ return createSWF(attObj, parObj, replaceElemIdStr);
+ }
+ else {
+ return undefined;
+ }
+ },
+
+ showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
+ if (ua.w3 && canExpressInstall()) {
+ showExpressInstall(att, par, replaceElemIdStr, callbackFn);
+ }
+ },
+
+ removeSWF: function(objElemIdStr) {
+ if (ua.w3) {
+ removeSWF(objElemIdStr);
+ }
+ },
+
+ createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
+ if (ua.w3) {
+ createCSS(selStr, declStr, mediaStr, newStyleBoolean);
+ }
+ },
+
+ addDomLoadEvent: addDomLoadEvent,
+
+ addLoadEvent: addLoadEvent,
+
+ getQueryParamValue: function(param) {
+ var q = doc.location.search || doc.location.hash;
+ if (q) {
+ if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
+ if (param == null) {
+ return urlEncodeIfNecessary(q);
+ }
+ var pairs = q.split("&");
+ for (var i = 0; i < pairs.length; i++) {
+ if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
+ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
+ }
+ }
+ }
+ return "";
+ },
+
+ // For internal usage only
+ expressInstallCallback: function() {
+ if (isExpressInstallActive) {
+ var obj = getElementById(EXPRESS_INSTALL_ID);
+ if (obj && storedAltContent) {
+ obj.parentNode.replaceChild(storedAltContent, obj);
+ if (storedAltContentId) {
+ setVisibility(storedAltContentId, true);
+ if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
+ }
+ if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
+ }
+ isExpressInstallActive = false;
+ }
+ }
+ };
+}();
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
new file mode 100755
index 0000000..394a2db
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/BackgroundColorRenderer.as
@@ -0,0 +1,55 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package {
+
+ import mx.controls.Label;
+ import flash.display.Graphics;
+
+ public class BackgroundColorRenderer extends Label {
+
+ public static var symbol:String;
+
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+ var g:Graphics = graphics;
+
+ g.clear();
+
+ if (data && data.date && data.symbol == symbol)
+ {
+ if( data.change && data.change >= 0 )
+ {
+ g.beginFill(0x009900, 0.5);
+ g.drawRect(0, 0, unscaledWidth, unscaledHeight);
+ g.endFill();
+ }
+ else
+ {
+ g.beginFill(0xFF0000, 0.5);
+ g.drawRect(0, 0, unscaledWidth, unscaledHeight);
+ g.endFill();
+ }
+ }
+
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
new file mode 100755
index 0000000..64bd11c
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/ColorRenderer.as
@@ -0,0 +1,40 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package {
+
+ import mx.controls.Label;
+ import mx.controls.dataGridClasses.*;
+
+ public class ColorRenderer extends Label {
+
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ if (data && listData && data[DataGridListData(listData).dataField] < 0)
+ {
+ setStyle("color", 0xFF0000);
+ }
+ else
+ {
+ setStyle("color", 0x009900);
+ }
+ }
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/org/springframework/flex/samples/marketfeed/Stock.as
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/org/springframework/flex/samples/marketfeed/Stock.as b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/org/springframework/flex/samples/marketfeed/Stock.as
new file mode 100755
index 0000000..8612048
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/org/springframework/flex/samples/marketfeed/Stock.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// 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.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.springframework.flex.samples.marketfeed
+{
+ [RemoteClass(alias="org.springframework.flex.samples.marketfeed.Stock")]
+ [Bindable]
+ public class Stock
+ {
+ public var symbol:String;
+ public var name:String;
+ public var low:Number;
+ public var high:Number;
+ public var open:Number;
+ public var last:Number;
+ public var change:Number = 0;
+ public var date:Date;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
new file mode 100755
index 0000000..d5afdaa
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex-src/traderdesktop/src/traderdesktop.mxml
@@ -0,0 +1,147 @@
+<?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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ applicationComplete="initApp()">
+
+ <fx:Script>
+ <![CDATA[
+ import mx.collections.ArrayCollection;
+ import mx.controls.Alert;
+ import mx.messaging.MultiTopicConsumer;
+ import mx.messaging.events.MessageEvent;
+
+ import org.springframework.flex.samples.marketfeed.Stock;
+
+ [Bindable] private var items:ArrayCollection;
+
+ private var stockMap:Object;
+
+ private function initApp():void
+ {
+ stockMap = new Object();
+ items = new ArrayCollection();
+ addSymbol("IBM");
+ addSymbol("JBLU");
+ addSymbol("ADBE");
+ addSymbol("GE");
+ addSymbol("C");
+ consumer.subscribe();
+ }
+
+ private function deleteSymbol():void
+ {
+ var symbol:String = dg.selectedItem.symbol;
+ consumer.removeSubscription(symbol);
+ items.removeItemAt(dg.selectedIndex);
+ delete stockMap[symbol];
+ }
+
+ private function addSymbol(symbol:String):void
+ {
+ if (symbol == null || symbol == "")
+ {
+ Alert.show("Cannot add an empty symbol");
+ return;
+ }
+
+ symbol = symbol.toUpperCase();
+ if (stockMap.hasOwnProperty(symbol))
+ {
+ Alert.show("Symbol '" + symbol + "' is already in the list");
+ return;
+ }
+
+ var stock:Stock = new Stock();
+ stock.symbol = symbol;
+ stockMap[symbol] = stock;
+ items.addItem(stock);
+ consumer.addSubscription(symbol);
+ }
+
+ private function messageHandler(event:MessageEvent):void
+ {
+ var changedStock:Stock = event.message.body as Stock;
+ var stock:Stock = stockMap[changedStock.symbol];
+
+ BackgroundColorRenderer.symbol = changedStock.symbol;
+
+ if (stock)
+ {
+ stock.open = changedStock.open;
+ stock.change = changedStock.change;
+ stock.last = changedStock.last;
+ stock.high = changedStock.high;
+ stock.low = changedStock.low;
+ stock.date = changedStock.date;
+ }
+ }
+
+ private function formatNumber(item:Object, column:DataGridColumn):String
+ {
+ return nf.format(item[column.dataField]);
+ }
+
+
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+
+ <mx:ChannelSet id="cs">
+ <mx:StreamingAMFChannel uri="/samples-spring/messagebroker/streamingamf"/>
+ <mx:AMFChannel uri="/samples-spring/messagebroker/amflongpolling"/>
+ <mx:AMFChannel uri="/samples-spring/messagebroker/amfpolling"/>
+ </mx:ChannelSet>
+
+ <mx:MultiTopicConsumer id="consumer" destination="market-feed" channelSet="{cs}" message="messageHandler(event)"/>
+ <mx:NumberFormatter id="nf" precision="2"/>
+
+ </fx:Declarations>
+
+ <s:Panel title="Watch List" top="20" left="20" bottom="20" right="20">
+ <mx:DataGrid id="dg" dataProvider="{items}" width="100%" height="100%" borderVisible="false">
+ <mx:columns>
+ <mx:DataGridColumn headerText="Symbol" dataField="symbol" width="80"/>
+ <mx:DataGridColumn headerText="Open" dataField="open" labelFunction="formatNumber" textAlign="right" width="60"/>
+ <mx:DataGridColumn headerText="Last" dataField="last" itemRenderer="BackgroundColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
+ <mx:DataGridColumn headerText="Change" dataField="change" itemRenderer="ColorRenderer" labelFunction="formatNumber" textAlign="right" width="60"/>
+ <mx:DataGridColumn headerText="High" dataField="high" labelFunction="formatNumber" textAlign="right" width="60"/>
+ <mx:DataGridColumn headerText="Low" dataField="low" labelFunction="formatNumber" textAlign="right" width="60"/>
+ </mx:columns>
+ </mx:DataGrid>
+ <s:controlBarLayout>
+ <s:VerticalLayout paddingTop="8" paddingLeft="8" paddingBottom="8" paddingRight="8"/>
+ </s:controlBarLayout>
+ <s:controlBarContent>
+ <s:RichText width="100%">
+ <s:text>The stocks available in the sample feed are: XOM, WMT, GM, CVX, COP, GE, C, AIG, GOOG, ADBE, JBLU, COKE, GENZ, YHOO, IBM, BA, SAP, MOT, VZ, MCD.</s:text>
+ </s:RichText>
+ <s:HGroup width="100%">
+ <s:TextInput id="symbol" enter="addSymbol(symbol.text);symbol.text='';" width="50"/>
+ <s:Button label="Add Symbol" click="addSymbol(symbol.text);symbol.text='';"/>
+ <mx:Spacer width="100%"/>
+ <s:Button label="Delete Symbol" click="deleteSymbol()" enabled="{dg.selectedItem}"/>
+ </s:HGroup>
+ </s:controlBarContent>
+ </s:Panel>
+
+</s:Application>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex/messaging-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex/messaging-config.xml b/attic/apps/samples-spring/WEB-INF/flex/messaging-config.xml
new file mode 100755
index 0000000..3357c06
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex/messaging-config.xml
@@ -0,0 +1,32 @@
+<?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.
+
+-->
+<service id="message-service"
+ class="flex.messaging.services.MessageService">
+
+ <adapters>
+ <adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true" />
+ <!-- <adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/> -->
+ </adapters>
+
+ <default-channels>
+ <channel ref="my-polling-amf"/>
+ </default-channels>
+
+</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex/proxy-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex/proxy-config.xml b/attic/apps/samples-spring/WEB-INF/flex/proxy-config.xml
new file mode 100755
index 0000000..fc14786
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex/proxy-config.xml
@@ -0,0 +1,43 @@
+<?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.
+
+-->
+<service id="proxy-service"
+ class="flex.messaging.services.HTTPProxyService">
+
+ <properties>
+ <connection-manager>
+ <max-total-connections>100</max-total-connections>
+ <default-max-connections-per-host>2</default-max-connections-per-host>
+ </connection-manager>
+ <allow-lax-ssl>true</allow-lax-ssl>
+ </properties>
+
+ <adapters>
+ <adapter-definition id="http-proxy" class="flex.messaging.services.http.HTTPProxyAdapter" default="true"/>
+ <adapter-definition id="soap-proxy" class="flex.messaging.services.http.SOAPProxyAdapter"/>
+ </adapters>
+
+ <default-channels>
+ <channel ref="my-amf"/>
+ </default-channels>
+
+ <destination id="DefaultHTTP">
+ </destination>
+
+</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex/remoting-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex/remoting-config.xml b/attic/apps/samples-spring/WEB-INF/flex/remoting-config.xml
new file mode 100755
index 0000000..ed937fa
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex/remoting-config.xml
@@ -0,0 +1,31 @@
+<?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.
+
+-->
+<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>
+
+</service>
http://git-wip-us.apache.org/repos/asf/flex-blazeds/blob/75229759/attic/apps/samples-spring/WEB-INF/flex/services-config.xml
----------------------------------------------------------------------
diff --git a/attic/apps/samples-spring/WEB-INF/flex/services-config.xml b/attic/apps/samples-spring/WEB-INF/flex/services-config.xml
new file mode 100755
index 0000000..b6c5647
--- /dev/null
+++ b/attic/apps/samples-spring/WEB-INF/flex/services-config.xml
@@ -0,0 +1,122 @@
+<?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.
+
+-->
+<services-config>
+
+ <services>
+ <service-include file-path="remoting-config.xml" />
+ <service-include file-path="proxy-config.xml" />
+ <service-include file-path="messaging-config.xml" />
+ <default-channels>
+ <channel ref="my-amf"/>
+ </default-channels>
+ </services>
+
+ <channels>
+
+ <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
+ </channel-definition>
+
+ <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
+ <endpoint url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure" class="flex.messaging.endpoints.SecureAMFEndpoint"/>
+ <properties>
+ <add-no-cache-headers>false</add-no-cache-headers>
+ </properties>
+ </channel-definition>
+
+ <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
+ <properties>
+ <polling-enabled>true</polling-enabled>
+ <polling-interval-seconds>4</polling-interval-seconds>
+ </properties>
+ </channel-definition>
+
+ <channel-definition id="my-longpolling-amf" class="mx.messaging.channels.AMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amflongpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
+ <properties>
+ <polling-enabled>true</polling-enabled>
+ <polling-interval-seconds>5</polling-interval-seconds>
+ <wait-interval-millis>60000</wait-interval-millis>
+ <client-wait-interval-millis>1</client-wait-interval-millis>
+ <max-waiting-poll-requests>200</max-waiting-poll-requests>
+ <user-agent-settings>
+ <!-- MSIE 5, 6, 7 default max number of permanent HTTP connections is 2. -->
+ <user-agent match-on="MSIE" max-streaming-connections-per-session="1"/>
+ <!-- MSIE 8 max number is 6. -->
+ <user-agent match-on="MSIE 8" max-streaming-connections-per-session="5"/>
+ <!-- Firefox 1, 2 max number is 2. -->
+ <user-agent match-on="Firefox" max-streaming-connections-per-session="1"/>
+ <!-- Firefox 3 max number is 6. -->
+ <user-agent match-on="Firefox/3" max-streaming-connections-per-session="5"/>
+ <!-- Safari 3, 4 max number is 4. -->
+ <user-agent match-on="Safari" max-streaming-connections-per-session="3"/>
+ <!-- Chrome 0, 1, 2 max number is 6. -->
+ <user-agent match-on="Chrome" max-streaming-connections-per-session="5"/>
+ <!-- Opera 7, 9 max number is 4.-->
+ <user-agent match-on="Opera" max-streaming-connections-per-session="3"/>
+ <!-- Opera 8 max number is 8. -->
+ <user-agent match-on="Opera 8" max-streaming-connections-per-session="7"/>
+ <!-- Opera 10 max number is 8. -->
+ <user-agent match-on="Opera 10" max-streaming-connections-per-session="7"/>
+ </user-agent-settings>
+ </properties>
+ </channel-definition>
+
+ <channel-definition id="my-streaming-amf" class="mx.messaging.channels.StreamingAMFChannel">
+ <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/streamingamf" class="flex.messaging.endpoints.StreamingAMFEndpoint"/>
+ </channel-definition>
+
+ </channels>
+
+ <security>
+ <login-command class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
+ <security-constraint id="trusted">
+ <roles>
+ <role>ROLE_USER</role>
+ <role>ROLE_ADMIN</role>
+ </roles>
+ </security-constraint>
+ </security>
+
+ <logging>
+ <target class="flex.messaging.log.ConsoleTarget" level="Warn">
+ <properties>
+ <prefix>[BlazeDS] </prefix>
+ <includeDate>false</includeDate>
+ <includeTime>false</includeTime>
+ <includeLevel>false</includeLevel>
+ <includeCategory>false</includeCategory>
+ </properties>
+ <filters>
+ <pattern>Endpoint.*</pattern>
+ <pattern>Service.*</pattern>
+ <pattern>Configuration</pattern>
+ </filters>
+ </target>
+ </logging>
+
+ <system>
+ <redeploy>
+ <enabled>false</enabled>
+ </redeploy>
+ </system>
+
+</services-config>