📄 pagestandardform.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.person.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.apache.struts.action.ActionMessages;
import org.apache.struts.util.ImageButtonBean;
import org.opencustomer.application.db.vo.crm.PersonVO;
import org.opencustomer.application.web.module.crm.person.Constants;
import org.opencustomer.web.util.FormUtility;
public final class PageStandardForm extends DefaultPageForm
{
private static final long serialVersionUID = 3256437002093016884L;
private String firstName;
private String lastName;
private String gender;
private String nameAffix;
private String title;
private String email;
private String phone;
private String fax;
private String mobile;
private String comment;
private String degree;
private String function;
private ImageButtonBean doAddCompany = new ImageButtonBean();
private ImageButtonBean doJumpCompany = new ImageButtonBean();
public void validate(ActionMapping mapping, ActionMessages errors, HttpServletRequest request)
{
setDoPageStandard(null);
firstName = FormUtility.adjustParameter(firstName, 255);
lastName = FormUtility.adjustParameter(lastName, 255);
gender = FormUtility.adjustParameter(gender);
nameAffix = FormUtility.adjustParameter(nameAffix, 255);
title = FormUtility.adjustParameter(title, 255);
email = FormUtility.adjustParameter(email, 255);
phone = FormUtility.adjustParameter(phone, 50);
fax = FormUtility.adjustParameter(fax, 50);
mobile = FormUtility.adjustParameter(mobile, 50);
comment = FormUtility.adjustParameter(comment);
degree = FormUtility.adjustParameter(degree, 255);
function = FormUtility.adjustParameter(function, 255);
PersonVO personVO = (PersonVO) request.getSession().getAttribute(Constants.PERSON_PERSON);
if (getDoPageContact() != null && personVO.getId() == null)
{
errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage("domain.crm.person.error.page2Invalid"));
}
}
public final String getComment()
{
return comment;
}
public final void setComment(String comment)
{
this.comment = comment;
}
public final String getDegree()
{
return degree;
}
public final void setDegree(String degree)
{
this.degree = degree;
}
public final String getEmail()
{
return email;
}
public final void setEmail(String email)
{
this.email = email;
}
public final String getFax()
{
return fax;
}
public final void setFax(String fax)
{
this.fax = fax;
}
public final String getFirstName()
{
return firstName;
}
public final void setFirstName(String firstName)
{
this.firstName = firstName;
}
public final String getFunction()
{
return function;
}
public final void setFunction(String function)
{
this.function = function;
}
public final String getGender()
{
return gender;
}
public final void setGender(String gender)
{
this.gender = gender;
}
public final String getLastName()
{
return lastName;
}
public final void setLastName(String lastName)
{
this.lastName = lastName;
}
public final String getMobile()
{
return mobile;
}
public final void setMobile(String mobile)
{
this.mobile = mobile;
}
public final String getPhone()
{
return phone;
}
public final void setPhone(String phone)
{
this.phone = phone;
}
public final ImageButtonBean getDoAddCompany()
{
return doAddCompany;
}
public final void setDoAddCompany(ImageButtonBean doAddCompany)
{
this.doAddCompany = doAddCompany;
}
public final ImageButtonBean getDoJumpCompany()
{
return doJumpCompany;
}
public final void setDoJumpCompany(ImageButtonBean doJumpCompany)
{
this.doJumpCompany = doJumpCompany;
}
public final String getNameAffix()
{
return nameAffix;
}
public final void setNameAffix(String nameAffix)
{
this.nameAffix = nameAffix;
}
public final String getTitle()
{
return title;
}
public final void setTitle(String title)
{
this.title = title;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -