View Single Post
  #2 (permalink)  
Old 01-20-2008, 06:26 AM
loveshore loveshore is offline
Member
 
Join Date: Jan 2008
Posts: 2
loveshore is on a distinguished road
Crispy,
What i understand is that, you want to get all your component values in the doRegisteration() method.For this you don't need to put any extra effort. Since all managed beans are POJO's you can use the instance variables directly in the instance method.
I'm also a junior in the JSF world and hope i'm not confusing you.Anyway i'm attaching a piece code that can give you a more clear picture on this.


public class UserBean
{
private String firstName;

/**
* @return
*/
public String getFirstName() {
return firstName;
}

/**
* @param string
*/
public void setFirstName(String string) {
firstName = string;
}
public String registerUser() // your doRegistration method here
{
System.out.println("***ADDING REGISTERED USER ** ***"+firstName);
//You may add this user details to database or process in some other way, as usual
return "registered";
}

}
Reply With Quote