Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to perform this in JSF

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey.
I am just playing with JSF 1.1 and I have the following questions :
I want to create an action listener (implementing javax.faces.event.
ActionListener).
this listener will gets the parameter from the first jsf page (register.jsf), and insert these values into a database (ofcourse using JDBC).
but the problem is I dont know how to get these parameters in JSF.
any ideas how to perform this ?
I am using a JavaBean to store the values entered by the user, but how
to get this bean in the second jsf page ?
(I am new to frameworks like JSF and struts, so if you any ideas to how
to perform my requirments , please tell me. something like : don't use
action listeners to insert data into the database, use ...).
I appreciate your help because I realy loved JSF.
thanks.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lend your hand amigo, I need some help here, any one will help ??
 
James Holmes
Author
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

You need to bind your JSF UI Components to your backing bean. This is done using the JSF tag library tags. When the form is submitted, JSF will take care of populating the bean for you. You can put the bean in either request or session scope. If in session scope, you can access the bean from multiple pages.

I recommend you link into some of the articls and tutorials on my website. They should give you tons of help.

http://www.jamesholmes.com/JavaServerFaces/

-James
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic