DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report

True Abstraction Revisited: Composite UI Components in JSF 2.0

Felipe Gaúcho user avatar by
Felipe Gaúcho
·
Dec. 30, 09 · Interview
Like (0)
Save
Tweet
Share
6.33K Views

Join the DZone community and get the full member experience.

Join For Free

I got some difficulties following the tutorial about creating components with JSF 2.0, mainly due to some obsolete instructions and Maven dependencies of the more than 1 year old original articles of Ed Burns. I wrote down upgrades instructions in a hope to help other newbies to create composite UI with JSF 2.0. Nevertheless, you should read the original text because I won't explain the concepts behind creating Composite User Interfaces and neither rephrase Ed Burns. I will just give you en updated version of the same project, with the same xhtml code. I am using Eclipse on the Karmic Koala Ubuntu 9.10 but the below instructions should work everywhere :)

The original articles from Ed Burns:

  • True Abstraction: Composite UI Components in JSF 2.0 -- Part 1
  • True Abstraction: Composite UI Components in JSF 2.0 -- Part 2

There are tons of related material on the web, but after reading several blogs and tutorials I've choosen the Mr. Burns' ones due to the simplicity of the example. If you know other good material to start learning UI composite elements with JSF 2.0, please write the URL in the bottom of this page. The original text is based on Netbeans and depends on a local copy of javaee and jsf libs. I replaced that for Maven dependencies and I also adapted the example to Eclipse but there is no dependency to any Eclipse feature, you are free to choose your IDE since the code is a pure Maven project.

  1. Install Glassfish v3 and Maven 2.x

  2. Download the sample project and unzip it somewhere

  3. Go to the folder you unziped the sample project and type the following commands:

    mvn -Dwtpversion=2.0 compile package eclipse:eclipse

    asadmin start-domain

    asadmin deploy target/jsf-example01.war

  4. Open the project URL with your browser: http://localhost:8080/jsf-example01/index.jsf

    You should see something like the below image:

You should be able to import the project in Eclipse and also to use the Glassfish Eclipse Plugin to run and/or debug the project directly inside the IDE. Be my guest to ask about this example, I am also learning here but eventually I am one step further :). And if you need advanced hints about JSF, please join the Mojarra mailing list, the quality and the velocity of the responses are impressive.

From http://weblogs.java.net/blog/felipegaucho

Abstraction (computer science)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Steel Threads Are a Technique That Will Make You a Better Engineer
  • Monolithic First
  • How To Choose the Right Streaming Database
  • DevOps for Developers: Continuous Integration, GitHub Actions, and Sonar Cloud

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: