📄 showpersonsform.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;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.util.ImageButtonBean;
import org.opencustomer.application.web.struts.ActionForm;
import org.opencustomer.web.util.FormUtility;
import org.opencustomer.web.util.Sort;
public final class ShowPersonsForm extends ActionForm
{
private static final long serialVersionUID = 3258135743162364472L;
private String firstName;
private String lastName;
private String companyName;
private String phone;
private String fax;
private String mobile;
private String email;
private ImageButtonBean doSearch = new ImageButtonBean();
private ImageButtonBean doResetSearch = new ImageButtonBean();
private String sort;
private int page;
public void validate(ActionMapping mapping, ActionMessages errors, HttpServletRequest request)
{
firstName = FormUtility.adjustParameter(firstName);
lastName = FormUtility.adjustParameter(lastName);
companyName = FormUtility.adjustParameter(companyName);
phone = FormUtility.adjustParameter(phone);
fax = FormUtility.adjustParameter(fax);
email = FormUtility.adjustParameter(email);
mobile = FormUtility.adjustParameter(mobile);
sort = FormUtility.adjustParameter(sort);
sort = Sort.parseRequest(request, sort);
if (!isTokenValid(request) || doResetSearch.isSelected())
reset();
}
public void reset()
{
firstName = null;
lastName = null;
companyName = null;
phone = null;
fax = null;
email = null;
mobile = null;
}
public final String getCompanyName()
{
return companyName;
}
public final void setCompanyName(String companyName)
{
this.companyName = companyName;
}
public final ImageButtonBean getDoSearch()
{
return doSearch;
}
public final void setDoSearch(ImageButtonBean doSearch)
{
this.doSearch = doSearch;
}
public final ImageButtonBean getDoResetSearch()
{
return doResetSearch;
}
public final void setDoResetSearch(ImageButtonBean doResetSearch)
{
this.doResetSearch = doResetSearch;
}
public final int getPage()
{
return page;
}
public final void setPage(int page)
{
this.page = page;
}
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 getPhone()
{
return phone;
}
public final void setPhone(String phone)
{
this.phone = phone;
}
public final String getFirstName()
{
return firstName;
}
public final void setFirstName(String firstName)
{
this.firstName = firstName;
}
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;
}
/**
* @return Returns the sort.
*/
public final String getSort()
{
return sort;
}
/**
* @param sort The sort to set.
*/
public final void setSort(String sort)
{
this.sort = sort;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -