📄 actionforwards.java
字号:
package com.exp.web.util.navigation;
import java.util.Hashtable;
import com.exp.fcl.xml.EXPXMLNode;
/**
* 导航类
* <p>
* Title: jstrd 基础技术平台
* </p>
* <p>
* Description: jstrd 基础技术平台
* </p>
* <p>
* Copyright: Copyright (c) jstrd 2004-2008
* </p>
* <p>
* Company: jstrd
* </p>
*
* @author zhanghf
* @version 3.0.0.0
*/
public class ActionForwards {
private static final String DEFAULT_SUBJECT = "default";
private Hashtable hsForwards = new Hashtable();
public ActionForwards() {
}
public ActionForwards(EXPXMLNode actionNode) {
int nCount = actionNode.getChildNodesCount();
for (int i = 0; i < nCount; i++) {
EXPXMLNode child = actionNode.getChildNode(i);
String subject = child.getNodeName();
String url = child.getNodeValue();
String forward = child.getAttributeValue("forward");
url = url.trim();
if (!url.equals("")) {
this.addForward(subject, new Forward(subject, url, forward));
}
}
}
public void addForward(String subject, Forward forward) {
this.hsForwards.put(subject.toLowerCase(), forward);
}
public Forward getForward(String subject) {
if ("".equals(subject) || subject == null) {
return (Forward) this.hsForwards.get(DEFAULT_SUBJECT);
} else {
return (Forward) this.hsForwards.get(subject);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -