Calling Seam component from JavaFX

To use JavaFX in enterprise, you need to be able to connect JavaFX to enterprise backend such as Java EE, Seam or Spring. Here is an example how to call Seam component from JavaFX using Exadel Flamingo.

Seam component (server side)

public class MessageManager {

   public String callMe () {
        return "Seam component says: what's up"?;

JavaFX (client side)

public interface MessageManager {
   public String callMe ();
public class AppServiceFactory {
   public static MessageManager getMessageManager() {
	return (MessageManager) ServiceFactory.getService(MessageManager.class,

JavaFX script:

var reply : String;
function call(): Void {
     reply = AppServiceFactory.getMessageManager().callMe();

That’s it. Simple, easy and transparent. Seam is used the same way if you were building a JSF-based application.

Leave a Comment

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

You are commenting using your 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.