Personal tools

Views

Flex 2 Tag Library for JSP

From Adobe Labs

Note: Flex 2 Tag Library for JSP is included as part of Adobe® LiveCycle® Data Services ES and is now shipping on Adobe.com.

Table of contents

What is the Flex 2 Tag Library for JSP?

The Flex™ 2 Tag Library for JSP is a set of JSP tags that you can use to embed Flex applications to a JSP page. This is prerelease software.

The <mxml> tag compiles the MXML code, if required, and then generates the HTML fragment to load Adobe® Flash® Player and the resulting SWF file in your JSP page. You can use do this in two different ways. The source tag attribute lets you specify the source file to compile. This is useful because the JSP tag writes the HTML fragment for you. The other approach is to specify the source as the body content of the tag. Then, you use JSP scriptlets to generate the MXML source.

The <flashvar> tag lets you to pass variables to a Flex application. You access these variables by using the Application.application.parameters object.

Although the Flex 2 Tag Library for JSP is similar to the tag library in Flex 1.x, there are some differences. The tag attributes of the <mxml> tag are simpler; full control of all the HTML wrapper attributes is no longer available. However, the tag library includes attributes that enable history management and Flash Player detection on a per-tag basis. The <param> tag that let you add Flash Player parameters to the HTML wrapper was eliminated in an effort to simplify tag usage. The <flash> tag, which generated an HTML wrapper for a pregenerated SWF file, was eliminated also.

When Should I Use the Flex 2 Tag Library for JSP?

You should use the Flex 2 Tag Library for JSP to do any of the following:

What Are the Limitations?

If you use the Flex 2 Tag Library for JSP incorrectly, overall application performance can suffer because of excessive recompilation. In general, there are no performance concerns if you use the <mxml> tag and compile MXML source code by using the source attribute.

The following alternate approaches do not modify the actual MXML code that a JSP page generates and do not cause excessive recompilations. Before deciding to use the tag library with your application with inline MXML source code, consider whether one of the following options would be more appropriate:

What Do I Need to Use It?

The Flex 2 Tag Library for JSP requires the following:

Download and Installation

Flex 2 Tag Library for JSP is included as part of Adobe® LiveCycle® Data Services ES and is now shipping on Adobe.com.

Flex 2 Tag Library for JSP Reference

Tag

Description

Attributes

<mxml>

Compiles the MXML code and generates the HTML wrapper. Include MXML source as body content or specify an external source file with the source attribute.

  • source - Location of the MXML code to compile.
  • id - Name used to expose the SWF file through the id or name attribute of the HTML object or embed tag.
  • height - Height of the MXML wrapper.
  • width - Width of the MXML wrapper.
  • useHistoryManagement - Include history management for the Flex application.
  • usePlayerDetection - Include Flash Player detection for the Flex application.
  • useExpressInstall - Install Flash Player through Express Install; ignored if Flash Player detection is disabled.
  • alternateContentPage - Present this alternate page when the Flash Player version is unavailable; ignored if Flash Player detection is disabled.

<flashvar>

Specifies a variable to pass to your Flex Application.

  • name - Specifies the name of the flashvar variable.
  • value - Specifies the value of the flashvar variable.

How Do I Find Out More?

The following sections of the Flex 2 documentation may be helpful in understanding the JSP tag attributes-

Retrieved from "http://labs.adobe.com/wiki/index.php/Flex_2_Tag_Library_for_JSP"