use of cn.cerc.jmis.page.AbstractJspPage in project summer-mis by cn-cerc.
the class UIHeader method initHeader.
public void initHeader() {
IForm form = ((AbstractJspPage) this.getOwner()).getForm();
// 刷新
if (this.pageTitle != null) {
leftMenus.add(new UrlRecord("javascript:location.reload()", this.pageTitle));
}
if (leftMenus.size() > 2) {
if (form.getClient().isPhone()) {
UrlRecord first = leftMenus.get(0);
UrlRecord last = leftMenus.get(leftMenus.size() - 1);
leftMenus.clear();
leftMenus.add(first);
leftMenus.add(last);
}
}
if (leftMenus.size() == 0) {
leftMenus.add(new UrlRecord("/", "首页"));
leftMenus.add(new UrlRecord("javascript:history.go(-1);", "刷新"));
}
// 兼容老的jsp文件使用
form.getRequest().setAttribute("barMenus", leftMenus);
form.getRequest().setAttribute("subMenus", rightMenus);
}
Aggregations