well first of all ,why you need in use of model-driven interface, in your case you can simply render the bean on your view using action-support.,you have to something like this:
1: first you should populate the view before you want to update, i mean ,at the time you are redirected to your page from which you are going to update your database,on that time you should populate the data on view.
2: You can achieve this by making some changes in your action:
in your action
public void setProfileBean(UserProfile profileBean) {
this.profileBean = profileBean;
}
public UserProfile getProfile() {
return profileBean;
}
**i assume this is your target method**
public string execute()
{
UserProfile user=new UserProfile();
user.setProfileBean("whatever you want to set");
......
......
return SUCCESS;
}
Thats it, doing this struts2 will automatically populate the data on your view, make sure you have defined properties like this:
<s:property value="UserProfile .xyz">