?? page.java
字號:
// Copyright 2005-2007 onetsoft.com
//
// Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.onetsoft.fastjsp;
import java.util.Locale;
/**
* 可用于保存:
* 1.由url或form傳遞過來頁面參數/對象
* 2.客戶端用戶狀態
* 3.當前頁面數據操作方法
* 特別場合也可用于緩存頁面數據
* 注:所有頁面對象應繼承自 AbstractPage
*
* @author <a href="mailto:hgw@onetsoft.com">hgw</a>
*/
public interface Page extends Component {
/**
* 取得文件名稱
*
* @return page name without extension e.g:"index"
*/
String getName();
/**
* 頁面 request URL
* 注:不能直接在jsp頁面調用"request.getRequestURL()",因為WAS會返回實際模板路徑構建的URL.
* @return
*/
String getRequestURL();
/**
* 取得頁面標題
*
* @return
*/
String getTitle();
/**
* 取得客戶端locale
*
* @return
*/
Locale getLocale();
/**
* 設置客戶端Locale
* 此設置將同時保存到本地 cookie 中
*
* @param locale
*/
void setLocale(Locale locale);
/**
* 取得模板根目錄
* 一般用于取得客戶端共享資源,如:JS、Style等
*
* @return e.g;"/onet/onetforums"
*/
String getTemplateContextBase();
/**
* 取得當前頁面的模板絕對路徑
* 此路徑一般用于URL訪問模板靜態資源,如圖片、CSS文件等。
* 需要時,可將此路徑作為頁面的base標簽。
*
* @return e.g;"http://locahost/onet/onetforums/skins/bbs/default/"
*/
String getTemplateContextPath();
/**
* 取得當前頁面模塊
* @return
*/
PageModule getPageModule();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -