cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Arbogast <sebastien.arbog...@gmail.com>
Subject [Spring] Editing business data and updating the persistent store
Date Sat, 21 May 2005 01:30:26 GMT
Hi,

I'm using spring 1.1.5 and Hibernate 2.1.8 as sublayers for Cocoon to
access my data.
The problem is that when I edit a bean coming from the spring layer (I
don't use binding framework for that because I have many custom things
to do), when the edition for is submited there is no "insert"
instruction sent to Hibernate (I can see it because all the Hibernate
instructions are logged) and the data is not updated. Here is the
flowscript of the code which displays the user  edition form :

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.setName(model.userName);
        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
    }    
}

Does anyone have an idea how I can force a data update or something like that ?

Thx in advance.

-- 
Sebastien ARBOGAST

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message