Showing posts with label ui. Show all posts
Showing posts with label ui. Show all posts

Wednesday, March 12, 2008

RichFaces Portlet Archetype

I just finished creating a Maven archetype for the RichFaces portlet using the JBoss Portlet Bridge. An archetype basically gives you a empty project shell with all of the proper config files and package names that are custom to your project. It comes packaged with a simple demo of the RichFaces ajax repeater code.

From the command line run:
mvn archetype:create -DarchetypeGroupId=org.jboss.portletbridge.archetypes -DarchetypeArtifactId=richfaces-basic
-DarchetypeVersion=1.0.0-SNAPSHOT -DgroupId=org.whatever.project -DartifactId=myprojectname
-DremoteRepositories=http://snapshots.jboss.org/maven2/
Navigate to the newly created project folder and run mvn install - now you are ready to deploy the war file located in the target directory.

Thursday, November 15, 2007

Seam 2.0 Portlet Example

Update - This post is deprecated. Please see this article about the new JBoss Portlet Bridge.


We are happy to announce a "technology preview" of the JBoss Portal Seam 2.0 portlet. Thanks to the hard work of the JSR-301 Expert Group we are able to integrate the Seam Booking Example via a portlet. However, there are still some limitations and RichFaces is currently not integrated.
For the booking example, we have replaced RichFaces components with standard JSF RI 1.2 components.
We made this example beyond easy to get up and running and it shouldn't take more than a few minutes to have it running locally on your machine.

Prerequisites
  • Install latest version of Maven 2.x
  • Checkout the project using a subversion client from http://anonsvn.jboss.org/repos/portletbridge/trunk/examples/seam/booking
  • I used a Mysql database for this demo. You can use any of the DBs that Jboss Portal supports but for the sake of following along with this tutorial, I recommend downloading and starting a Mysql instance on your local machine.

Local Setup
Once you have Mysql started, login to the mysql console as root and run the following:
create database jbossportal;

GRANT ALL PRIVILEGES ON jbossportal.* TO 'jbossportal'@'localhost' IDENTIFIED BY 'jbossportal';

That's it!

Now, navigate to the root of the SeamBookingPortlet application and run
mvn install

Once the build is finished and successful, navigate to SeamBookingPortlet/ear and run
mvn cargo:start

*Note - this will take a few minutes. This downloads JBoss AS 4.2.2.GA along with the core installation of JBoss Portal 2.6.2. The download was around 100MB, but I removed as much as possible and got it down to 40MB. Once this is finished and the server is started, do yourself (and our servers ;) a favor and copy the zip file from SeamBookingPortlet/ear/target/installs/jboss-4.2.2.GA-2.6.2.zip to somewhere outside of this directory (anywhere on your machine) and open the ear/pom.xml to point to your new local file location. This can be changed at the bottom of the pom.xml file.

Now you are ready to deploy the SeamBookingDemo ear to your running JBoss server. Open a new console window and navigate to the same directory you were in SeamBookingPortlet/ear and run
mvn cargo:deploy

After you see that the Seam application has deployed. Open a new window/tab and visit http://localhost:8080/portal. You should see the Seam Booking application in a portlet window.

This example uses the core installation of JBoss Portal 2.6.2, Seam 2.0 GA, and the JSR-301 Bridge from MyFaces. The code for the booking demo is unmodified and a direct port from the Seam cvs repository. The modifications made to the JBoss AS download are minimal. First, I installed the core JBoss Portal 2.6.2 ( How to install). Then I added the datasource files for both Seam Booking and Portal. Finally I added the mysql driver to the server lib folder. That is all the changes that were made from the 4.2.2 GA release (other than I deleted around 50MB of unneeded files for this demo).

Thanks to the JSR 301 specification it is now possible to make Seam applications work in a Portlet environment. The next challenge for us, is to get Rich Faces components working in Seam applications in the same Portlet environment.

Thursday, November 1, 2007

JSFUnit is born

Well or at least it has its official blog!

I encourage you to have a look at it because it's a real progress in web UI unit testing which allow to test your web UI without relying on the underlying layer (CSS/HTML/HTTP) and make sure that your application behaves correctly when a user interacts with it.

Tuesday, August 28, 2007

User portlet UI improvements

Beside many other improvements in JBoss Portal 2.6.2 there will be also improvements for the user and role management UI. The most noticeable change is that we are going to provide two Portlets - one for actions related to the end user and one for administration of users and roles. That means we splitted the functionalities of the User Portlet and combined the user management functionalities with role managment in a new portlet, which will increase the easy of use and reusability.

The following list is a rough overview of further improvements

Lost password
If you forget your password it is now possible to retrieve a new password by email

Captcha support
We added JCaptcha to validate the registration process.



jBPM integration
The subscription of users can be bound to a jBPM workflow to validate the email and approve the registration by the admin. Out of the box we provide some common subscription modes:
  • automatic subscription (no jBPM)
  • validate email
  • validate email and approve by admin
Pending registrations can be approved or rejected within the User management portlet. Furthermore - using jBPM enables you to extend the workflow or define custom actions.


Last but not least - the new User Portlet is based on metadata exposed by the identity services in order to provide more flexible customizations.

Work in progress so stay tuned..