Package com.adito.replacementproxy.forms

Examples of com.adito.replacementproxy.forms.ReplacementsForm


    public ActionForward swap(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
        int idx1 = Integer.parseInt(request.getParameter("idx1"));
        int idx2 = Integer.parseInt(request.getParameter("idx2"));
        ReplacementsForm rf = (ReplacementsForm) form;
        ReplacementItem item1 = (ReplacementItem) rf.getReplacementItems().get(idx1);
        ReplacementItem item2 = (ReplacementItem) rf.getReplacementItems().get(idx2);
        Replacement rep1 = item1.getReplacement();
        Replacement rep2 = item2.getReplacement();
        String mimeType1 = rep1.getMimeType();
        String sitePattern1 = rep1.getSitePattern();
        String matchPattern1 = rep1.getMatchPattern();
View Full Code Here


    }

    public ActionForward remove(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
        List sel = new ArrayList();
        ReplacementsForm rf = (ReplacementsForm) form;
        int selectedSequence = Integer.parseInt((String) request.getParameter("sequence"));
        for (Iterator i = rf.getReplacementItems().iterator(); i.hasNext();) {
            ReplacementItem item = (ReplacementItem) i.next();
            if (item.getReplacement().getSequence() == selectedSequence) {
                sel.add(item.getReplacement());
            }
        }
View Full Code Here

        return mapping.findForward("create");
    }

    public ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
        ReplacementsForm rf = (ReplacementsForm) form;
        int selectedSequence = Integer.parseInt((String) request.getParameter("sequence"));
        List sel = new ArrayList();
        for (Iterator i = rf.getReplacementItems().iterator(); i.hasNext();) {
            ReplacementItem item = (ReplacementItem) i.next();
            if (item.getReplacement().getSequence() == selectedSequence) {
                sel.add(item.getReplacement());
            }
        }
View Full Code Here

TOP

Related Classes of com.adito.replacementproxy.forms.ReplacementsForm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.