37 lines
1.2 KiB
Java
37 lines
1.2 KiB
Java
package it.acxent.anag.servlet;
|
|
|
|
import it.acxent.anag.Rubrica;
|
|
import it.acxent.anag.RubricaCR;
|
|
import it.acxent.anag.TipoPagamento;
|
|
import it.acxent.anag.TipoPagamentoCR;
|
|
import it.acxent.db.CRAdapter;
|
|
import it.acxent.db.DBAdapter;
|
|
import it.acxent.util.ReturnItem;
|
|
import javax.servlet.annotation.WebServlet;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
@WebServlet(urlPatterns = {"/admin/anag/Rubrica.abl"})
|
|
public class RubricaSvlt extends CliforSvlt {
|
|
private static final long serialVersionUID = 8804339707966839406L;
|
|
|
|
protected DBAdapter getBean(HttpServletRequest req) {
|
|
return new Rubrica(getApFull(req));
|
|
}
|
|
|
|
protected CRAdapter getBeanCR(HttpServletRequest req) {
|
|
return new RubricaCR(getApFull(req));
|
|
}
|
|
|
|
protected void prepareNewRecord(HttpServletRequest req, HttpServletResponse res) {
|
|
req.setAttribute("bean", getBean(req));
|
|
req.setAttribute("listaTipoPagamento", new TipoPagamento(getApFull(req))
|
|
.findByCR(new TipoPagamentoCR(), 0, 0));
|
|
req.setAttribute("RI", new ReturnItem(
|
|
req.getParameter("RI")));
|
|
}
|
|
|
|
protected String getBeanPageName(HttpServletRequest req) {
|
|
return "rubrica";
|
|
}
|
|
}
|