Archive for the 'Flex' Category

New Exadel Flamingo 2.2.0 is now on exadel.org

After months of promising we have finally moved Exadel Flamingo to exadel.org and released version 2.2.0. exadel.org is our community site for hosting open source projects. Flamingo is a light weight framework for connecting rich web and mobile user interfaces to enterprise back end.


Click on image to enlarge

Flamingo connects Seam, Spring, and Java EE 6 (soon via CDI/JSR299) with the following user interfaces:

  • JavaFX
  • Flash
  • iPhone/Android
  • Swing
  • JavaME

Version 2.2.0 is updated with Hessian 4 and JavaFX 1.3 support.

Server-side components, methods or services can be easily invoked from the above listed clients with minimal code. Flamingo provides the following features:

  • CRUD tools
  • Server-side integration
    • Calling server components/beans
    • Context variable binding/updating
    • Conversation support
    • Validation (Hibernate Validator)
    • EL support (Expression Language)
  • Server-side push
  • Client push (off line applications)


Click image to enlarge

As you can see from the image above, no matter what client you are using, invoking a method in your enterprise applications looks very similar which allows for great reuse.

How to get started?

  • Download Flamingo from http://exadel.org/flamingo.
  • The following are good resources to get started or learn more about Flamingo.
  • Check out the recent Enterprise JavaFX and Seam series. This series shows most server integration features in separate post and easy to follow examples.
  • We want to hear your feedback, please use project Jira or the forum to report bugs or any features you would like to see.

Mobile Enterprise Applications with Exadel Flamingo

The Mobilization of Enterprise Applications with Exadel Flamingo article on JavaLobby.com. Also check out Flamingo Q&A.

Exadel Fiji: new forum, issue tracker, JavaFX support, open source soon

Exadel Fiji extends JSF by allowing the use of Flex with JSF components and within a JSF page. It comes with ready-to-use charting components based on Flash as well as universal wrapper which allows to wrap any Flash component as JSF component.

We are working on Fiji version 2.0 which is going to be open source and also include a new tag to wrap any JavaFX applet as JSF component. We are going to host Fiji on exadel.org site. Work is still in progress but we have already made some changes to make it simpler for you to get involved. We now have a new Fiji forum on exadel.org (moved from Google Groups) and an issue tracker (Jira). This will enable you to request new features and enter any bugs you find. Once your register on exadel.org, you will be able to post on the forum and Jira.

Quick start with Fiji – RichFaces project for Flex template

I created a Fiji template project which you import into Eclipse, deploy and run. The applications demonstrates a number of Fiji charts and as well fiji:swf component which lets you import any Flash component into your JSF page.

What you need to do:
1. Download Fiji template: http://drop.io/kr9xii8.
2. In Eclipse, select File/Import/General/Existing Project Into Workspace
3. Click Next
4. Check Select archive file radio button and browse to the downloaded file.
5. Download Fiji from http://www.exadel.com/web/portal/download/fiji and add fiji-api-1.x.x..jar and fiji-ui-1.x.x to WEB-INF/lib directory in the template.
6. One last step is to deploy, I’m sure you know how to do it

A few notes:
- I’m using RichFaces 3.3.1 RC1, you can download a newer version if available.
- I tested the application with Tomcat 6

Fiji: RichFaces project for Flex

Check out Richfaces for Flex project, know as Exadel Fiji. Fiji allows to use JSF and Flex components together on the same page while binding Flex components to standard JSF managed beans. Fiji also provides 7 out-of-the-box Flash-based charting components.

Suppose you need to embed a Flex chart in your JSF page, to deliver richer content. This is all you need to do:

JSF page:

<h:form>
 <fiji:lineChart value="#{barChartBean.data}" title="Bar chart"
		   width="450" height="250">
   <fiji:chartData type="name" value="Just some numbers" />
 </fiji:lineChart>
</h:form>

Managed bean:

public class BarChartBean {
  public BarChartBean() {
  }
  private Integer[] data;
  public Integer[] getData() {
	return data;
  }
  @PostConstruct
  public void init () {
	data = new Integer[5];
	data[0] = 5;
	data[1] = 2;
	data[2] = -3;
	data[3] = 10;
	data[4] = 9;
 }
}

You will get this:
screenshot01.png

The most important thing is that you bind these components to standard JSF managed beans (or Seam components).


More Fiji resources

Fiji product page
Fiji demo
Fiji charting components (JSF, Flex and Elections)
Fiji article at dzone.com

Fiji is free until December 31 – JSF and Flex together

Fiji is free until December 31.

Fiji allows to use JSF and Flex components together on the same page while binding Flex components to standard JSF managed beans. Fiji also provides 7 out-of-the-box Flash-based charting components.

Fiji resources:

Fiji product page
Fiji demo
Fiji charting components (JSF, Flex and Elections)
Fiji article at dzone.com

Fiji example from richability

Nice Fiji post and example created by richability from Switzerland.

JSF, Flex, and Elections 2008

On the heels of elections this week, let me show you how you can use JSF and Flex to build nice looking Flash-based charts with elections results. To use JSF and Flex together, I will be using Exadel Fiji.

Let’s start with electoral votes and use a column chart. Below is an example using rich:columnChart component. It’s a static image here, but it’s actually a Flash component in a JSF page. As you move the mouse over columns, a tool tip is shown.

screenshot01.png

1
2
3
4
5
6
7
8
<rich:panel header="Elections 2008">
   <fiji:columnChart value="#{columnChart.data1}" width="350"
	 height="450" title="Electoral votes" captionX="Candidates"
	 captionY="Electoral Votes" barColors="#{columnChart.barColor}"
         toolTipValue="{x} has {y} {name}" rulersValuesHighlight="none">
	<fiji:chartData value="electoral votes" type="name" />
  </fiji:columnChart>
</rich:panel>

fiji:columnChart is a JSF component and renders a Flash chart. What’s really neat is that you can use standard JSF managed beans to provide data for the chart. Here is the managed bean (you can also use Seam components):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public class ColumnChart {
 
   private HashMap<String, Integer> data1;
   private ArrayList<String> barColor;
 
   public ColumnChart() {}
 
   @PostConstruct
   public void init() {
      data1 = new HashMap<String, Integer>();
      data1.put("Obama", 349);
      data1.put("McCain", 163);
 
      barColor = new ArrayList<String>();
      barColor.add("#003366");
   }
}

Easy, right?

Let’s move to bar chart using fiji:barChart component. This charts shows percentage of vote each candidate received.

screenshot02.png

1
2
3
4
5
6
<fiji:barChart value="#{barChart.data2}" width="450" height="250"
   title="% Vote" captionX="Candidates" captionY="Vote %"
   barColors="#{barChart.barColor}" toolTipValue="{x} has {y} {name}"
   rulersValuesHighlight="none">
	<fiji:chartData value="% vote" type="name" />
</fiji:barChart>

Managed bean for the chart:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public class ColumnChart {
 
   private HashMap<String, Integer> data2;
   private ArrayList<String> barColor;
 
   public ColumnChart() {}
 
   @PostConstruct
   public void init() {
      data2 = new HashMap<String, Integer>();
      data2.put("Obama", 53);
       data2.put("McCain", 46);
 
      barColor = new ArrayList<String>();
      barColor.add("#003366");
   }
}

There are other charts in Fiji such as stackedBarChart, stackedColumnChart and lineChart. You can see them all in action here.

These charts come out of the box with Fiji. What if you want to use a Flash component that you built or someone else did? You can use fiji:swf component to wrap any existing Flash module. I’m going to use a pie chart component made by amCharts.com . I will use the pie chart to show popular vote numbers.

screenshot04.png

1
2
3
4
5
6
7
8
9
<fiji:swf src="/elections/ampie.swf" bgcolor="#FFFFFF" 
   width="520" height="400">
   <f:param name="path" value="/elections" />
   <f:param name="settings_file"
    value="#{facesContext.externalContext.requestContextPath}/elections/ampie_settings.xml" />
   <f:param name="data_file"
    value="#{facesContext.externalContext.requestContextPath}/elections/ampie_data.xml" />
   <f:param name="preloader_color" value="#999999" />
</fiji:swf>

Using fiji:swf it’s possible to wrap any Flash component as JSF component. f:param is then used to provide data for the JSF component and in turn for the Flash module.

If you want to try Fiji, check out this article on dzone.com

Webinar: Using JSF and Flex Components Together

Learn how to use JSF and Flex components together using Fiji. This webinar will demonstrate a simple way to use JSF and Flex components on the same page and application while binding them to the same data model, similar to JSF managed beans. More.

Date: Thursday, October 23, 2008
Time: 2 p.m. (EDT)

Click to register.

Speaking at The Ajax Experience 2008, Boston

image003.gif

At the end of September I’m speaking at The Ajax Experience 2008 in Boston. My talk is on technologies available today for building enterprise Rich Internet Applications.

Link: Enterprise Rich Internet Application Tools: JSF, Flex, and JavaFX

Next Page »