public class TypeActiviteAction extends ActionSupport implements Preparable{
private ITypeActivite typeActiviteDao;
private ITypeActiviteU typeActiviteUDao;
private String type;
private String libelle;
private String u;
public void setType(String type) {
this.type = type;
}
public void setLibelle(String libelle){
this.libelle = libelle ;
}
public void setU(String u) {
this.u = u;
}
public void prepare() throws Exception {
TypeActiviteU U = typeActiviteUDao.getTypeUById(u);
typeActivite = new TypeActivite(type, libelle, U);
}
public String save() {
typeActiviteDao.createTypeActivite(typeActivite);
return SUCCESS;
}
Partager