Article: Developing Portlets using JSF, Ajax, and Seam (Part 2 of 3)

| by Ryan Slobojan Follow 0 Followers on Aug 25, 2008. Estimated reading time: less than one minute |

This article, the second in a three-part series by Wesley Hales, expands upon the previous article by introducing RichFaces. It covers integrating RichFaces into the previous sample application, deploying a RichFaces portlet, and several features and capabilities of RichFaces.

From the article:

One thing I will explain before we get started is the difference in JBoss Portal installations between this article and the previous one. In the last article we deployed to a JBoss App Server running the lightweight Portlet Container 2.0 demo. Since that article was published, we have released JBoss Portal 2.7 as a beta. This combines the old JSR-168 implementation of JBoss Portal with the new Portlet 2.0 implementation, giving us the ability to run 1.0 and 2.0 portlets in the standard JBoss Portal project. So if keeping track of what version you should be using seems confusing, it's not. Just keep in mind that JBoss Portal 2.7 is the ultimate combination of everything we have to offer and versions 2.6.x are the supported stable releases that only support JSR-168 (portlet 1.0).

Read the full article here.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Excellent series so far! by John Haselden

Thanks Wesley, this has proven to be a great series of articles so far and has arrived just at the right time for the project I'm working on! I can't wait for the third installment.


Thinking in Seam

Please provide an example to use JBoss Portal services with a4J by vineet tripathi

The sample application is wonderful to start with implementation of ajax on JSF portlet with JBoss portal. But when i send an ajax request using a4j to a bean action that uses Jboss -portal services , such as instanceContainer, PortalObjectContainer or userModule, i get an exception that says:
org.hibernate.HibernateException: Unable to locate current JTA transactio

Please provide an example that uses these services with ajax.

avoid "unable to locate current JTA transaction" for a4j & portal services by vineet tripathi

I got the solution for using JBoss portal services with a4j. The following is the solution
1)You need to demarcate your action with a JTA transaction:
* Start transaction
boolean isNewTransaction = true;
InitialContext ctx=null;
UserTransaction tx=null;
ctx = new InitialContext();
tx = (UserTransaction)ctx.lookup("UserTransaction");
System.out.println("transaction tx is>>>>>>>>>>>>>"+tx);
}catch(Exception e){
System.out.println("Exception occured>>>>>>"+e.getMessage());
isNewTransaction = false;
// e.printStackTrace();
* Start transaction end

/***Perform your actions by calling the JBoss portal services ****/

/**commit the transaction

System.out.println("Transaction commited *********************");
}catch(Exception e){
//"Exception occured");
* commit the transaction
If you are creating or destroying a portal object you need to load the object using following method to sync up your VO with Db:


Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

3 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you