Java tutorial
/* * JDynA, Dynamic Metadata Management for Java Domain Object * * Copyright (c) 2008, CILEA and third-party contributors as * indicated by the @author tags or express copyright attribution * statements applied by the authors. All third-party contributions are * distributed under license by CILEA. * * This copyrighted material is made available to anyone wishing to use, modify, * copy, or redistribute it subject to the terms and conditions of the GNU * Lesser General Public License v3 or any later version, as published * by the Free Software Foundation, Inc. <http://fsf.org/>. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this distribution; if not, write to: * Free Software Foundation, Inc. * 51 Franklin Street, Fifth Floor * Boston, MA 02110-1301 USA */ package it.cilea.osd.jdyna.controller; import it.cilea.osd.jdyna.model.Containable; import it.cilea.osd.jdyna.web.AbstractEditTab; import it.cilea.osd.jdyna.web.AbstractTab; import it.cilea.osd.jdyna.web.IPropertyHolder; import javax.servlet.http.HttpServletRequest; import org.springframework.web.servlet.ModelAndView; public class TabController<H extends IPropertyHolder<Containable>, T extends AbstractTab<H>, ET extends AbstractEditTab<H, T>> extends ATabsController<H, T> { private Class<ET> editTabClass; public TabController(Class<T> tabsClass, Class<ET> editTabsClass) { super(tabsClass); this.editTabClass = editTabsClass; } @Override protected ModelAndView handleDelete(HttpServletRequest request) { String tabId = request.getParameter("id"); Integer paramIntegerId = Integer.parseInt(tabId); getApplicationService().decoupleEditTabByDisplayTab(paramIntegerId, editTabClass); return super.handleDelete(request); } public Class<ET> getEditTabClass() { return editTabClass; } }