You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sebastien Arbogast <se...@gmail.com> on 2005/05/21 18:19:16 UTC

Re: [Spring][SOLVED] Editing business data and updating the persistent store

I got it ! In fact I just moved the user updating procedure back to
the service bean by creating some updateUser(name, password, active,
email) method and now everything works fine.

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");
        
        schaman.updateUser(model.userName,model.userPassword,model.userActive,model.userEmail);
        
        cocoon.sendPage("users-list");
    }
    else{
        //TODO gestion d'erreurs
    }    
}

Thanks for your help Ugo (or should I say, the CHS-Guy ;-))

-- 
Sebastien ARBOGAST

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