alertinfo.java

来自「这是一个轻便的j2ee的web应用框架,是一个在多个项目中运用的实际框架,采用s」· Java 代码 · 共 81 行

JAVA
81
字号
/*
 * Created on 2004-8-24
 *
 */
package com.esimple.framework.web.util;

/**
 * @author steven
 *
 */
public class AlertInfo {
	public static final String DEFAULT_KEY  = "alert";
	
	public static final String INFO_SUCCESS  = "操作成功!";
	public static final String INFO_SYSERROR = "发生系统内部错误";
	
	public static final String NEXTPAGE_BACK  = "NEXTPAGE_BACK";
	public static final String NEXTPAGE_CLOSE = "NEXTPAGE_CLOSE";
	
	private String title ="返回";
	private String message;
	private String nextPage="javaScript:history.go(-1);";
	private String target;

	public AlertInfo(String message){
		this.message = message;
		setNextPage(null);
	}
		
	public AlertInfo(String message,String nextPage,String target){
		this.message = message;
		setNextPage(nextPage);
		this.target = target;
	}
	
	public AlertInfo(String message,String nextPage){
		this.message = message;
		setNextPage(nextPage);
	}
	public void setMessage(String message){
		this.message = message;
	}	
	public String getMessage(){
		return this.message;
	}
	
	public void setNextPage(String nextPage){
		if( nextPage==null ) {
			nextPage = NEXTPAGE_BACK;
		} 
		if( nextPage.equals(NEXTPAGE_BACK)){
			nextPage="javascript:history.go(-1);";
		}
		if( nextPage.equals(NEXTPAGE_CLOSE)){
			nextPage="javascript:window.close();";
			title = "关闭";
		}
		this.nextPage = nextPage;
	}
	
	public String getNextPage(){
		return this.nextPage;
	}
	
	public void setTarget(String target){
		this.target = target;
	}
	
	public String getTarget(){
		return this.target;
	}
	
	public void setTitle(String title){
		this.title = title;
	}
	
	public String getTitle(){
		return this.title;
	}
}

⌨️ 快捷键说明

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