> The problem is that your "user" object is detached at the end of the
> first request, so it stays detached after form.showForm returns and
> Hibernate has no way of detecting that it has been modified. In order
> to reattach it to the current session, you have to do a
> session.update(user).
I understand but I have no access to my session from flowscript. The
only interface I have is the service bean (schaman).
> I think you'll have more replies on the Hibernate forum, though.
Are you sure ? Because the problem seems more linked to the way
flowscript works.
And the thing is I tried to reattach user to the session by retrieving
it again from the service:
function editUser(username){
getSchaman();
var form = new Form("forms/edit_user_d.xml");
var model = form.getModel();
var user = schaman.getUserByName(username);
if(user != null){
model.userName = user.getName();
model.userEmail = user.getEmail();
model.userActive = user.isActive();
form.showForm("internal/display-user-edition-form");
user = schaman.getUserByName(model.userName); //This is the line I added
user.setEmail(model.userEmail);
user.setActive(model.userActive);
if(model.userPassword != null && model.userPassword.length() > 0){
user.setPassword(DigestUtils.md5Hex(model.userPassword));
}
cocoon.sendPage("users-list");
}
else{
//TODO gestion d'erreurs
}
}
But there is absolutely no change. WDYT ?
--
Sebastien ARBOGAST
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]