-1

I am a beginner in developping web applications i am trying to use jsf2.2 with primefaces4.0 and html5 for the design of the pages but i don't know how to start and what to do. i read some books but i still can't figure out how to create the pages and control them ( i have a prior knowledge on html, css,php and javascript). Can some one please give me some references of tutoriels on the internet beacause i did search alot but i still have no idea. I look to know how the structure of the pages? how to work with facelets and how to use the primefaces components? just an example will get me to the point. I am using eclipse Kepler and glassfish 4.

MeknessiHamida
  • 185
  • 1
  • 8
  • 28

3 Answers3

0

It is easy to find resources if you search correctly. see http://docs.oracle.com/javaee/6/tutorial/doc/bnaph.html for JSF http://www.primefaces.org/showcase/ui/home.jsf for Primeface components.

SAP
  • 468
  • 2
  • 14
0

You can also try below links for some running examples

http://www.mkyong.com/jsf2/primefaces/primefaces-hello-world-example/ http://www.coreservlets.com/JSF-Tutorial/jsf2/

Beginning JSF2 APIs and JBoss Seam is a also a good resource, it has shopping cart example app as well.

Mohit Saluja
  • 470
  • 7
  • 23
0

What i have done to start programming the jsf and primefaces was:

  1. Decide the IDE. I have chosen Netbeans because i find it more to my liking with some serious help at many tasks with wizzards and so on.
  2. Download the documentation for primefaces for certain! u will need it like hell to find out at least the basics and keep coding with the same examples it contains. Take a sample code and then make small changes the time as to see what u have changed and how it behaves with the changes.
  3. It is absolutely necessity to find an ebook or printing of the : Java EE 6 with GlassFish 3 Application Server (from packt publishing). It refers to the Netbeans IDE but the main idea of programming jsf 2 is the same. it may have some outdated info but u need to start only.
  4. U do not have the immediate need of css or html 5 when using primefaces and jsf 2 but only the basics of html which the ide is helping alot. Off course u may need it for advanced pages but...leave it after u learn the basics 1st!
  5. Use paper pencil draw paper pencil draw paper pencil draw! Draw the page at paper 1st! the old school isnt DEAD yet! While u learning use easy styling and not complicated design. Develop it step by step. Always start with the Layout 1st!

That were the general and a very fast advice!

As for the main Programming jsf u should know that :

  • For start u will always have 1 java class that will maintain all your fields shown in the page. U Call it Backing bean.
  • You will always have a xhtml or jsf for the graphic display(what u see in the browser) that will use the backing beans info to show anything u want. (if it is just a page with static data then the backing bean may not be in need)
  • If u have a backing bean u will surely need anothe java class called controller. This one navigates and becomes the intermediate of what u will display with where will fetch it to display.
  • U used to have a configuration file called web.xml. With Jsf 2.2 u dont have to use it but only for special situations.

All of the above can be summarised to these steps as start for netbeans:

  1. Create a web Application with Netbeans Wizzard
  2. In the project window (left side) create a new folder called resource
  3. in that new folder create at least 2 new folders. Called images, css. At the images folder u will put all your images (how suprising!)
  4. You project will already have an index page. This is the starting page for all web applicatons. Even it is just a site or an online Web application.
  5. Build the index page as u want it. and run the project.

Assuming u have installed the netbeans with the Glassfish or Tomcat Application Server ( I prefer Glassfish, yes i forgot to mention that u need an application server to get the web pagesand genrally the web application to run) enabled then after a while the browser will be displaying the page u just changed!

Hope u get the idea...but it is only the 0.01%. After doing the reading and experimenting u will reach at least the 30%! Just dont be dissapointed at first.

One last Advice is to start creating Web Site designs with little volatile things on it so that u get accustomed to the behavior. Then move on to the databases and even later to the security of a web application. If it absolutely necessity for u to learn the jsf 2 and primefaces and so try searching for a webminar or seminar. But u already know that right? Good luck to your studies!

ckinfos
  • 121
  • 1
  • 8
  • for the ide i am already familiar with eclipse and seem easier to me to work with it. and I already created the application and set the environment it's just that the primefaces user guide and cookbook are confusing me.I am not disspointed it's just that this application is my third year project and i need to impress my tutor . The database i already set it and the only remining thing is the design of the application – MeknessiHamida Nov 14 '13 at 08:14