⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 defaultpageform.java

📁 开源项目CRM之OpenCustomer
💻 JAVA
字号:
/*******************************************************************************
 * ***** BEGIN LICENSE BLOCK Version: MPL 1.1
 * 
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with the
 * License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
 * 
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.
 * 
 * The Original Code is the OpenCustomer CRM.
 * 
 * The Initial Developer of the Original Code is Thomas Bader (Bader & Jene
 * Software-Ingenieurb黵o). Portions created by the Initial Developer are
 * Copyright (C) 2005 the Initial Developer. All Rights Reserved.
 * 
 * Contributor(s): Thomas Bader <thomas.bader@bader-jene.de>
 * 
 * ***** END LICENSE BLOCK *****
 */

package org.opencustomer.application.web.module.crm.company.edit;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.opencustomer.application.db.vo.crm.CompanyVO;
import org.opencustomer.application.web.module.crm.company.Constants;
import org.opencustomer.application.web.struts.ActionForm;

public abstract class DefaultPageForm extends ActionForm
{
    private String doSave;

    private String doCancel;

    private String doDelete;

    private String doPage1;

    private String doPage2;

    private String doPage3;

    private String doPage4;

    private String doPageAddress;

    public ActionErrors check(ActionMapping mapping, HttpServletRequest request)
    {
        ActionErrors errors = new ActionErrors();

        CompanyVO companyVO = (CompanyVO) request.getSession().getAttribute(Constants.COMPANY_COMPANY);
        if (getDoPage4() != null && companyVO.getId() == null)
        {
            errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage("domain.crm.company.error.page4Invalid"));
        }
        return errors;
    }

    public final String getDoPage1()
    {
        return doPage1;
    }

    public final void setDoPage1(String doPage1)
    {
        this.doPage1 = doPage1;
    }

    public String getDoPage2()
    {
        return doPage2;
    }

    public void setDoPage2(String doPage2)
    {
        this.doPage2 = doPage2;
    }

    public final String getDoPage3()
    {
        return doPage3;
    }

    public final void setDoPage3(String doPage3)
    {
        this.doPage3 = doPage3;
    }

    public final boolean isAnyPage()
    {
        return doPage1 != null || doPage2 != null || doPage3 != null || doPage4 != null || doPageAddress != null;
    }

    public final String getDoPage4()
    {
        return doPage4;
    }

    public final void setDoPage4(String doPage4)
    {
        this.doPage4 = doPage4;
    }

    public final String getDoCancel()
    {
        return doCancel;
    }

    public final void setDoCancel(String doCancel)
    {
        this.doCancel = doCancel;
    }

    public final String getDoSave()
    {
        return doSave;
    }

    public final void setDoSave(String doSave)
    {
        this.doSave = doSave;
    }

    /**
     * @return Returns the doPageAddress.
     */
    public final String getDoPageAddress()
    {
        return doPageAddress;
    }

    /**
     * @param doPageAddress The doPageAddress to set.
     */
    public final void setDoPageAddress(String doPageAddress)
    {
        this.doPageAddress = doPageAddress;
    }

    /**
     * @return Returns the doDelete.
     */
    public final String getDoDelete()
    {
        return doDelete;
    }

    /**
     * @param doDelete The doDelete to set.
     */
    public final void setDoDelete(String doDelete)
    {
        this.doDelete = doDelete;
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -