In order to populate Profile.jsp you set the value of each input field with the method in your backing bean.
I give an example from my project where we want to modify a device values such as name, msisdn, location etc.
<af:inputText id="location" required="true" value="#{ModifyDeviceManager.location}" shortDesc="#{msg['global.device.location.desc']}" />
ModifyDeviceManager is my backing bean and it has an attribute called: location and corresponding getLocation( ) and setLocation(
String s) methods. MyFaces uses
Java reflection to first get values and on submit set values. If the submit method has no return String ie void modifyDevice() then the same
jsp page will be displayed again, with any messages you have added to the context and the getter methods run again showing you that the input fields have been updated with the latest entry.
public String getLocation() {
return this.device.getLocation();
}
public void setLocation(String deviceLocation) {
this.device.setLocation(deviceLocation);
}
So in your case I am guessing you want the getter methods for a user profile to access the database and display the results to the user and if the user updates and submits, then the new values are stored in the database using the setter methods.