📄 mymenu.java
字号:
package com.sxit.wap.common;
import com.sxit.wap.admin.*;
import com.sxit.wap.adminpurview.*;
public class MyMenu {
AdminInfoModel adminInfoModel = null;
public MyMenu(AdminInfoModel adminInfoModel1) {
this.adminInfoModel = adminInfoModel1;
}
public String buildItem(String menuName, short purviewCode, int selectedMenuItem, String menuUrl, String target) {
String value = "";
try {
if (AdminPurviewBean.validPurview(adminInfoModel, purviewCode)) {
value = "<tr><td height=20 align=\"center\"><a href=\"" + menuUrl + "?selectedMenuItem=" + selectedMenuItem + "\"" + (StringUtil.isNotEmpty(target)?" target=\"" + target + "\"":"") + ">" + menuName + "</a></td></tr>";
} else {
value = "<tr><td height=20 align=\"center\"><font color=\"#aaaaaa\">" + menuName + "</font></td></tr>";
}
} catch (Exception e) {
}
return value;
}
public String buildItem1(String menuName, short purviewCode, int selectedMenuItem, String menuUrl, String target) {
String value = "";
try {
if (AdminPurviewBean.validPurview(adminInfoModel, purviewCode)) {
value = "<a href=\"" + menuUrl + "?selectedMenuItem=" + selectedMenuItem + "\"><img src=\"/wap_manage/images/logo/0001.png\" border=\"0\"> " + menuName + "</a>";
} else {
value = "<img src=\"/wap_manage/images/logo/0001.png\" border=\"0\"> <font color=\"#aaaaaa\">" + menuName + "</font>";
}
} catch (Exception e) {
}
return value;
}
public static void main(String[] args) {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -