Home > Uncategorized > JSF Flex Framework

JSF Flex Framework

JSF Flex goal is to provide users capability in creating standard Flex components as JSF components {note dynamic charts and some other components are not part of standard Flex components}. So users would create the components as normal JSF components and the project will create the necessary MXML, SWC, SWF files and etcetera and link the values of the components back to the managed beans using JSON+Javascript and Actionscript. {standard Flex components have been open sourced through MPL license}

JSF Flex project contains concrete JSF component for each Flex component.

Each of the JSF component that needs to preserve the value will have the following syntax of values checked during the decode process

_ {i.e. for List _selectedIndex}. For certain components there will be a set of ids sent to the decode process {i.e. RadioButton component has two values checked during the JSF decode process { _selectedValue and _selected }.

JSF Flex project utilizes the myfaces build plugIn which automatically creates :

the concrete class for each abstract class of JSF component
the tag class for each JSF component
the tld file
the facesconfig.xml for the configuration
In order to view how to create such components, please refer to the current components within jsf-flex project.

better support for creating XMLList and its associated data for Facelet using dataBinding + static XML data
possible creation of Array + list of Objects using dataBinding to beans {similar implementation as for XMLList + XML}
Main points for JSF Flex Renderers

Main thing to note in terms of design for the renderers are the following :

Classes which are not concrete, meaning MXML.+TemplateRenderer will mainly have a method called mapFields which is simply to inspect either the replaceMapping XML or annotation {depending on the JRE version} to retrieve the values from the sub-class of UIComponent during the JSF Flex’s encodeBegin lifecycle.
Concrete classes have a method createPreMxml which is to create the preMxml file with the responsibility of creating these files lie with implementations of _FileManipulatorTaskRunner interface {default being VelocityFileManipulatorTaskRunnerImpl }. The implementation choice for this interface and two other interfaces _CommonTaskRunner and _FlexTaskRunner are determined during the maven build process.
MXMLComponentBaseRenderer class during the encodeEnd will write the body content of the component {i.e. MXMLScript} as long as the correct content is pushed to the attribute map. For an example, view the MXMLUIScriptTag within the jsf-flex project where the body content is pushed to the component’s attribute map as MXMLConstants.TAG_BODY_CONTENT_ATTR.
MXMLApplicationRenderer is a special class that has an added responsibility during its encodeEnd to
merge the preMxml files into a MXML file
create SWC file for the system’s library
extract the SWF file from SWC for the shared resource of all application SWF files
flush necessary resources {i.e. componentValueMapper.xml} for the system’s library to the correct directory
extract the flexSDK to the correct directory
create the application’s SWF file.

Further details and the source code: http://code.google.com/p/jsf-flex/

Categories: Uncategorized
  1. 04/22/2009 at 1:16 am

    Not that I’m impressed a lot, but this is more than I expected when I stumpled upon a link on Digg telling that the info is awesome. Thanks.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: