UpdateAction.java :  » ERP-CRM-Financial » OpenXava-3.0 » org » openxava » actions » Java Open Source

Java Open Source » ERP CRM Financial » OpenXava 3.0 
OpenXava 3.0 » org » openxava » actions » UpdateAction.java
package org.openxava.actions;

import java.util.*;

import javax.ejb.*;



import org.openxava.model.*;
import org.openxava.validators.*;

/**
 * @author Javier Paniza
 */

public class UpdateAction extends UpdateReferenceBaseAction  {
  
  
  
  public void execute() throws Exception {    
    try {          
      // Update
      Map key = getView().getKeyValues();      
      MapFacade.setValues(getView().getModelName(), key, getValuesToSave());
      returnsToPreviousViewUpdatingReferenceView(key);
    }
    catch (ValidationException ex) {      
      addErrors(ex.getErrors());
    }
    catch (ObjectNotFoundException ex) {
      addError("no_modify_no_exists");
    }
  }
  
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.